Forum Discussion
Michael_Koyfma1
Cirrus
Nov 03, 2006Payload manipulation question
Basically, once I have the payload, I need to identify a piece that starts with FO followed by 5 digits, then three spaces, and then B. I need the send back the payload back to the client, only I nee...
Deb_Allen_18
Nov 04, 2006Historic F5 Account
Hi Michael -
Looks like you're OK with using a wildcard to identify the 8 characters between "FO" & "B", so following your approach, you would actually want to break up the match string into /4/ chunks, and only replace the whitespace, using regsub instead of regexp to perform the inline substitution. This code would do the trick:
set payload [TCP::payload]
set new_digits ""
regsub -all "(FO)(.*)( )(B)" $payload "\\1\\2$new_digits\\4" payload
TCP::payload replace 0 [TCP::payload length] $payload
HTH
/deb
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
