Advertisement
copypasteman

Untitled

Sep 22nd, 2018
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. import crypt
  2. def testPass(cryptPass):
  3. salt = cryptPass[0:11]
  4. dictFile = open("dictionary.txt", "r")
  5. for word in dictFile.readlines():
  6. word = word.strip('\n')
  7. cryptword = crypt.crypt(word,salt)
  8. if (cryptword == cryptPass):
  9. print ("[+] Hacked password: %r\n" % word)
  10. return
  11. print "[-] Couldn't locate any passwords.\n"
  12. return
  13.  
  14. def main():
  15. passFile = open('Linux_Passwords.txt')
  16. for line in passFile.readlines():
  17. if ":" in line:
  18. user = line.split(':')[0]
  19. cryptPass = line.split(':')[1].strip(' ')
  20. print("cryptPass = %r" % cryptPass)
  21. print "[*] Unlocking password for: %r " % user)
  22. testPass(cryptPass)
  23.  
  24. if __name__ == "__main__":
  25. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement