Created
October 21, 2018 21:04
-
-
Save msabwat/33936df4925b485e419fe5e944598f9c 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
import hashlib | |
s = "" | |
start = 0 | |
end = 0xFFFFFF | |
i = 0 | |
import string | |
import random | |
def id_generator(size=random.randint(10,30), chars=string.ascii_uppercase + string.digits): | |
return ''.join(random.choice(chars) for _ in range(size)) | |
while 42: | |
x = id_generator() | |
s = hashlib.md5(x+"Shrewk").hexdigest() | |
i = 2 | |
if (s[0] == '0' and s[1]=='e'): | |
while(i < len(s) and s[i].isdigit()): | |
i += 1 | |
if (i == len(s)): | |
print(s) | |
break | |
else: | |
print("Not a digit " + s + " " +s[i]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment