Created
August 16, 2019 13:16
-
-
Save realsung/a679c092d49ae556482d534d1b3542b3 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 | |
import re | |
import string | |
ALLOWED_CHARACTERS = string.hexdigits | |
NUMBER_OF_CHARACTERS = len(ALLOWED_CHARACTERS) | |
def characterToIndex(char): | |
return ALLOWED_CHARACTERS.index(char) | |
def indexToCharacter(index): | |
if NUMBER_OF_CHARACTERS <= index: | |
raise ValueError("Index out of range.") | |
else: | |
return ALLOWED_CHARACTERS[index] | |
def next(string): | |
if len(string) <= 0: | |
string.append(indexToCharacter(0)) | |
else: | |
string[0] = indexToCharacter((characterToIndex(string[0]) + 1) % NUMBER_OF_CHARACTERS) | |
if characterToIndex(string[0]) is 0: | |
return list(string[0]) + next(string[1:]) | |
return string | |
def main(): | |
sequence = list() | |
while True: | |
sequence = next(sequence) | |
tmp = ''.join(i for i in sequence) | |
tmp += 'S@L7' | |
m = hashlib.md5() | |
m.update(tmp) | |
md5string=m.hexdigest() | |
if md5string[2:].isdigit() == True and md5string[:2] == '0e': | |
print md5string + " : " + tmp | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment