Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import hashlib
- flag = 0
- pass_hash = input("Enter the hash you want to crack: ")
- password_file = input("File name: ")
- try:
- pass_file = open(password_file, "r")
- except:
- print("No file found")
- exit(1)
- for word in pass_file:
- enc_wrd = word.encode('utf-8')
- digest = hashlib.md5(enc_wrd.strip()).hexdigest()
- if digest == pass_hash:
- print("Password found!!!")
- print("Password is: " + word)
- flag = 1
- break
- if flag == 0:
- print("Your luck is not good")
Add Comment
Please, Sign In to add comment