Completed challenge 249

This commit is contained in:
Michael Chen 2022-05-17 13:20:50 +02:00
parent f840ba5485
commit 4b896bc73c
No known key found for this signature in database
GPG Key ID: FD1BAF55F0CBDCF9
2 changed files with 10 additions and 2 deletions

View File

@ -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()

8
249/solve.py Normal file
View File

@ -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))