Skip to content

Instantly share code, notes, and snippets.

@marccane
Created August 9, 2021 18:36
Show Gist options
  • Save marccane/8846ea6d1eadb17bae9445923dec0d59 to your computer and use it in GitHub Desktop.
Save marccane/8846ea6d1eadb17bae9445923dec0d59 to your computer and use it in GitHub Desktop.
#!/bin/python
import functools
a=[0x45481d1217111313,0x95f422c260b4145,0x541b56563d6c5f0b,0x585c0b3c2945415f,0x402a6c54095d5f00,0x4b5f4248276a0606,0x6c5e5d432c2d4256,0x6b315e434707412d,0x5e54491c6e3b0a5a,0x2828475e05342b1a,0x60450073b26111f,0xa774803050b0d04]
b=functools.reduce(lambda x, y: x+y, map(lambda x: x.to_bytes(8,"little"), a))
res=[0]*len(b)
tmp = 0
for i in range(len(b)-1,-1,-1):
tmp = res[i] = b[i] ^ tmp
print(''.join(map(lambda x: chr(x), res)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment