Last active
October 19, 2020 15:16
-
-
Save wolfieorama/c53e44aed4aca6e94da4e9be25898e57 to your computer and use it in GitHub Desktop.
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
// this script computes the fraction of passwords guessed after a certain number of guesses | |
import argparse | |
parser = argparse.ArgumentParser(description='Computing lambda') | |
parser.add_argument('data', type=str, | |
help='data file with frequency against the password') | |
args = parser.parse_args() | |
guessing = [g.strip() for g in open(args.data, encoding='utf-8', errors='ignore')] | |
g_dict = {} | |
for g in guessing: | |
if " " in g: # check for valid frequency - password pairs | |
p = g.split(" ") | |
g_dict.update({p[1]: p[0]}) | |
for i, j in g_dict.items(): | |
print(i, " ", j) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment