From df8f27bc3618339569cd51e254c1f6e79fa52bca Mon Sep 17 00:00:00 2001 From: Michael Chen Date: Tue, 17 May 2022 13:17:39 +0200 Subject: [PATCH] Completed challenge 248 --- 248/level4.py | 4 ++-- 248/solve.py | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 248/solve.py diff --git a/248/level4.py b/248/level4.py index c3ecc86..74b0638 100644 --- a/248/level4.py +++ b/248/level4.py @@ -35,8 +35,8 @@ def level_4_pw_check(): print("That password is incorrect") - -level_4_pw_check() +if __name__ == '__main__': + level_4_pw_check() diff --git a/248/solve.py b/248/solve.py new file mode 100644 index 0000000..5eae343 --- /dev/null +++ b/248/solve.py @@ -0,0 +1,6 @@ +#!/usr/bin/env python3 +from level4 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