Forum Discussion
Convert Binary to ASCII
Hello DevCentral Community ,
How i can convert an HTTP payload from the binary format to the ascii format in order to search certain string values in it ?
Is this correct ?
set test [HTTP::payload] binary scan $test H* hex set ascii [binary format A* $hex]
Thanks in advance,
M.
4 Replies
- Max_Q_factor
Cirrocumulus
The issue is also about the encoding that the http payload is in. UTF-8 is not ASCII, so you would need to ensure that the binary you would like to convert is in fact ascii.
- MDPF52_180608
Nimbostratus
Thank you Brian! I want to have the plain text of the response page so which is the correct method in order to have this output ? THanks in advance, Matteo
- Max_Q_factor
Cirrocumulus
I was looking into this more and I think you might want to try is the scan command. It should do the conversion and search function for you, just specify the input format etc..
- MDPF52_180608
Nimbostratus
Thank you, so i have to scan it and then convert it to hex and then convert it to ASCII ? THanks
Recent Discussions
Related Content
* 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