Created
December 18, 2016 13:58
-
-
Save CreateRemoteThread/1576f0f39f5d04558a87e26c6390c9ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import base64 | |
a = "fx1uagMGQQMWOWhyFBxnBUdzN35NPWYHUBQHRmozeEY=" | |
pw = "My_S3cr3t_P@$$W0rD\0" | |
out = "" | |
msg = base64.b64decode(a) | |
print len(msg) | |
print len(pw) | |
for cindex in range(0,len(msg)): | |
print "XORing index %d with key index %d" % (cindex,cindex % len(pw)) | |
out += chr(ord(msg[cindex]) ^ ord(pw[cindex % len(pw)])) | |
for cindex in range(18,len(msg)): | |
for i in range(0,len(pw)): | |
OUTCHAR = chr(ord(msg[cindex]) ^ ord(pw[i])) | |
if OUTCHAR in "0123456789abcdef": | |
print "[%d]: xor with index %d:%c" % (cindex,i,OUTCHAR) | |
print out | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment