Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import hashlib
- from datetime import datetime, timedelta
- DATE_FORMAT = '%m/%d/%Y' # Format of the birthdate password (mm/dd/YYYY)
- CORRECT_HASH = 'a9fdb86a833dff5245ab1ea74195b2e3' # Input your hash string here
- def hash(s: str) -> str:
- # Currently using the MD5 hash, be sure to use the same
- # hashing algorithm
- hash = hashlib.md5(s.encode())
- return hash.hexdigest()
- def findDateHash():
- date = datetime.today()
- for i in range(40_000): # Check through the last 40,000 days
- date -= timedelta(days=1) # Go back 1 day
- dateStr = date.strftime(DATE_FORMAT)
- # Check if the hashes are the same or not
- if hash(dateStr) == CORRECT_HASH:
- print(f'Found password: {dateStr}')
- break
- else:
- print('Could not find the password!')
- if __name__ == '__main__':
- findDateHash()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement