efssfwewe

Python Password Cracker Script (For Beginners)

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