Created
April 11, 2015 20:55
-
-
Save tylerkerr/dc33b0608c626c4f32f9 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 sys, os | |
from passlib.hash import bcrypt | |
f = open('commonpasswords.txt', 'r') | |
pws = f.readlines() | |
f.close() | |
f = open('dbmini.txt', 'r') | |
users = [{ 'name' : uline[1], 'hash': uline[2]} for uline in [line.rstrip('\n').split('\t', 2) for line in f.readlines()]] | |
f.close() | |
for u in users: | |
count = 0 | |
for pw in pws: | |
if count % 100 == 0: | |
print("mini: %s: %s" %(u['name'], count)) | |
if bcrypt.verify(pw, u['hash']): | |
print("Good!!!\n user: %s pass: %s" %(u['name'], pw)) | |
raise Exception() | |
count += 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment