pwntools README

The project's README from github.com/Gallopsled/pwntools. As one markdown file: README.md.

pwntools - CTF toolkit

pwntools logo

PyPI Docs GitHub Workflow Status (dev) Coveralls MIT License Packaging status Discord Twitter

Pwntools is a CTF framework and exploit development library. Written in Python, it is designed for rapid prototyping and development, and intended to make exploit writing as simple as possible.

from pwn import *
context(arch = 'i386', os = 'linux')

r = remote('exploitme.example.com', 31337)
# EXPLOIT CODE GOES HERE
r.send(asm(shellcraft.sh()))
r.interactive()

Documentation

Our documentation is available at docs.pwntools.com

A series of tutorials is also available online

To get you started, we've provided some example solutions for past CTF challenges in our write-ups repository.

Installation

Pwntools is best supported on 64-bit Ubuntu LTS releases (22.04 and 24.04). Most functionality should work on any Posix-like distribution (Debian, Arch, FreeBSD, OSX, etc.).

Pwntools supports Python 3.10+ since version 5.0.0. Use Pwntools 4.x for older versions as well as Python 2.7. Most of the functionality of pwntools is self-contained and Python-only. You should be able to get running quickly with

sudo apt-get update
sudo apt-get install python3 python3-pip python3-dev git libssl-dev libffi-dev build-essential
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade pwntools

However, some of the features (assembling/disassembling foreign architectures) require non-Python dependencies. For more information, see the complete installation instructions here.

Contribution

See CONTRIBUTING.md

Contact and Community

If you have any questions not worthy of a bug report, join the Discord server at https://discord.gg/96VA2zvjCB

pwntools (Gallopsled/pwntools)

Searching Database…

13.8K ·GitHub
What is this?Pwntools is a CTF framework and exploit development library written in Python, built for rapid prototyping with the goal of making exploit writing as simple as possible.
Is it a Python library I import into my own scripts, or a standalone tool?It is a Python library you import into your exploit scripts — most of its functionality is self-contained and pure Python.
Which Python version do I need?Current 5.x releases need Python 3.10 or newer; for older interpreters, including Python 2.7, use the 4.x branch instead.
Does everything work right after 'pip install'?Almost — pip covers most features, but assembling and disassembling code for foreign CPU architectures requires extra non-Python dependencies.
Do I have to be a CTF competitor to get value out of it?It is aimed at CTF players and exploit developers — anyone who needs working exploit code fast, from live competitions to practice on wargames.
Will it run if I am not on Ubuntu?Yes — Ubuntu LTS (64-bit, 22.04 or 24.04) is just the best-supported target; most functionality works on any POSIX-like distribution such as Debian, Arch, FreeBSD or macOS.
Where should I start after installing?Start with the documentation at docs.pwntools.com and the online tutorial series; the write-ups repository has complete example solutions to past CTF challenges.
Is pwntools still actively maintained?Yes — it has been developed since 2013, sits at roughly 13.7k GitHub stars, and the repo runs CI workflows for changelog updates, linting and Docker builds.
What does it give me for shellcode and ROP work?Both are first-class concerns: rop and shellcode development are among the project's own topics, and the library can assemble and disassemble code for foreign CPU architectures — the core of classic binary exploitation.
Creator
Gallopsled
Size
28.3 MB
Stars
13.8K
Age
13y
Commits · 90 Days