CTF framework and exploit development library
Clone or download
RobertLarsen and zachriggle Fixed faulty read loop (#1239)
* Fixed faulty read loop

* Added doctest

* Exercise more stager functionality in doctest

* Fix whitespace in doctest

* Fix prefix in doctest

* Fix result alignment in doctest
Latest commit db8ab63 Jan 16, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Update ISSUE_TEMPLATE.md Jun 22, 2017
docs fix(tests): avoid RecursionError due to weird monkey patching (#1225) Nov 13, 2018
examples bandit.labs.overthewire.org SSH is now on port 2220 (#984) May 25, 2017
extra Docker: Kill 14 layers in pwntools base images (#1202) Oct 4, 2018
pwn Expose pwnlib.tubes.server.server in the toplevel Jan 2, 2018
pwnlib Fixed faulty read loop (#1239) Jan 16, 2019
travis switch to trusty build in travis ci and fix some test cases (#1155) May 25, 2018
.coveragerc Add coveralls.io build steps to .travis.yml (#655) Aug 18, 2016
.gitattributes Hopefully make git language statistics more accurate Dec 18, 2014
.gitignore Revert part of 8793dec, fix commands, remove shippable.yml Sep 26, 2016
.isort.cfg Add config Jun 11, 2015
.sublime-settings Add sublime-settings [skip ci] Oct 25, 2015
.travis.yml switch to trusty build in travis ci and fix some test cases (#1155) May 25, 2018
CHANGELOG.md Update CHANGELOG for 3.12.2 Jan 7, 2019
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 Update to 3.12.1 Sep 17, 2018
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 Jan 7, 2019
tox.ini Revert part of 8793dec, fix commands, remove shippable.yml Sep 26, 2016


pwntools - CTF toolkit

pwntools logo

Docs PyPI Travis Coveralls Twitter MIT License

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)

Try It Now!

You can now do a live demo of Pwntools, right in your browser.


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.


Pwntools is best supported on 64-bit Ubuntu LTE releases (12.04, 14.04, and 16.04). Most functionality should work on any Posix-like distribution (Debian, Arch, FreeBSD, OSX, etc.). Python 2.7 is required.

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 python2.7 python-pip python-dev git libssl-dev libffi-dev build-essential
pip install --upgrade pip
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.




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.