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)