com_projet/challenge.py

23 lines
1,006 B
Python
Raw Normal View History

2026-11-05 11:27:37 +01:00
from intro import (
int_to_ascii,
hex_to_ascii,
hex_to_b64,
int_to_message_rsa,
xor_13,
unxor_flag,
)
2026-11-05 11:10:32 +01:00
if __name__ == "__main__":
# Intro-level challenge
# fmt: off
print(int_to_ascii([99, 114, 121, 112, 116, 111, 123, 65, 83, 67, 73, 73, 95, 112, 114, 49, 110, 116, 52, 98, 108, 51, 125]))
print(hex_to_ascii("63727970746f7b596f755f77696c6c5f62655f776f726b696e675f776974685f6865785f737472696e67735f615f6c6f747d"))
print(hex_to_b64("72bca9b68fc16ac7beeb8f849dca1d8a783e8acf9679bf9269f7bf"))
print(int_to_message_rsa(11515195063862318899931685488813747395775516287289682636499965282714637259206269))
2026-11-05 11:19:40 +01:00
print("crypto{{{}}}".format(xor_13("label")))
2026-11-05 11:27:37 +01:00
print(unxor_flag(0xa6c8b6733c9b22de7bc0253266a3867df55acde8635e19c73313,
0x37dcb292030faa90d07eec17e3b1c6d8daf94c35d4c9191a5e1e,
0xc1545756687e7573db23aa1c3452a098b71a7fbf0fddddde5fc1,
0x04ee9855208a2cd59091d04767ae47963170d1660df7f56f5faf
))
2026-11-05 11:10:32 +01:00
# fmt: on