Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import hashlib
- # Prompt the user to enter an MD5 hash to crack
- md5_hash = input("Enter the MD5 hash to crack: ")
- # Open the word list file
- wordlist_file = open("wordlist.txt", "r")
- # Loop over each word in the file
- for word in wordlist_file:
- # Remove the newline character at the end of the word
- word = word.strip()
- # Calculate the MD5 hash of the current word
- word_hash = hashlib.md5(word.encode()).hexdigest()
- # Check if the calculated hash matches the user's hash
- if word_hash == md5_hash:
- print("Password found: " + word)
- break # Stop searching the word list
- # Close the word list file
- wordlist_file.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement