Created
June 6, 2012 17:27
-
-
Save verdurin/2883422 to your computer and use it in GitHub Desktop.
Check LinkedIn password hash dump (combo_not.txt) for a particular string
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
""" | |
Save this file as linkedin_hash.py and ensure it's | |
in the same folder as combo_not.txt | |
Usage: python linkedin_hash.py hunter2 | |
""" | |
from hashlib import sha1 | |
import sys | |
password = sys.argv[1] | |
hsh = sha1(password).hexdigest() | |
x = 0 | |
for line in open('combo_not.txt','r'): | |
if hsh == line.strip(): | |
x += 1 | |
elif "00000" + hsh[5:] == line.strip(): | |
x += 1 | |
print "Number of matches: %d" % x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment