Skip to content

Instantly share code, notes, and snippets.

@vhqtvn
Last active August 29, 2015 14:17
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 vhqtvn/ed163c30000405149a4e to your computer and use it in GitHub Desktop.
Save vhqtvn/ed163c30000405149a4e to your computer and use it in GitHub Desktop.
#!/usr/bin/python
for test in xrange(1<<24):
correct = True
x = test
for i in xrange(5):
x = (x * 0x000343fd + 0x269ec3) & 0xFFFFFF
if (x>>16)!=key[i]:
correct = False
break
if correct:
print("Found it: ",hex(test))
print("Verify: ")
for i in xrange(5):
test = (test * 0x000343fd + 0x269ec3) & 0xFFFFFF
print(hex(test>>16),hex(test))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment