Skip to content

Instantly share code, notes, and snippets.

@xevix
Last active February 24, 2018 09:56
Show Gist options
  • Save xevix/4641cb0029f0250c4d6b6f5263de73ed to your computer and use it in GitHub Desktop.
Save xevix/4641cb0029f0250c4d6b6f5263de73ed to your computer and use it in GitHub Desktop.
fname = 'pwned-passwords-2.0.txt'
# Change me
# echo -n password | shasum -a 1 | awk '{print toupper($1)}'
password = '7C4A8D09CA3762AF61E59520943DC26494F8941B'
search = password
with open(fname) as f:
for line in f:
sha = line[:40]
if search == sha:
print "FOUND!"
print line
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment