From e268a497fd9abcd2d549c0f5a754dcb0bc930e59 Mon Sep 17 00:00:00 2001 From: Tomas Vanagas Date: Tue, 7 Nov 2017 14:09:28 +0200 Subject: [PATCH] Update match-creds.py Works better --- match-creds.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/match-creds.py b/match-creds.py index 7bf2f0a..06209b8 100644 --- a/match-creds.py +++ b/match-creds.py @@ -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: