From b6d732114a19fe866432d8a23ee19cc68c1e9f1b Mon Sep 17 00:00:00 2001 From: Michael Chen Date: Tue, 17 May 2022 13:13:22 +0200 Subject: [PATCH] Completed challenge 247 --- 247/level3.py | 4 ++-- 247/solve.py | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 247/solve.py diff --git a/247/level3.py b/247/level3.py index 7c4d340..f411558 100644 --- a/247/level3.py +++ b/247/level3.py @@ -35,8 +35,8 @@ def level_3_pw_check(): print("That password is incorrect") - -level_3_pw_check() +if __name__ == '__main__': + level_3_pw_check() # The strings below are 7 possibilities for the correct password. diff --git a/247/solve.py b/247/solve.py new file mode 100644 index 0000000..b47c960 --- /dev/null +++ b/247/solve.py @@ -0,0 +1,6 @@ +#!/usr/bin/env python3 +from level3 import * + +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