Created
November 15, 2016 19:22
-
-
Save xermicus/050782aac9e50ad5ada6b1a047e5ed77 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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