Advertisement
skip420

md5_Cracker

Jan 26th, 2021
1,016
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.56 KB | None | 0 0
  1. import hashlib
  2.  
  3. flag = 0
  4.  
  5. pass_hash = input("md5 hash: ")
  6.  
  7. wordlist = input("File name: ")
  8. try:
  9.     pass_file = open(wordlist,"r")
  10. except:
  11.     print("No file found :(")
  12.     quit()
  13.  
  14. for word in pass_file:
  15.  
  16.     enc_wrd =word.encode('utf-8')
  17.     digest =hashlib.md5(enc_wrd.strip()).hexdigest()
  18.     # print(word)
  19.     # print(digest)
  20.     # print(pass_hash)
  21.     if digest.strip() == pass_hash.strip():
  22.         print("password found")
  23.         print("Password is " + word)
  24.         flag = 1
  25.         break
  26.  
  27. if flag == 0:
  28.     print("password not in list")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement