Created
October 13, 2017 03:38
-
-
Save miketweaver/a56253da32e47f034d6486a8a6d0ab20 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/env python | |
import hashlib | |
score = 0 | |
plaintext = "plaintext.txt" | |
hashes = "hashes.txt" | |
plainfile = open(plaintext) | |
hashfile = open(hashes) | |
hash = hashfile.readline() | |
plain = plainfile.readline() | |
while plain: | |
if (hashlib.sha1(plain.strip()).hexdigest() == hash.strip()): | |
score+=1 | |
#print(plain.strip() + ":" + hash.strip()) | |
hash = hashfile.readline() | |
plain = plainfile.readline() | |
plainfile.close() | |
hashfile.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment