Skip to content

zizihacker/pwntools

 
 

Repository files navigation

pwntools - CTF toolkit

Docs latest Docs 2.1.3 PyPI Gittip

This is the CTF framework used by Gallopsled in every CTF.

Most code is inside the pwnlib folder with some functionality inside pwn or bin. It is typically used as:

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

# EXPLOIT HERE

However we have made command-line frontends for some of the functionality in pwnlib. These are:

  • asm/disasm: Small wrapper for various assemblers.
  • constgrep: Tool for finding constants defined in header files.
  • cyclic: De Bruijn sequence generator and lookup tool.
  • hex/unhex: Command line tools for doing common hexing/unhexing operations.
  • shellcraft: Frontend to our shellcode.
  • phd: Replacement for hexdump with colors.

Documentation

Our documentation is available at http://pwntools.readthedocs.org/

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

Installation

Pwntools is available as a pip package. You can install it and dependencies with a single command:

pip2 install pwntools

Alternatively if you prefer to use the latest version from the repository:

git clone https://github.com/Gallopsled/pwntools
cd pwntools
pip2 install -r requirements.txt
PWN=$(realpath .)
export PATH="$PWN/bin:$PATH"
export PYTHONPATH="$PWN:$PYTHONPATH"

If you want to make these settings permanent:

>>~/.bashrc cat <<EOF
# Set up path for Pwntools
export PATH="$PWN/bin:\$PATH"
export PYTHONPATH="$PWN:\$PYTHONPATH"
EOF

Contact

If you have any questions not worthy of a bug report, feel free to join us at #gallopsled on Freenode and ask away.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 50.5%
  • Python 47.1%
  • Assembly 1.7%
  • Makefile 0.4%
  • Objective-C 0.2%
  • Shell 0.1%