Merge pull request #3 from tomasvanagas/patch-1

Update match-creds.py
This commit is contained in:
Brannon Dorsey 2018-05-23 16:39:15 -05:00 committed by GitHub
commit 328b296539
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -22,12 +22,12 @@ if __name__ == '__main__':
args = parse_args()
with open(args.accounts, 'r') as f:
hash_to_username = { hsh: username for username, hsh in \
[l.split(args.delimiter) for l in f.read().split('\n') \
if len(l.split(args.delimiter)) > 1] }
[l.split(args.delimiter,1) for l in f.read().split('\n') \
if len(l.split(args.delimiter,1)) > 1] }
# print(hash_to_username)
with open(args.potfile, 'r') as f:
hash_to_pw = { hsh: pw for hsh, pw in [l.split(':') for l in f.read().split('\n') \
if len(l.split(':')) > 1]}
hash_to_pw = { hsh: pw for hsh, pw in [l.split(':',1) for l in f.read().split('\n') \
if len(l.split(':',1)) > 1]}
for hsh, username in hash_to_username.items():
if hsh in hash_to_pw: