Skip to content

Instantly share code, notes, and snippets.

@xermicus
Created November 15, 2016 19:22
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/050782aac9e50ad5ada6b1a047e5ed77 to your computer and use it in GitHub Desktop.
Save xermicus/050782aac9e50ad5ada6b1a047e5ed77 to your computer and use it in GitHub Desktop.
# http://crackmes.de/users/macabre/rccrackme/
# NOTE: This keygen finds correct serial, but fails to insert the hyphens '-' in the
# correct (correct in terms of the crackme) way. It gave me headaches trying
# to do this in python, but I think it should be easy to implement it in C.
user = input("Enter username: ")
user *= 9 // len(user) + 1 if len(user) < 10 else 1
print('User: ' + user)
serial = [ord(c) for c in user]
for i in range(len(serial) // 2):
l = len(serial) - i - 1
serial[i] = serial[i] ^ serial[l]
serial[l] = (serial[i+1] | serial[i]) >> 1
print('"Technically" here\'s your serial:')
print(serial)
#serial = ''.join(map(str, serial))
#print('Serial: ' + serial[:5]+'-'+serial[6:15]+'-'+serial[16::])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment