23 Commits
Author SHA1 Message Date
RocketDev 5161b5ef23 Cleanup Python 2 legacy (#2680)
* Cleanup Python 2 legacy

* chore: update changelog
2026-02-20 10:48:42 +01:00
peace-maker f28d3ebb6c Test Python version >= 3.10 in CI and fix tests on Python 3.12 (#2486)
* Bump tested python version to >= 3.10

Some workflows were using 3.8 still. Start testing on 3.12 too.

* Fix installing rpyc in CI on ubuntu 24.04

`ubuntu-latest` now points to 24.04 which requires the --break-system-packages dance.

* Test Python 2 on Ubuntu 22.04

Ubuntu 24.04 dropped the python2.7 packages.

* Test on android-34

* Fix ARM binutils disassembly output test expectation

It used to print "; 0x4" but changed to "@ 0x4" in some version.

* Skip QEMU LD_PREFIX path test

Ubuntu 24.04 seemed to have switched the qemu-user --help output to show `/usr/gnemul/qemu-$ARCH` instead of `/etc/qemu-binfmt`. Ignore the actual path in the test.

* Fix x86 ascii shellcode encoder test

The alphabet was using `\` escape sequences badly.

<stdin>:1: SyntaxWarning: invalid escape sequence '\]'

* Fix mips xor encoder unaligned memory access

qemu throws a SIGBUS error when the shellcode tries to access unaligned memory since some version. Align the "stack" properly.

* Fix util.lists.partition test output on Python 3.12

The __repr__ output of OrderedDict was changed to look like ordinary {} dicts.

* Fix safeeval test on Python 3.12

There is a 151 RESUME opcode in Python 3.12 now.

* Fix registering commandline subparsers multiple times for Python 3.11

Python 3.11 added a sanity check to argparse to prevent registering the same subparser multiple times.

argparse.ArgumentError: argument command: conflicting subparser: cyclic

Avoid importing the command twice.
`python -m pwnlib.commandline.cyclic` failed on Python 3.11 triggered in CI when running the commandline tools while collecting coverage.

* Fix pip cache in CI
2024-10-12 17:48:12 +02:00
Michal AmbrozandPeace-Maker 4ef4746243 Remove python2 shebang lines from commandline tools (#2301)
* remove python2 shabangs

* Remove execute bit from commandline implementation

---------

Co-authored-by: Peace-Maker <[email protected]>
2023-11-24 13:37:29 +01:00
Arusekk 4b196c7d96 Cleanup unconditional imports (#1753)
* Cleanup unconditional imports

This may aid #1725

* Import explicitly

* Add good ol' SIGALRM-based debugs for tests

* Fix py2 GDB tests somehow

XXX: see why this matters

* Update CHANGELOG.md
2021-04-29 11:23:09 +02:00
Heap Crash aa7b6f77a5 Add description= to subcommand parsers (#1814)
The help= does not show up in docs.pwntools.com, but description= does.
2021-02-24 04:16:42 -05:00
Arusekk c117ec436a Further cleanup 2018-12-01 14:49:57 +01:00
Arusekk ada8a9bdd0 CLI and GDB fixes 2018-11-10 22:32:42 +01:00
Arusekk 3d03a75975 Replace division with floor division as of PEP-238 (#1135)
* Replace division with floor division as of PEP-238

This will also get us closer to python3.
See https://www.python.org/dev/peps/pep-0238/

* Add from __future__ import division to source files
2018-04-11 09:42:34 -07:00
Zach Riggle 81239be429 Fix checksec nx, execstack, relro reporting (#904)
* Fix checksec nx, execstack, relro reporting

Also add a disable_nx function

* Add disablenx command-line utility

Also fix bug where invoking command-line utilities directly by module name
(python -m pwnlib.commandline.foo) would fail
2017-02-16 17:20:28 -05:00
Zach Riggle 62842e20f0 Make command-line tools work better 2017-01-29 18:50:46 -05:00
Zach Riggle 1d59a90fa8 Change all imports to absolute per PEP-328, and sort imports (#832) 2017-01-03 18:04:45 -05: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
Zach Riggle 322942f2d3 Fix elfpatch so it doesnt spew logging info 2016-05-21 22:15:25 -07:00
Zach Riggle 339c71abbd sorted imports with isort 2015-02-05 04:48:25 -08:00
Zach Riggle f6e90df62a Revert "Rename "pwn" to "binjitsu""
This reverts commit 8bbaa14afe.
2015-01-31 23:58:16 -08:00
Zach Riggle 8bbaa14afe Rename "pwn" to "binjitsu" 2015-01-31 20:37:58 -08:00
Zach Riggle 57de045db5 Use "from pwn import *" in command-line utilities, and shovel all the context information through a single handler 2015-01-25 21:38:23 -08:00
Morten Brøns-Pedersen d0793c4fac bugfix: command line tools now installs a log handler 2015-01-11 11:51:45 +01:00
Zach Riggle ca4b7263f8 Remove the executable bit from things that aren't scripts 2015-01-04 15:05:56 -08:00
Mathias Svensson 7d97c1c82a Another import cleanup 2015-01-02 19:52:02 +01:00
Zach Riggle 35ef5589b6 Remove tabs 2014-12-30 11:10:01 -05:00
Zach Riggle b06998a740 Break commit into two parts for proper rename tracking 2014-12-26 17:29:58 -05:00
Zach Riggle 46db5ee48a Enable autogeneration of command-line tool documentation from the help output. In order to achieve this, we move from having a "bin" directory to using the "entry_points" mechanism. 2014-12-26 17:29:54 -05:00