Skip to content

Instantly share code, notes, and snippets.

@CreateRemoteThread
Created June 3, 2018 11:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CreateRemoteThread/ca7d4fc9325274501e9341cc08181843 to your computer and use it in GitHub Desktop.
Save CreateRemoteThread/ca7d4fc9325274501e9341cc08181843 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
complete = "g1Mm3Th3r3D1"
magic = "Linux version 4.17.0-rc4+ (likvidera@ubuntu) (gcc version 7.2.0 (Ubuntu 7.2.0-8ubuntu3.2)) #9 Sat May 12 12:57:01 PDT 2018"
# orig = "40369e8c78b46122a4e813228ae8ee6e"
# orig = "e4a75afe114e4483a46aaa20fe4e6ead"
orig = "8c3749214f4a9131ebc67e6c7a86d162"
# begin
d = ""
head = 0
n = 2
orig_pairs = [orig[i:i+n] for i in range(0, len(orig), n)]
for pair in orig_pairs:
p_val = int(pair,16)
p_key = ord(magic[head])
head += 1
d += "%02x" % (p_val ^ p_key)
print d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment