1

I want to convert hexadecimal chars like:

\x12h+.\xC9V\xB8\xFC\x95\x0D\x11

to

(Device Control 2)h+.(+)V(+)(n)(ò)(Carriage Return)(Device Control 1)

Is there a module available in python or something similar that can easily do this without having to create a hex2text dictionary?

Non printable char reference @ Istanbul Technical University

SomeGuyOnAComputer
  • 5,414
  • 6
  • 40
  • 72
  • In what charset do those bytes >0x80 translate to those characters? – Ignacio Vazquez-Abrams Jul 27 '16 at 10:38
  • I'm unsure of the charset. I added a reference that I found online and it seems that other online sources seem to have the same chars. I checked `\x40` to be @ as a sanity check. – SomeGuyOnAComputer Jul 27 '16 at 14:00
  • 0x40 is `@` in a very large number of charsets. The important question is how you got from 0x95 to `ò`. – Ignacio Vazquez-Abrams Jul 27 '16 at 18:37
  • Good point, that character is different from the first reference I pointed to. I used [juniper's reference](http://www.juniper.net/documentation/en_US/idp5.1/topics/reference/general/intrusion-detection-prevention-custom-attack-object-extended-ascii.html) and it was in Table 2. This question arose from seeing hexadecimal chars in cross site scripting attacks in access logs. I want to find out what each of the hex chars mean without having to google each one. – SomeGuyOnAComputer Jul 28 '16 at 13:05

0 Answers0