51 Commits
Author SHA1 Message Date
RocketDev bf68cc1e36 Refactor zsh completion script and deprecate -e in pwn asm (#2689)
* refactor: optimize completion script

And deprecate an interface

* chore: update changelog

* refactor: full patch of zsh comp script

* fix: add missing message in output

* fix: a typo and a missing help

* feat: allow -l to match multiple arguments

* feat: optimize completion logic

1. move all complicated functions in front of pwn()
2. add file completion for libcdb subcommands
3. add completion for pwn errno
2026-04-29 07:29:49 +02:00
Peace-Maker a8c89fd34c Regenerate zsh autocompletion
`python zargparse.py ../pwntools/pwnlib/commandline/main.py`
2026-02-21 14:39:58 +01:00
d8b4927993 fix: fixed checksec auto complete (#2665)
Co-authored-by: deciphr <[email protected]>
Co-authored-by: peace-maker <[email protected]>
2026-01-20 16:57:48 +01:00
Lê Nam Khánh 3525980677 Fix typos in some files (#2648) 2025-11-06 23:26:06 +01:00
Peace-Maker 50b4343cd4 Merge branch 'beta' into dev 2025-09-16 22:05:15 +02:00
peace-maker 359aa51f5f Remove "ubuntu" user in base Docker image (#2620)
The ubuntu/24.04 image contains a default user "ubuntu" with uid 1000.
We add our own "pwntools" user which has uid 1001 now causing mismatches
with the default host uid of 1000 for the bind-mounts in the develop/testing image.

https://bugs.launchpad.net/cloud-images/+bug/2005129
2025-09-14 22:18:11 +02:00
peace-makerandArusekk 48ea09b27f Fix lookup of binutils for mipsel architecture (#2612)
* Fix lookup of binutils for `mipsel` architecture

The endianness is encoded in the architecture name for mips targets which wasn't respected while looking for the correct binutils binary.

Sync the CI and Dockerfile binutils packages while we're at it.

Fixes #2591

* Update CHANGELOG

* still fall back to the other endianness

---------

Co-authored-by: Arusekk <[email protected]>
2025-09-11 13:09:28 +00:00
peace-maker e25347743b Don't upgrade pip anymore and --break-system-packages (#2537)
Pip doesn't have a RECORD file anymore and fails to uninstall / upgrade
on latest Ubuntu now. --force-reinstall on pwntools causes pip to
upgrade too since it's in our dependencies, which fails too.
As a workaround uninstall pwntools manually before upgrading.
2025-03-17 00:03:44 +01:00
xtex 3eb690bd38 Initial LoongArch64 support (#2529)
Signed-off-by: Bingwu Zhang <[email protected]>
2025-01-29 14:02:10 +01:00
peace-maker 6748a7801d Drop Python 2.7 support / Require Python 3.10 (#2519)
* Drop Python 2.7 support / Require Python 3.10

Only test on Python 3 and bump minimal required python version to 3.10.

* Update CHANGELOG

* Allow to install on Python 3.4

* State intend to not artifially raise the required Python version
2025-01-26 22:11:07 +01:00
Pratik Raj 14c0d73f89 feat : use --no-cache-dir flag to pip in dockerfiles to save space (#2357)
using the "--no-cache-dir" flag in pip install, make sure downloaded packages by pip don't cache on the system. This is a best practice that makes sure to fetch from a repo instead of using a local cached one. Further, in the case of Docker Containers, by restricting caching, we can reduce image size. In terms of stats, it depends upon the number of python packages multiplied by their respective size. e.g for heavy packages with a lot of dependencies it reduces a lot by don't cache pip packages.

Further, more detailed information can be found at

https://medium.com/sciforce/strategies-of-docker-images-optimization-2ca9cc5719b6

Signed-off-by: Pratik Raj <[email protected]>
2024-03-07 13:38:36 +01:00
Arusekk d643a33233 Merge branch 'stable' into beta 2023-11-14 19:47:35 +01:00
peace-maker 8d6dc0b121 Python 2: Fix installing from source (#2298)
* Python 2: Fix installing from source

`python2.7 -m pip install git+https://github.com...`  doesn't install
any packages.

The auto-discovery doesn't work for the old setuptools version used in
Python 2.
https://setuptools.pypa.io/en/latest/userguide/package_discovery.html#flat-layout

* Use Python 3 commandline tools in Docker images

Since the Python 2 version was installed first, the Python 3 install
didn't touch the existing shell script wrapper files.
2023-11-14 19:44:05 +01:00
peace-maker b8b29e1cc7 Fix pushing docker images on manual workflow run (#2250)
* Fix pushing docker images on manual workflow run

Running the docker workflow manually would associate the run with the
`dev` branch. The generated tags would all point to the `dev` tag, so
tag the image manually to the correct branch.

* Fix building ci image

It's called `python2.7` instead of `python`.

* Add riscv64 binutils to base image
2023-07-30 17:49:54 +02:00
Patryk KrawaczyńskiandArusekk 6a9f78ac46 Upgrade to Ubuntu Focal 20.04 LTS (#2118)
* Update Dockerfile

* Move to Ubuntu Jammy 22.04 and keep python2.7

* Apparently Debian intentionally broke ensurepip

Co-authored-by: Arusekk <[email protected]>
2022-12-29 13:08:23 +01:00
peace-maker 188632cd96 Fix docker image building and local testing (#2146)
The base image was missing the patchelf utility and the develop image
didn't update the apt cache. That caused building the image to fail when
pulling the outdated pwntools:base image from dockerhub.
The docker Makefile was using an invalid `-depth 1` argument which appear
to have been replaced by `-mindepth` and `-maxdepth` arguments recently.

The testing container is based on the develop image's Dockerfile which
copies new files into the container. Grab them from the appropriate folder.
pwndbg was installed twice when running the testing container for the
doctests.
2022-12-29 00:55:39 +01:00
peace-makerandArusekk 92911cbabd libcdb: Load debug info and unstrip libc binary (#1828)
* libcdb: Load debug info and unstrip libc binary

The debug info is obtained from a debuginfod server maintained by systemtap.org. elfutils is used to unstrip the binary and merge the debug info back.

Try to unstrip every libc binary downloaded by the libcdb module by default. #1818

* Install elfutils on CI

* Update CHANGELOG.md

* Add more tests

* Fix negative test

* Raise an exception when eu-unstrip fails

This will hopefully get logged during doctests.

* Install elfutils 0.181 from groovy

Use APT Pinning to select the newer elfutils version from groovy instead of the buggy 0.176 version available in focal.

* Fix missing import of requests

pylint?

Co-authored-by: Arusekk <[email protected]>
2021-10-03 10:51:30 +02:00
Heap Crash e3a5ac5818 Dockerfile changes for quality-of-life with "make develop" (#1905)
* [docker:develop] Use zsh by default, enable sharing host history file

* [docker] Simplify makefile and break up develop command into second rule

* [docker:develop] Use zsh by default 2

* [docker:develop] Add ipdb, ipython, vim, and pwndbg

* [docker:buster] Add buster Dockerfile for testing #1899

* [docker:develop] Add pwn autocomplete

* [docker:develop] Add ipython configuration
2021-05-31 15:31:22 -05:00
Heap Crash 0aa1a231c3 Add bash autocompletion (#1904)
* Add bash autocompletion

* Update CHANGELOG
2021-05-30 19:32:28 -05:00
Heap Crash d991c898ac Add zsh completion (#1903)
* Add zsh completion

* Update CHANGELOG
2021-05-30 19:28:05 -05:00
Heap Crash ca4eeaa196 [docker] Update base image to use UTF-8 and also install tmux (#1900) 2021-05-30 17:47:38 -05:00
Heap Crash 8a6383a55d Refactor dockerfiles for simplicity (#1786)
* Remove likely-unused Dockerfiles, which are not being supported in the future anyway

This leaves base, stable, beta, and dev as the only Dockerfile images

Simplify extra/Docker so that Pwntools is already checked out, and build precedence works

* Base image always gets built first
* Branch-tracking Dockerfiles now require base to be built
* Use locally-checked-out-repo instead of e.g. git+https://github.com/Gallopsled/pwntools@beta
* Install tested with both Python2 and Python3
* Add Python3 user-script directory to $PATH

Update CHANGELOG with Docker changes

Add develop to Makefile, restore old Dockerfiles

Make development target separate, and automatically launch "docker run -it" with suggested arguments

Add develop Dockerfile

* Add README for the Dockerfiles

* Merge dependencies, add NOPASSWD, use hostname localhost to avoid sudo errors

* Better Dockerfile for testing, working on making all of the tests work

* wip

* WORK-IN-PROGRESS

* Remove from pwn import *

* Fix incorrect usage of progress() in SSH

* WIPWIPWIP

* MORE WIP

* [srop] Fix SROP unit tests by allocating enough stack

* [todo] Test canary in MIPS pushstr to make sure tests are actually being run

* [ROP] Make ROP doctests work from Docker and more minimal

* [srop] Simplify SROP imports

* [mips] Simplify MIPS doctest imports

* [corefile] Handle race condition against kernel / qemu

* [web] Handle file permission failure in Docker

* [core] Actually implement timeout

* Revert "[corefile] Handle race condition against kernel / qemu"

This reverts commit e02a3dce19.

* [context] Handle file permission issue in Docker

* [aarch64] Just run the shellcode, dont dump it out

* [tests] Remove test canary from mips pushstr

* [timeout] Use ELLIPSIS for time-flaky tests

* [update] Remove DONT_CHECK_FOR_UPDATES

* [context] Handle another path access error in Docker

* [timeout] Just leave it the way it was, hardly ever fails

* [context] Fix broken test because of quotes

* WIP save Docker stuff just in case

* [mips] Do not replace "asm" in the global scope with doctest

* Clear context between invocations so we dont end up with e.g. 64-bit i386

* [process] Fix timeout to actually work

* [mips] Do not replace "asm" in the global scope with doctest (Part 2)

* [rop] Fix ROP doctests

* [mips] Do not replace "asm" in the global scope with doctest (Part 3)

* Re-add all of the Py2OutputChecker stuff so I can start testing Python2

* Restore libcdb checks

* Tests work on Python2 now with "make -C travis/docker doctest2"

* Handle issue caught by Pylint

* Install pwndbg for the pwntools user

* Add trailing newline

* Remove un-necessary ELLIPSIS

* Add trailing newline

* Convert assert to simple statement

* This is an empty commit for testing webhook integrations

* [travis] Use bash as the default shell

* Commit compiled Dockerfile for use on hub.docker.com

* [gdb] Restore gdb.rst and manually disable doctests from inside Docker container
2021-02-25 11:34:56 +01:00
Heap Crash 2086a31954 Re-add Python2 to the various Dockerfiles (#1780)
* Re-add Python2 to the various Dockerfiles

This fixes #1774

* Update CHANGELOG
2021-02-02 06:05:29 -06:00
Heap Crash 4c390c04d6 [docker] It looks like the symlink was breaking the "base" build, so replace it with the actual file from the Xenial subdirectory (#1768)
Fixes regression introduced in ddf5cdc
2021-01-16 17:39:33 -06:00
Heap Crash 9e0aa3200c [docker] Upgrade Docker images of Pwntools to use Python3 (#1654)
* [docker] Upgrade Docker images of Pwntools to use Python3

Also installs qemu-user-static and various binutils packages for building (binutils)
and running (qemu) cross-arch binaries.

Fixes #1500

* Update CHANGELOG

* Switch to Python3 for stable/beta/dev Docker images

* [changelog] Add missing links
2020-07-29 23:56:06 -05:00
heapcrash ddf5cdcb3f [docker] Update Docker images to use Bionic 2020-06-22 22:23:58 -05:00
kpcyrd c3c06a3486 Docker: Kill 14 layers in pwntools base images (#1202)
* Docker: Kill 14 layers in pwntools base images

* Docker: Update line wrapping
2018-10-04 13:50:35 -05:00
Zach Riggle 3cbc527deb Update Makefile and generated Makefiles 2017-05-25 14:51:09 -05:00
Zach Riggle 1482fb7545 Add base configuration 2017-05-25 14:48:09 -05:00
Zach Riggle 7ed6f5fe6b Make pwntools:stable depend on pwntools:base 2017-05-25 14:47:36 -05:00
Zach Riggle ff08a859f8 Docker: Install unprivileged user pwntools, use correct tags 2017-01-26 16:03:26 -05:00
Zach Riggle ba24b440c5 Convert symlink to actual file, since Docker Hub doesnt like symlinks 2017-01-26 14:40:34 -05:00
Zach Riggle b31adf27d0 Update dockerfiles and add various distros / release versions 2017-01-26 14:04:37 -05:00
Zach Riggle 7695acc798 Fix bash completion regression (#772)
Fixes Gallopsled/pwntools#767
2016-10-18 22:17:31 +02:00
Zach Riggle 66e41bd862 Refactor command-line tools to use a single "pwn" entry point.
Adds an install-time option to disable legacy commands, and only use 'pwn':

  $ pip install --install-option='--only-use-pwn-command'

Documentation is updated to show 'pwn' entry point and sub-commands.

Fixes #404
Fixes #660
2016-08-28 11:46:09 -07:00
Mathias Svensson 16de5ec22c Fix a lot of documentation (#675) 2016-08-22 13:11:50 -07:00
Zach Riggle 33cdabf0ab Replace project name references 2016-06-30 02:28:42 +02:00
Zach Riggle d4e42f86d0 Replace binjitsu/binjitsu with Gallopsled/pwntools 2016-06-30 02:26:22 +02:00
David Manouchehri 01e5057b05 libffi-dev is required. 2016-05-18 01:04:43 +00:00
David Manouchehri 8958123e3e Use Trusty. 2016-05-17 22:31:06 +00:00
Zach Riggle ffe2e7cf1f Pwndbg and its depenencies should not be in the Binjitsu dockerfile 2016-05-16 22:41:50 -07:00
Zach Riggle c1e3d26d29 Add Unicorn, dependencies, tabs->spaces 2016-03-25 18:21:31 -04:00
Zach Riggle 669c963290 Fix typo in Dockerfile 2016-03-16 06:15:59 -07:00
Zach Riggle d3074011d6 Update Dockerfile 2016-03-10 15:59:55 -05:00
Zach Riggle 03b8eb8694 Update Dockerfile 2016-03-10 15:58:25 -05:00
Zach Riggle f12253e34d Add dockerfile 2015-08-31 03:53:31 -04:00
Zach Riggle 8c1565ae3e Update README.md 2015-07-13 20:12:02 -04:00
Zach Riggle d1a70dc0fb Add screenshot 2015-07-13 20:10:35 -04:00
Zach Riggle 48a1cc72b0 Create README.md 2015-07-13 20:07:09 -04:00
Zach Riggle 2078c1dca6 Add TextMate / Sublime Text language bundles 2015-06-17 02:43:10 -04:00