Forum Discussion
Kevin_Davies_40
Aug 19, 2011Nacreous
How can I replace this with "SSN">-- regardless of the format of the ssn?
when HTTP_REQUEST_DATA {
set offset [string first {"SSN">} [HTTP::payload]]
set length [expr {$offset - [string first {<} [HTTP::payload] $offset] }]
log local0. "Offset $offset length $length"
log local0. "Replacing [HTTP::payload $offset $length]"
HTTP::payload replace $offset $length {"SSN">--}
}
Mind you there is no error checking here so you would want to add some.
Kevin (Jarvil)