-
-
Save worr/2884354 to your computer and use it in GitHub Desktop.
Check if your password is in the linkedin password dump.
This file contains hidden or 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
| """ | |
| 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