diff --git a/249/level5.py b/249/level5.py index b9c2a89..55bd936 100644 --- a/249/level5.py +++ b/249/level5.py @@ -35,6 +35,6 @@ def level_5_pw_check(): print("That password is incorrect") - -level_5_pw_check() +if __name__ == '__main__': + level_5_pw_check() diff --git a/249/solve.py b/249/solve.py new file mode 100644 index 0000000..21e3349 --- /dev/null +++ b/249/solve.py @@ -0,0 +1,8 @@ +#!/usr/bin/env python3 +from level5 import * + +with open('dictionary.txt', 'r') as f: + pos_pw_list = f.read().split('\n') +correct_pw = next(pw for pw in pos_pw_list if hash_pw(pw) == correct_pw_hash) +print(f'Correct password is: {correct_pw}') +print(str_xor(flag_enc.decode(), correct_pw)) \ No newline at end of file