From dbddf5b0f038ca142da704c28e7cf51aa8c5b216 Mon Sep 17 00:00:00 2001 From: cato447 Date: Sat, 2 Mar 2024 03:41:20 +0100 Subject: [PATCH] solved intro_rev_2 --- cscg24/rev/intro_rev_2/decode_password.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cscg24/rev/intro_rev_2/decode_password.py b/cscg24/rev/intro_rev_2/decode_password.py index e46299d..aa57d9f 100644 --- a/cscg24/rev/intro_rev_2/decode_password.py +++ b/cscg24/rev/intro_rev_2/decode_password.py @@ -1,9 +1,9 @@ encoded_passwd = b"\x02\xea\x02\xe8\xfc\xfd\xbd\xfd\xf2\xec\xe8\xfd\xfb\xea\xf7\xfc\xef\xb9\xfb\xf6\xea\xfd\xf2\xf8\xf7\x00" - def decode(char: int): - return char + 0x77 - + return chr((char + 0x77) & 0xFF) +password = "" for char in encoded_passwd: - print(chr(decode(char)), end="") + password += decode(char) +print(password)