Added a basic keygen
This commit is contained in:
@@ -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))
|
||||||
|
|
||||||
Reference in New Issue
Block a user