Skip to content
CTF framework and exploit development library
Python Assembly Other
Branch: dev
Clone or download

Latest commit

saullocarvalho Add `executable=` argument to ELF.search (#1576)
* Add `executable=` argument like `writable=` to ELF.search

* Add doctest using ELF.search with `executable = True`

* Fix `__next__()` issue.
Latest commit a0eeb30 Jun 11, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github [GHA] Remove dependencies on cross-arch compilers Jun 6, 2020
docs Make Github Actions pass, even if we have to disable some things (#1546) Jun 5, 2020
examples Looks like stack needs to be aligned sometimes May 8, 2020
extra Docker: Kill 14 layers in pwntools base images (#1202) Oct 4, 2018
pwn Improvements in examples May 7, 2020
pwnlib Add `executable=` argument to ELF.search (#1576) Jun 11, 2020
travis Remove unused update_demo.sh script Jun 7, 2020
.coveragerc Improve test coverage (adb, iters, lists) Apr 28, 2020
.gitattributes Hopefully make git language statistics more accurate Dec 18, 2014
.gitignore Improvements in examples May 7, 2020
.isort.cfg Add config Jun 11, 2015
.sublime-settings Add sublime-settings [skip ci] Oct 25, 2015
.travis.yml [travis] Use gcc-multilib for i386/amd64 compilation Jun 6, 2020
CHANGELOG.md [changelog] Update 4.1.2 Jun 7, 2020
CONTRIBUTING.md Fixed some documentation Aug 21, 2016
LICENSE-pwntools.txt Fix a lot of documentation (#675) Aug 22, 2016
MANIFEST.in Add mako files to MANIFEST (#980) May 11, 2017
README.md [README] Update Twitter badge to include follower count Jun 7, 2020
TESTING.md Add dockerfile for testing-in-a-box on Xenial (#895) Feb 13, 2017
requirements.txt have requirements.txt just 'call' setup.py install_requires so that y… Aug 13, 2014
setup.py Merge branch 'beta' into dev Jun 6, 2020

README.md

pwntools - CTF toolkit

pwntools logo

PyPI Docs Travis GitHub Workflow Status (branch) Coveralls MIT License 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

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 LTE releases (14.04, 16.04, 18.04, and 20.04). Most functionality should work on any Posix-like distribution (Debian, Arch, FreeBSD, OSX, etc.). Python >= 2.7 is required (Python 3 suggested as best).

Most of the functionality of pwntools is self-contained and Python-only. You should be able to get running quickly with

apt-get update
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

If you have any questions not worthy of a bug report, feel free to ping us at #pwntools on Freenode and ask away. Click here to connect. There is also a mailing list for higher latency discussion.

You can’t perform that action at this time.