Skip to content

Instantly share code, notes, and snippets.

@xermicus
Created October 18, 2016 18:25
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 xermicus/95a7f81ce9aa2dc4a3293bdff243c2c8 to your computer and use it in GitHub Desktop.
Save xermicus/95a7f81ce9aa2dc4a3293bdff243c2c8 to your computer and use it in GitHub Desktop.
# http://crackmes.de/users/damo2k/damos_crackme_1_for_linux/
import random, sys
random.seed()
serial = [None] * 10
#1_10
c = random.randint(0x64, 0x7a)
serial[9] = chr(c)
serial[0] = chr(c-0x3)
#2_9
c = random.randint(0x61, 0x7a - 0xe)
serial[8] = chr(c)
serial[1] = chr(c + 0xe)
#3_8
c = random.randint(0x7a - 5, 0x7a)
serial[7] = chr(c)
serial[2] = chr(c - 0x14)
#4_7
c = random.randint(0x61, 0x7a - 6)
serial[6] = chr(c)
serial[3] = chr(c + 6)
#5_6
c = serial[0]
serial[5] = c
serial[4] = c
for c in serial:
sys.stdout.write(c)
sys.stdout.write("\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment