parthosutradhor

md5 crack without salt

Jun 8th, 2020
383
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.53 KB | None | 0 0
  1. import hashlib
  2.  
  3. flag = 0
  4. pass_hash = input("Enter the hash you want to crack: ")
  5. password_file = input("File name: ")
  6.  
  7. try:
  8.     pass_file  = open(password_file, "r")
  9. except:
  10.     print("No file found")
  11.     exit(1)
  12.    
  13. for word in pass_file:    
  14.     enc_wrd = word.encode('utf-8')
  15.     digest = hashlib.md5(enc_wrd.strip()).hexdigest()
  16.     if digest == pass_hash:
  17.         print("Password found!!!")
  18.         print("Password is: " + word)
  19.         flag = 1
  20.         break
  21.    
  22. if flag == 0:
  23.     print("Your luck is not good")
Add Comment
Please, Sign In to add comment