* 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
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
* 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]>
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.
* 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
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]>
* 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.
* 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
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.
* 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]>
* 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
* [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
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#404Fixes#660