Forum Discussion
JG
May 18, 2014Cumulonimbus
Thanks so much, John! Here's a new version of it based on your advice:
when CLIENT_ACCEPTED {
set c-addr [IP::client_addr]
log local0. "Client addr: $c-addr"
STREAM::expression {@^EHLO.*\r\n@@ @^HELO.*\r\n@@}
STREAM::enable
}
when STREAM_MATCHED {
set mstring [STREAM::match]
log local0. "STREAM_MATCHED: string: $mstring"
set replacment [string range $mstring 0 1]
append replacment "LO $c-addr\r\n"
log local0. "STREAM_MATCHED: replacement string: $replacement"
STREAM::replace "$mstring/$replacment"
event STREAM_MATCHED disable
}
when SERVER_CONNECTED {
STREAM::disable
}
I can't test this (it compiled alright) yet because my devices are all firewall'ed off at the moment.