Last active
June 21, 2020 23:12
-
-
Save jonathanrodriguezs/bd0a8162f468ed7c703d863123f3a824 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!usr/bin/python | |
import sys | |
import hashlib | |
pass_found = False | |
input_hash = sys.argv[1] | |
pass_doc = sys.argv[2] | |
try: | |
pass_file = open(pass_doc, 'r') | |
except: | |
print("* Can't open dictionary") | |
quit() | |
for word in pass_file: | |
enc_word = word.encode('utf-8') | |
hash_word = hashlib.md5(enc_word.strip()) | |
digest = hash_word.hexdigest() | |
if digest == input_hash: | |
print("+ Password found: ", word) | |
pass_found = True | |
break | |
if not pass_found: | |
print("* Password is not found in the dictionary") |
Author
jonathanrodriguezs
commented
Jun 21, 2020
•
Suggested dictionaries to test: https://github.com/danielmiessler/SecLists
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment