[Tutor] Pack as HEX question
xchimeras at gmail.com
Sat Oct 24 16:14:22 CEST 2009
First, I wanted to thank everyone in advance for your help and any feedback
is appreciated. Here is what I am trying to accomplish:
I have this encrypted data that was sent across the network. The decryption
is a simple XOR with a 16 byte key. I started writing a basic Python script
that would decrypt the traffic by XORing each byte with the XOR key. I was
wondering if there was someway in Python to indicate that the string is a
string of HEX values similar to Perl's pack.
Encrypted string in hex
Four byte key
XOR key "41424344"
Is there any way to tell Python that the encrypted string and XOR key is
HEX? This way I can XOR each byte without having to either place a \x
between every two characters. I realize I need to convert everything to an
I have done this numerous times, but I wanted to throw it out there as I
know there must be a easier way. I am using Python 2.5.2
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor