Added a basic keygen

This commit is contained in:
hellisabove
2023-03-26 23:55:18 +03:00
parent bed67a3418
commit 81498880ca
+19
View File
@@ -0,0 +1,19 @@
import random
import sys
def check_key(key):
char_sum = 0
for c in key:
char_sum += ord(c)
sys.stdout.write("{0:3} | {1} \r".format(char_sum, key))
sys.stdout.flush()
return char_sum
key = ""
while True:
key += random.choice("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_")
s = check_key(key)
if s > 2015:
key = ""
elif s==2015:
print ("Found valid key: {0}".format(key))