Forum Discussion
Stanislas_Piro2
Mar 05, 2018Cumulonimbus
You can try with this code (not tested)
when CLIENT_ACCEPTED {
set collected_length 0
set virtual_ip [IP::local_addr]
}
when SERVER_CONNECTED {
TCP::collect
}
when SERVER_DATA {
set tns_data [TCP::payload]
if {[set host_start [string first "HOST" $tns_data ]] != -1} {
set host_end [string first ")" $tns_data $host_start]
set collected_length [expr {$collected_length + [TCP::payload length]}]
TCP::payload replace $host_start $host_end "HOST=$virtual_ip)"
}
TCP::release
if {$collected_length < 2048} {
TCP::collect
}
}