Skip to content

Instantly share code, notes, and snippets.

@worr
Forked from jsundram/find_password_hash.py
Created June 6, 2012 19:59
Show Gist options
  • Select an option

  • Save worr/2884354 to your computer and use it in GitHub Desktop.

Select an option

Save worr/2884354 to your computer and use it in GitHub Desktop.
Check if your password is in the linkedin password dump.
"""
Check if your password is in the linkedin password dump.
You'll need to download the dump from here: http://bit.ly/KGTusG and unzip it to combo_not.txt
"""
import hashlib
import getpass
pw = getpass.getpass('Enter your LinkedIn password: ')
sha1 = hashlib.sha1(pw).hexdigest()
hash = '00000' + sha1[5:]
found = False
with open('combo_not.txt') as f:
for i, line in enumerate(f):
h = line.strip()
if hash == h:
print "Found it on line %d" % i
found = True
if not found:
print "password %s not found" % (pw)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment