Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import crypt
- def testPass(cryptPass):
- salt = cryptPass[0:11]
- dictFile = open("dictionary.txt", "r")
- for word in dictFile.readlines():
- word = word.strip('\n')
- cryptword = crypt.crypt(word,salt)
- if (cryptword == cryptPass):
- print ("[+] Hacked password: %r\n" % word)
- return
- print "[-] Couldn't locate any passwords.\n"
- return
- def main():
- passFile = open('Linux_Passwords.txt')
- for line in passFile.readlines():
- if ":" in line:
- user = line.split(':')[0]
- cryptPass = line.split(':')[1].strip(' ')
- print("cryptPass = %r" % cryptPass)
- print "[*] Unlocking password for: %r " % user)
- testPass(cryptPass)
- if __name__ == "__main__":
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement