Hello everyone,

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.

For example:

Encrypted string in hex
"313B372C2E2C63362E2128"

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
integer first.

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

Thank you,
Mike
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to