NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI
PyPI, #4733 most downloaded on PyPI
Pwntools CTF framework and exploit development library.
Latest stable
4.15.0
Last release 1 years ago
12 Oct 2025
Ships fairly regularly
a new release about every 4 months
Nearly every release is documented
notes for 58 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
12 years old
122 releases · first in 2014
Drag across the ruler to compare, or tap a release to open it.
This release comes with a bunch of fixes, some new features, and a few deprecations. Thank you to every contributing their features and fixes!
This release comes with a bunch of fixes, some new features, and a few deprecations. Thank you to every contributing their features and fixes!
context.gdb_binary to specify which gdb command to use. Useful to specify e.g. pwndbg. Checkout the pwn.conf config file to set it globally. (@Ninja3047)tube.upload_manually to upload data to a shell using shell commands. Quickly upload your exploit into that kernel pwn challenge without manually typing the echo {chunk} | base64 -d >> exploit loop.asm() to speed up subsequent exploit runs. (Disable the cache using context.cache_dir = None)ELF functions run the binary internally. (Thanks to @Hackrrr who made a CTF challenge for it at Compete With Team Europe CTF 2025)Many of the CLI utilities coming with pwntools had ambiguous names and caused problems while packaging in different distributions. Most of the commands are deprecated now and print a warning suggesting to use pwn <thecommand> instead.
Only checksec, constgrep, libcdb, phd, pwnstrip, and shellcraft stay as standalone CLI scripts. The rest will be removed and only accessible through the pwn wrapper in the future.
$ debug
/home/user/.local/bin/debug:8: DeprecationWarning: The 'debug' command is deprecated and will be removed in a future version. Please use 'pwn debug' instead.
sys.exit(deprecated_main())
usage: pwn debug [-h] [-x GDBSCRIPT] [--pid PID] [-c context] [--exec EXECUTABLE] [--process PROCESS_NAME] [--sysroot SYSROOT]
tube.recvline*tube.recvline used the keepends argument to specify whether to include the trailing newline in the return value while tube.recvuntil uses drop to specify inclusion of the delimiter. The semantics are inversed for both functions causing confusion:
io.recvuntil(b'pwn', drop=True) # Don't include `pwn` at the end.
io.recvline(keepends=False) # Don't include `\n` at the end.
Since drop is a more generic name (and shorter to type), tube.recvline* accepts a drop parameter now and usage of keepends is deprecated.
The detailed changelog is as follows:
asm() by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2358tube.upload_manually to upload files in chunks by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2410--offline-only, refactor unstrip and add fetch parser for download libc-database by @the-soloist in https://github.com/Gallopsled/pwntools/pull/2478getexport shellcode by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2587gdb.attach(('0.0.0.0',12345)) by @ckxckx in https://github.com/Gallopsled/pwntools/pull/2291search_by_symbol_offsets by @the-soloist in https://github.com/Gallopsled/pwntools/pull/2413checksec output of ELF.libc when it was printed for the ELF already by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2483sni and setting server_hostname manually in remote by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2482asm on NIX by @sbancuz in https://github.com/Gallopsled/pwntools/pull/2508detect_missing_binaries function. by @chaitanyarahalkar in https://github.com/Gallopsled/pwntools/pull/2570process.libs() by @R42ccoon in https://github.com/Gallopsled/pwntools/pull/2579server tube by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2609mipsel architecture by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2612Full Changelog: https://github.com/Gallopsled/pwntools/compare/4.14.1...4.15.0
Your coding agent can read these notes before it upgrades. Set up the MCP server →
asm()ELF.close() to release resourcessearch_by_symbol_offsets in local libc-databasepwn templatechecksec output of ELF.libc when it was printed for the ELF alreadysni and setting server_hostname manually in remote--offline-only, refactor unstrip and add fetch parser for download libc-databasegdb.attach(('0.0.0.0',12345))tube.upload_manually to upload files in chunkstube.recvline*pwn template to skip Docker library extraction for statically linked binariesgetexport shellcodecolored_traceback error when TERM envvar is unsetprocess.libs() and clean up maps parsingserver tubemipsel architecturePoll before reading /proc/maps in process.libs() to avoid race condition by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2516
process.libs() to avoid race condition by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2516Full Changelog: https://github.com/Gallopsled/pwntools/compare/4.15.0beta0...4.15.0beta1
Deprecate 'keepends' argument in favor of 'drop' by @MrQubo in https://github.com/Gallopsled/pwntools/pull/2476
asm() by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2358tube.upload_manually to upload files in chunks by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2410--offline-only, refactor unstrip and add fetch parser for download libc-database by @the-soloist in https://github.com/Gallopsled/pwntools/pull/2478search_by_symbol_offsets by @the-soloist in https://github.com/Gallopsled/pwntools/pull/2413pwn template by @lcian in https://github.com/Gallopsled/pwntools/pull/2479checksec output of ELF.libc when it was printed for the ELF already by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2483sni and setting server_hostname manually in remote by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2482gdb.attach(('0.0.0.0',12345)) by @ckxckx in https://github.com/Gallopsled/pwntools/pull/2291asm on NIX by @sbancuz in https://github.com/Gallopsled/pwntools/pull/2508Full Changelog: https://github.com/Gallopsled/pwntools/compare/4.14.0beta1...4.15.0beta0
Poll before reading /proc/maps in process.libs() to avoid race condition by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2516
process.libs() to avoid race condition by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2516Full Changelog: https://github.com/Gallopsled/pwntools/compare/4.14.0...4.14.1
Return buffered data on first EOF in tube.readline() by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2376
shellcraft A + B by @cocoa-xu in https://github.com/Gallopsled/pwntools/pull/2398search_by_hash series function by @the-soloist in https://github.com/Gallopsled/pwntools/pull/2360offline_only to search_by_symbol_offsets by @the-soloist in https://github.com/Gallopsled/pwntools/pull/2388context.os to "windows" by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2330port, gdb_args, and gdbserver_args to gdb.debug() by @gfelber in https://github.com/Gallopsled/pwntools/pull/2382context.log_file and crc.BitPolynom by @marinelay in https://github.com/Gallopsled/pwntools/pull/2389pop to keys for reporting proper error message by @marinelay in https://github.com/Gallopsled/pwntools/pull/2391ssh.sftp by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2394ssh._tried_sftp in raw mode by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2396Full Changelog: https://github.com/Gallopsled/pwntools/compare/4.13.1...4.14.0
search_by_hash series functionoffline_only to search_by_symbol_offsetscontext.newline when setting context.os to "windows"context.log_file and crc.BitPolynomxorFix parsing the PLT on Windows by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2445
Full Changelog: https://github.com/Gallopsled/pwntools/compare/4.14.0beta0...4.14.0beta1
Add local libc database provider for libcdb by @the-soloist in https://github.com/Gallopsled/pwntools/pull/2356
offline_only parameter for search_by_hash series function by @the-soloist in https://github.com/Gallopsled/pwntools/pull/2360offline_only to search_by_symbol_offsets by @the-soloist in https://github.com/Gallopsled/pwntools/pull/2388context.os to "windows" by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2330port, gdb_args, and gdbserver_args to gdb.debug() by @gfelber in https://github.com/Gallopsled/pwntools/pull/2382ssh._tried_sftp in raw mode by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2396ssh.sftp by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2394context.log_file and crc.BitPolynom by @marinelay in https://github.com/Gallopsled/pwntools/pull/2389pop to keys for reporting proper error message by @marinelay in https://github.com/Gallopsled/pwntools/pull/2391Full Changelog: https://github.com/Gallopsled/pwntools/compare/4.13.0...4.14.0beta0
Fix parsing the PLT on Windows by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2445
Full Changelog: https://github.com/Gallopsled/pwntools/compare/4.13.0...4.13.1
Term module revamp: activating special handling of terminal only when necessary by @Arusekk in https://github.com/Gallopsled/pwntools/pull/2242
pwn template by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2309process instead of replacing it by @heapcrash in https://github.com/Gallopsled/pwntools/pull/1763which on Windows by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2328run_in_new_terminal by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2329ELF.stripped and ELF.debuginfo properties by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2336flatten argument to ssh.libs by @ValekoZ in https://github.com/Gallopsled/pwntools/pull/2268pwn libcdb file crashing if "/bin/sh" string was not found by @xambroz in https://github.com/Gallopsled/pwntools/pull/2307gdb.debug by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2378Full Changelog: https://github.com/Gallopsled/pwntools/compare/4.12.0...4.13.0
process instead of replacing itpwn libcdb file crashing if "/bin/sh" string was not foundpwn templatepwn template always set context.binarywhich on WindowsELF.stripped and ELF.debuginfo propertiesflatten argument to ssh.libsgdb.debugTerm module revamp: activating special handling of terminal only when necessary by @Arusekk in https://github.com/Gallopsled/pwntools/pull/2242
pwn template by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2309ELF.stripped and ELF.debuginfo properties by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2336pwn libcdb by @xambroz in https://github.com/Gallopsled/pwntools/pull/2302process instead of replacing it by @heapcrash in https://github.com/Gallopsled/pwntools/pull/1763pwn libcdb file crashing if "/bin/sh" string was not found by @xambroz in https://github.com/Gallopsled/pwntools/pull/2307pwn disasm with colored output by @vsyl in https://github.com/Gallopsled/pwntools/pull/2334which on Windows by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2328run_in_new_terminal by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2329pwn constgrep when it matches a non-constant type (Fixes #2344) by @disconnect3d in https://github.com/Gallopsled/pwntools/pull/2345flatten argument to ssh.libs by @ValekoZ in https://github.com/Gallopsled/pwntools/pull/2268Full Changelog: https://github.com/Gallopsled/pwntools/compare/4.12.0...4.13.0beta0
Replace isSet with is_set as the former is deprecated in 3.10+ by @maple3142 in https://github.com/Gallopsled/pwntools/pull/2208
--libc libc.so argument to pwn template by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2212hex command by @marcan2020 in https://github.com/Gallopsled/pwntools/pull/2117remote and listen in sagemath by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2202command -v instead of which by @whokilleddb in https://github.com/Gallopsled/pwntools/pull/1946isSet with is_set as the former is deprecated in 3.10+ by @maple3142 in https://github.com/Gallopsled/pwntools/pull/2208bytes in examples by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2240wd parameter to cwd in ssh.system and ssh.run_to_end by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2251Full Changelog: https://github.com/Gallopsled/pwntools/compare/4.11.1...4.12.0
remote and listen in sagemathhex command--libc libc.so argument to pwn template commandpwn template commandRETURN_CONST as an allowed _const_code in safeevalFix _countdown_handler not invoking timeout_change; Fix value is valu… by @TanixLu in https://github.com/Gallopsled/pwntools/pull/2287
Full Changelog: https://github.com/Gallopsled/pwntools/compare/4.12.0beta0...4.12.0beta1
Replace isSet with is_set as the former is deprecated in 3.10+ by @maple3142 in https://github.com/Gallopsled/pwntools/pull/2208
--libc libc.so argument to pwn template by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2212hex command by @marcan2020 in https://github.com/Gallopsled/pwntools/pull/2117pwn template --template <path> by @hweissi in https://github.com/Gallopsled/pwntools/pull/2257remote and listen in sagemath by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2202isSet with is_set as the former is deprecated in 3.10+ by @maple3142 in https://github.com/Gallopsled/pwntools/pull/2208command -v instead of which by @whokilleddb in https://github.com/Gallopsled/pwntools/pull/1946bytes in examples by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2240wd parameter to cwd in ssh.system and ssh.run_to_end by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2251Full Changelog: https://github.com/Gallopsled/pwntools/compare/4.11.0...4.12.0beta0
Fix _countdown_handler not invoking timeout_change; Fix value is valu… by @TanixLu in https://github.com/Gallopsled/pwntools/pull/2287
Full Changelog: https://github.com/Gallopsled/pwntools/compare/4.11.0...4.11.1
Make fmtstr module able to create payload without $ notation by @murph12F in https://github.com/Gallopsled/pwntools/pull/2185
context.newline correctly in tube.interactive() by @peace-maker in https://github.com/Gallopsled/pwntools/pull/2129download and download_file with relative paths by @goreil in https://github.com/Gallopsled/pwntools/pull/2214Full Changelog: https://github.com/Gallopsled/pwntools/compare/4.10.0...4.11.0
libcdb.search_by_symbol_offsets()ELF.nx and ELF.execstackcontext.newline correctly when typing in tube.interactive()download and download_file with relative paths[#2185][2185] make fmtstr module able to create payload without $ notation
libcdb.search_by_symbol_offsets()ELF.nx and ELF.execstackcontext.newline correctly when typing in tube.interactive()In memoriam — [Zach Riggle][zach] — long time contributor and maintainer of Pwntools.
In memoriam — Zach Riggle — long time contributor and maintainer of Pwntools.
p2align 2 asm() headers from x86-32, x86-64 and mips architectures to avoid inconsistent instruction length when patching binaries[#2062][2062] make pwn cyclic -l work with entry larger than 4 bytes
p2align 2 asm() headers from x86-32, x86-64 and mips architectures to avoid inconsistent instruction length when patching binaries[#1975][1975] Add libcdb commandline tool
js_escape() and js_unescape() to util.fiddlingtube.recvpred() timeout argument- #1975 Add libcdb commandline tool - #1979 Add js_escape() and js_unescape() to util.fiddling - #2011 Fix tube's debug output of same byte compressio
js_escape() and js_unescape() to util.fiddling- #1922 Fix logic in wait_for_debugger - #1828 libcdb: Load debug info and unstrip libc binary - #1939 Fix error in validating log levels - #1981 Fix
wait_for_debuggercyclic_find() to make it work with large int values[#1922][1922] Fix logic in wait_for_debugger
several bugfixes (#2012, #2031, #1912, #1961, #2007, #2040, #2051)
[#1733][1733] Update libc headers -> more syscalls available!
self.message and change sys.exc_type to sys.exec_info() in PwnlibExceptionavoid is bytes in python3shellcraft.*.linux.cat2, which uses alloc+read+write instead of sendfile[#1733][1733] Update libc headers -> more syscalls available!
self.message and change sys.exc_type to sys.exec_info() in PwnlibExceptionavoid is bytes in python3[#1429][1429] Add a mechanism for ret2csu (originally #1138)
ignore_config argument to pwnlib.tubes.ssh and improve allow_agent implementationprocess.readmem and process.writemem[#1902][1902] Always specify -F and -P for tmux in run_in_new_termianl
[#1429][1429] Add a mechanism for ret2csu (originally #1138)
ignore_config argument to pwnlib.tubes.ssh and improve allow_agent implementationprocess.readmem and process.writemem[#1902][1902] Always specify -F and -P for tmux in run_in_new_termianl
run_in_new_terminal[#1261][1261] Misc run_in_new_terminal improvements (notably gdb terminated by default)
run_in_new_terminal improvements (notably gdb terminated by default)env['PATH'] to find the path for the executablebaremetal os to debug binaries executed with qemu-system-$(arch)pwnlib.adb is no longer supported in CIpwn.toplevel.__all__$XDG_CONFIG_HOME dir for pwn.confatexit on Python 3- #1852 Fix atexit on Python 3
atexit on Python 3[#1261][1261] Misc run_in_new_terminal improvements (notably gdb terminated by default)
run_in_new_terminal improvements (notably gdb terminated by default)env['PATH'] to find the path for the executablebaremetal os to debug binaries executed with qemu-system-$(arch)pwnlib.adb is no longer supported in CIpwn.toplevel.__all__$XDG_CONFIG_HOME dir for pwn.conf[#1541][1541] Use context.newline for tubes by default
context.newline for tubes by defaultasm() and disasm() for MSP430, S390cyclic cli for 64 bit integerspwn template cannot download the remote filepwn shellcraft fasterpwntools/pwntools:stable etc) now use Python3 by default, and includes assemblers for a few common architecturesascii_shellcode (Fixed docs in #1693)i386 and amd64base= argument to ROP.chain() and ROP.dump()LD_PRELOAD and LD_LIBRARY_PATHrequests when doing from pwn import *__setattr__ and __call__ interfaces to ROP for setting registers- #1732 Fix shellcraft SSTI vulnerability (first major pwntools vuln!)
Fix syscall instruction lists for SROP on i386 and amd64
context.newline for tubes by defaultasm() and disasm() for MSP430, S390cyclic cli for 64 bit integerspwn template cannot download the remote filepwn shellcraft fasterpwntools/pwntools:stable etc) now use Python3 by default, and includes assemblers for a few common architecturesascii_shellcode (Fixed docs in #1693)i386 and amd64base= argument to ROP.chain() and ROP.dump()LD_PRELOAD and LD_LIBRARY_PATHrequests when doing from pwn import *__setattr__ and __call__ interfaces to ROP for setting registers- #1732 Fix shellcraft SSTI vulnerability (first major pwntools vuln!)
Take numbwritten bytes into account in FmtString
executable= argument to ELF.searchjmp_esp/jmp_rsp attribute to ROPpwn templatepwn version command line toolfiddling.hexdump a way to suppress the total at the end--password for pwn templateasm() and disasm() for PowerPC64, MIPS64, Sparc64executable= argument to ELF.searchjmp_esp/jmp_rsp attribute to ROPpwn templatepwn version command line toolfiddling.hexdump a way to suppress the total at the end--password for pwn templatecyclic cli for 64 bit integersasm() and disasm() for PowerPC64, MIPS64, Sparc64Take numbwritten bytes into account in FmtString
executable= argument to ELF.searchjmp_esp/jmp_rsp attribute to ROPpwn templatepwn version command line toolfiddling.hexdump a way to suppress the total at the end--password for pwn templateasm() and disasm() for PowerPC64, MIPS64, Sparc64Nothing published for this version
#1625 GDB now properly loads executables with QEMU
#1625 GDB now properly loads executables with QEMU
[#1436][1436] Add ret2dlresolve automation
[fecf9f] tubes.ssh.process() no longer requires python 2 installed on remote (still requires python, though)
[#1615][1615] Fix aarch64 pushstr and pushstr_array
Nothing published for this version
[#1517][1517] flat(..., filler=) is fixed for str values and Python2 bytes
str values and Python2 bytes[#1698][1609] Fix issues in packing.flat with mis-ordred fields
packing.flat with mis-ordred fields[#1590][1590] Fix gdb.attach() for remote, listen, ssh tubes
Pwntools requires six v.1.12.0 or higher
six v.1.12.0 or higherFix PLT resolution by locking unicorn <1.0.2rc4
- #1316 Fix connect shellcraft in python 3 - #1323 Fix issues related with debugging - #1001 Enhance unlock_bootloader with better status messages - #
unlock_bootloader with better status messages- #1316 Fix connect shellcraft in python 3 - #1323 Fix issues related with debugging - #1001 Enhance unlock_bootloader with better status messages - #
unlock_bootloader with better status messagesBypass unicorn-engine/unicorn#1100 and unicorn-engine/unicorn#1170 requiring unstable package
recvline_pred() and similar do not reorder data[76413f][76413f] Add pwnlib.adb.bootimg for 'ANDROID!' format boot.img images
context.encodingcontext.encoding[76413f][76413f] Add pwnlib.adb.bootimg for 'ANDROID!' format boot.img images
context.encoding- #1204 Reduce ROP cache filename length - #1175 Fix nested SSH connectors - #1355 Fix 'break' syscall - #1277 Fix timeout parameter passing in sendli
Nothing published for this version
[#1242][1242] Use IntervalTree 2.xx, disallow use of 3.xx
[#1198][1198] More compatibility fixes for pyelftools==0.25, and pin Sphinx<1.8.0 since it causes testing errors
/proc/.../statusint and syscall instructionsprocess tubes/proc/.../statusint and syscall instructionsprocess tubesDynELF.dump() for dumping remote ELF filescontext.os via context.binary, useful for Android exploitationpidof on Androidflat() and fit() are now the same function[#1083][1083] Better error messages for gdb when LD_PRELOAD is incorrect
gdb when LD_PRELOAD is incorrectBOOTLDR! imagesrun_in_new_terminalpwntools-gdb wrapper script instead of gdbpwnlib.tubes.server module, which adds a reusable server listenerfit(), allowing dynamic contents to be injected. (This feature is really cool, check out the pull request!)gdb when LD_PRELOAD is incorrectBOOTLDR! imagesrun_in_new_terminalpwntools-gdb wrapper script instead of gdbpwnlib.tubes.server module, which adds a reusable server listenerfit(), allowing dynamic contents to be injected. (This feature is really cool, check out the pull request!)Nothing published for this version
One column per quarter.