Skip to content

Instantly share code, notes, and snippets.

@nxsyed
Created November 11, 2017 18:29
Show Gist options
  • Save nxsyed/3b269e0432a7101bcc4e9b0f6f791316 to your computer and use it in GitHub Desktop.
Save nxsyed/3b269e0432a7101bcc4e9b0f6f791316 to your computer and use it in GitHub Desktop.
Test password function which compares the encrypted password to the dictionary.
def test_pass(encrypted_pass, filename):
salt = encrypted_pass[0:2]
dict_list = open(filename,'r').split('\n')
for word in dict_list:
crypt_word = c.crypt(word, salt)
if (crypt_word == encrypted_pass):
print("[$] Found Password: "+word+"\n")
return
print("[-] Password Not Found.\n")
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment