Пример #1
0
def main():
    num, in_filename, out_filename = parse_args()
    passwords = load_input(in_filename)

    print('---- Sweetwords Generator Problem #%s ----' % PROBLEM_NUM)
    print('Reading passwords from %s\nWriting %d sweetwords/password to %s' % (
           in_filename, num, out_filename))

    sweets = generate_sweetword_sets(num, passwords)
    write_sweetwords(out_filename, sweets)

    print('---- Finished Sweetwords Generator Problem #%d ----' % PROBLEM_NUM)
Пример #2
0
def main():
    num, in_filename, out_filename = parse_args()
    passwords = load_input(in_filename)
    print('---- Sweetwords Generator Problem #%s ----' % PROBLEM_NUM)
    print('Reading passwords from %s\nWriting %d sweetwords/password to %s' % (
           in_filename, num, out_filename))

    # 10 most common passwords from the rock you db
    rockyou_most_common = rock_you_db(ROCKYOU_CUTOFF)

    sweets = generate_sweetword_sets(num, passwords, rockyou_most_common,
                                     db_count(rockyou_most_common))
    write_sweetwords(out_filename, sweets)

    print('---- Finished Sweetwords Generator Problem #%d ----' % PROBLEM_NUM)
Пример #3
0
def main():
    num_sweetwords, in_filename, out_filename = parse_args()
    real_passwords = load_input(in_filename)

    print('---- Sweetwords Generator Problem #%s ----' % PROBLEM_NUM)
    print('Reading passwords from %s\nWriting %d sweetwords/password to %s' % (
           in_filename, num_sweetwords, out_filename))

    known_pass_counts, known_pass_weights, known_passwords, total_count = (
        load_rockyou_passwords())

    sweets = generate_sweetword_sets(num_sweetwords, real_passwords,
                                     known_passwords, known_pass_weights)
    write_sweetwords(out_filename, sweets)

    print('---- Finished Sweetwords Generator Problem #%d ----' % PROBLEM_NUM)