Saturday, April 19, 2014

Python - XOR a File

Origin of this script is from http://stackoverflow.com/questions/5037762/xor-each-byte-with-0x71

#!/usr/bin/python

file = bytearray(open("file.txt", "r").read())
for i in range(len(file)):
file[i] ^= 0x71

open("xorFile.txt", "wb").write(file)

No comments:

Post a Comment

Test Authentication from Linux Console using python3 pexpect

Working with the IT420 lab, you will discover that we need to discover a vulnerable user account.  The following python3 script uses the pex...