Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import hashlib
- import itertools
- def getHash(s):
- return hashlib.sha256(s.encode()).hexdigest()
- hsh = 'd5c9e1c7f862d634a759a56ed97549f62a6d78401440a5c09cfbf7dfc20e8190'
- alf = r'!"#$%&*-0123456789?@ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz'
- mask = '88d2{}eb2b{}0ce3d30c6c7f{}c93d9{}b57'
- i = 0
- for psw in itertools.combinations_with_replacement(alf, 4):
- i += 1
- psw = mask.format(*psw)
- #print(psw, getHash(psw), getHash(getHash(psw)))
- if getHash(getHash(psw)) == hsh:
- print(psw)
- print('Total:', i)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement