intro lesson 7: flag XORed with a mystery byte.

This commit is contained in:
boyreau 2026-11-05 11:30:43 +01:00
commit e73c803ae3
2 changed files with 11 additions and 0 deletions

View file

@ -40,3 +40,12 @@ def unxor_flag(
key_3 = xor(int_to_message_rsa(key2_key3), key_2)
flag = xor(xor(xor(int_to_message_rsa(flag_key1_key3_key2), key_1), key_2), key_3)
return flag.decode("utf-8")
# Challenge intro-7
def mystery_xor(input: int):
str_input = int_to_message_rsa(input)
for i in range(1, 128):
candidate = xor(str_input, i).decode("utf-8")
if candidate.startswith("crypto"):
return candidate