Guest User

Untitled

a guest
Sep 4th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. import crypt, hashlib
  2.  
  3. def testPass(cryptPass):
  4. salt = cryptPass.split('$')
  5.  
  6. dictFile = open('dictionary.txt', 'r')
  7. for word in dictFile.readlines():
  8. word = word.strip('\n')
  9. if len(salt) == 4:
  10. cryptWord = crypt.crypt(word, "$6$"+salt[2]+"$"+hashlib.sha512().hexdigest())
  11.  
  12. if (cryptWord == cryptPass):
  13. print "[+] Found Password: ******************** \n"
  14. return
  15.  
  16. print "[-] Password Not Found.\n"
  17.  
  18. def main():
  19. passFile = open('passwords.txt')
  20. for line in passFile.readlines():
  21. if ":" in line:
  22. user = line.split(':')[0]
  23. cryptPass = line.split(':')[1].strip(' ')
  24. print "[*] Cracking Password For: "+user
  25. testPass(cryptPass)
  26.  
  27. if __name__ == "__main__":
  28. main()
Add Comment
Please, Sign In to add comment