Skip to content

Instantly share code, notes, and snippets.

@jamslater
Created August 9, 2013 17:47
Show Gist options
  • Save jamslater/6195577 to your computer and use it in GitHub Desktop.
Save jamslater/6195577 to your computer and use it in GitHub Desktop.
magic32 = 3237618779
magic28 = 2813506931
def check_secret_key(a, b):
return ((magic28 * a) - (magic32 * b)) == 1
def format_serial(a, b):
return "%08X:%08X" % (a, b)
a = 1
while a <= 0xFFFFFFFF:
b = (1 - magic28 * a) // -magic32
if check_secret_key(a, b):
print "Success! a=%d, b=%d, serial=%s" % (a, b, format_serial(a, b))
break
a += 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment