Skip to content

Instantly share code, notes, and snippets.

Created Apr 1, 2017
What would you like to do?
import struct
s = "W"
for n in 0x0FF6FEAFE, 0x0CDAF4DB6, 0x8D9A9B17, 0x83A147A7, 0x7AD24DCA, 0x0C99CA1B9, 0x71CEAC15, 0x932C2931:
x ^= n
s += struct.pack("<I", x)
x = n
s2 = "W"
prev = ord(s[0])
for c in s[1:]:
c = ord(c)
if prev & 1 == 0:
s2 += chr((c - prev) & 0xff)
s2 += chr((c + prev) & 0xff)
prev = c
print repr(s2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment