MCPcopy Create free account
hub / github.com/geekcomputers/Python / testPass

Function testPass

password_cracker.py:24–34  ·  view source on GitHub ↗
(cryptPass)

Source from the content-addressed store, hash-verified

22
23
24def testPass(cryptPass): # Start the function
25 salt = cryptPass[0:2]
26 dictFile = open("dictionary.txt", "r") # Open the dictionary file
27 for word in dictFile.readlines(): # Scan through the file
28 word = word.strip("\n")
29 cryptWord = crypt.crypt(word, salt) # Check for password in the file
30 if cryptWord == cryptPass:
31 print("[+] Found Password: " + word + "\n")
32 return
33 print("[-] Password Not Found.\n")
34 return
35
36
37def main():

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected