Skip to content

Commit 0510e30

Browse files
authored
Merge branch 'stable' into fix_missing_start_symbol
2 parents ba08317 + aeb4c26 commit 0510e30

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+6108
-343
lines changed

.github/workflows/android.yml

+18-8
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,21 @@ jobs:
66
android-test:
77
strategy:
88
matrix:
9-
python-version: [3.8]
9+
python-version: ['3.10']
1010
os: [ubuntu-latest]
1111
runs-on: ${{ matrix.os }}
1212
timeout-minutes: 30
1313
steps:
1414
- uses: actions/checkout@v4
1515

16-
- name: Cache for pip
17-
uses: actions/cache@v4
18-
id: cache-pip
19-
with:
20-
path: ~/.cache/pip
21-
key: ${{ matrix.os }}-cache-pip
22-
2316
- name: Set up Python ${{ matrix.python-version }}
2417
uses: actions/setup-python@v5
2518
with:
2619
python-version: ${{ matrix.python-version }}
20+
cache: 'pip'
21+
cache-dependency-path: |
22+
**/pyproject.toml
23+
**/requirements*.txt
2724
2825
- name: Install Linux dependencies
2926
run: |
@@ -35,6 +32,19 @@ jobs:
3532
binutils-arm-linux-gnueabihf \
3633
libc6-dbg
3734
35+
- name: Cache for avd
36+
uses: actions/cache@v4
37+
id: cache-avd
38+
with:
39+
path: |
40+
~/.android
41+
/usr/local/lib/android/sdk/emulator
42+
/usr/local/lib/android/sdk/platform-tools
43+
/usr/local/lib/android/sdk/system-images
44+
key: ${{ matrix.os }}-cache-avd-${{ hashFiles('travis/setup_avd*.sh') }}
45+
restore-keys: |
46+
${{ matrix.os }}-cache-avd-
47+
3848
- name: Install Android AVD
3949
run: |
4050
sudo usermod -aG kvm $USER

.github/workflows/ci.yml

+26-6
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ jobs:
55
test:
66
strategy:
77
matrix:
8-
python_version: ['2.7', '3.10']
8+
python_version: ['3.10', '3.12']
99
os: [ubuntu-latest]
10+
include:
11+
- python_version: '2.7'
12+
os: ubuntu-22.04
1013
runs-on: ${{ matrix.os }}
1114
timeout-minutes: 30
1215
steps:
@@ -21,23 +24,30 @@ jobs:
2124
2225
- name: Install RPyC for gdb
2326
run: |
24-
# The version packaged in python3-rpyc is too old on Ubuntu 22.04
27+
# The version packaged in python3-rpyc is too old on Ubuntu 24.04
28+
# We use ^6.0 from pip.
2529
sudo apt-get update && sudo apt-get install -y python3-pip gdb gdbserver
26-
/usr/bin/python -m pip install rpyc
30+
/usr/bin/python -m pip install --break-system-packages rpyc || /usr/bin/python -m pip install rpyc
2731
gdb --batch --quiet --nx --nh --ex 'py import rpyc; print(rpyc.version.version)'
2832
2933
- name: Cache for pip
3034
uses: actions/cache@v4
35+
if: matrix.python_version == '2.7'
3136
id: cache-pip
3237
with:
3338
path: ~/.cache/pip
34-
key: ${{ matrix.os }}-cache-pip
39+
key: ${{ matrix.os }}-${{ matrix.python_version }}-cache-pip-${{ hashFiles('**/pyproject.toml', '**/requirements*.txt') }}
40+
restore-keys: ${{ matrix.os }}-${{ matrix.python_version }}-cache-pip-
3541

3642
- name: Set up Python ${{ matrix.python_version }}
3743
if: matrix.python_version != '2.7'
3844
uses: actions/setup-python@v5
3945
with:
4046
python-version: ${{ matrix.python_version }}
47+
cache: 'pip'
48+
cache-dependency-path: |
49+
**/pyproject.toml
50+
**/requirements*.txt
4151
4252
- name: Set up Python 2.7
4353
if: matrix.python_version == '2.7'
@@ -78,6 +88,7 @@ jobs:
7888
binutils-powerpc-linux-gnu \
7989
binutils-s390x-linux-gnu \
8090
binutils-sparc64-linux-gnu \
91+
binutils-riscv64-linux-gnu \
8192
gcc-multilib \
8293
libc6-dbg \
8394
elfutils \
@@ -149,11 +160,18 @@ jobs:
149160
pwn shellcraft --list |tail
150161
pwn shellcraft -l --syscalls |tail
151162
pwn shellcraft -l execve
163+
pwn shellcraft -l execve + exit
152164
pwn shellcraft --show i386.linux.loader_append
165+
pwn shellcraft --show i386.linux.loader_append + i386.linux.sh
153166
pwn shellcraft -f asm --color amd64.linux.sh
167+
pwn shellcraft -f asm --color amd64.linux.setreuid + amd64.linux.cat /etc/passwd
168+
pwn shellcraft -f asm --color amd64.linux.setreuid = amd64.linux.cat /key+secret --delim =
154169
pwn shellcraft -f elf amd64.linux.syscalls.exit 0 </dev/null |pwn hex
170+
pwn shellcraft -f elf amd64.linux.cat /etc/passwd + amd64.linux.syscalls.exit 0 </dev/null |pwn hex
155171
pwn shellcraft -f i --color amd64.linux.cat /etc/passwd </dev/null
172+
pwn shellcraft -f i --color amd64.linux.cat /etc/passwd + amd64.linux.sh </dev/null
156173
pwn shellcraft -f c amd64.linux.syscalls.exit 0 </dev/null
174+
pwn shellcraft -f c amd64.linux.cat /etc/passwd + amd64.linux.syscalls.exit 0 </dev/null
157175
pwn shellcraft -f str aarch64.linux.sh </dev/null
158176
pwn shellcraft -abr -f elf -o /dev/null amd64.linux.cat /etc/passwd </dev/null
159177
pwn shellcraft -nzr thumb.linux.syscalls.execve /bin/cat '["/bin/cat", "/etc/os-release"]' </dev/null
@@ -195,15 +213,17 @@ jobs:
195213
python -m build
196214
197215
- uses: actions/upload-artifact@v4
198-
if: matrix.python_version != '2.7'
216+
if: matrix.python_version == '3.10'
199217
with:
200218
name: packages
201219
path: dist/
220+
include-hidden-files: true
202221

203222
- uses: actions/upload-artifact@v4
204223
with:
205224
name: coverage-${{ matrix.python_version }}
206225
path: .coverage*
226+
include-hidden-files: true
207227

208228

209229
upload-coverage:
@@ -221,7 +241,7 @@ jobs:
221241

222242
- name: Install coveralls
223243
run: |
224-
pip install tomli coveralls
244+
pip install --break-system-packages tomli coveralls || pip install tomli coveralls
225245
226246
- name: Upload coverage to coveralls.io
227247
run: |

.github/workflows/docker.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -22,31 +22,31 @@ jobs:
2222
password: ${{ secrets.DOCKERHUB_PASSWORD }}
2323

2424
- name: Build and push base image
25-
uses: docker/build-push-action@v5
25+
uses: docker/build-push-action@v6
2626
if: github.event_name == 'workflow_dispatch'
2727
with:
2828
context: "{{defaultContext}}:extra/docker/base"
2929
push: true
3030
tags: pwntools/pwntools:base
3131

3232
- name: Build and push stable image
33-
uses: docker/build-push-action@v5
33+
uses: docker/build-push-action@v6
3434
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/stable')
3535
with:
3636
context: "{{defaultContext}}:extra/docker/stable"
3737
push: true
3838
tags: pwntools/pwntools:stable
3939

4040
- name: Build and push beta image
41-
uses: docker/build-push-action@v5
41+
uses: docker/build-push-action@v6
4242
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/beta')
4343
with:
4444
context: "{{defaultContext}}:extra/docker/beta"
4545
push: true
4646
tags: pwntools/pwntools:beta
4747

4848
- name: Build and push dev image
49-
uses: docker/build-push-action@v5
49+
uses: docker/build-push-action@v6
5050
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/dev')
5151
with:
5252
context: "{{defaultContext}}:extra/docker/dev"
@@ -56,7 +56,7 @@ jobs:
5656
pwntools/pwntools:latest
5757
5858
- name: Build and push ci image
59-
uses: docker/build-push-action@v5
59+
uses: docker/build-push-action@v6
6060
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/dev')
6161
with:
6262
context: "{{defaultContext}}:travis/docker"

.github/workflows/lint.yml

+5-7
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,21 @@ jobs:
55
lint:
66
strategy:
77
matrix:
8-
python-version: [3.8]
8+
python-version: ['3.10']
99
os: [ubuntu-latest]
1010
runs-on: ${{ matrix.os }}
1111
timeout-minutes: 30
1212
steps:
1313
- uses: actions/checkout@v4
14-
- name: Cache for pip
15-
uses: actions/cache@v4
16-
id: cache-pip
17-
with:
18-
path: ~/.cache/pip
19-
key: ${{ matrix.os }}-cache-pip
2014

2115
- name: Set up Python ${{ matrix.python-version }}
2216
uses: actions/setup-python@v5
2317
with:
2418
python-version: ${{ matrix.python-version }}
19+
cache: 'pip'
20+
cache-dependency-path: |
21+
**/pyproject.toml
22+
**/requirements*.txt
2523
2624
- name: Critical lint
2725
run: |

.github/workflows/pylint.yml

+5-7
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,21 @@ jobs:
55
build:
66
strategy:
77
matrix:
8-
python-version: [3.8]
8+
python-version: ['3.10']
99
os: [ubuntu-latest]
1010
runs-on: ${{ matrix.os }}
1111
timeout-minutes: 30
1212
steps:
1313
- uses: actions/checkout@v4
14-
- name: Cache for pip
15-
uses: actions/cache@v4
16-
id: cache-pip
17-
with:
18-
path: ~/.cache/pip
19-
key: ${{ matrix.os }}-cache-pip
2014

2115
- name: Set up Python ${{ matrix.python-version }}
2216
uses: actions/setup-python@v5
2317
with:
2418
python-version: ${{ matrix.python-version }}
19+
cache: 'pip'
20+
cache-dependency-path: |
21+
**/pyproject.toml
22+
**/requirements*.txt
2523
2624
- name: PyLint
2725
run: |

.readthedocs.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ version: 2
55
build:
66
os: ubuntu-22.04
77
tools:
8-
python: "3"
8+
python: "3.12"
99

1010
sphinx:
1111
configuration: docs/source/conf.py

CHANGELOG.md

+63-9
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ The table below shows which release corresponds to each branch, and what date th
99

1010
| Version | Branch | Release Date |
1111
| ---------------- | -------- | ---------------------- |
12-
| [4.15.0](#4150-dev) | `dev` |
13-
| [4.14.0](#4140-beta) | `beta` |
14-
| [4.13.0](#4130-stable) | `stable` | Aug 12, 2024
12+
| [5.0.0](#500-dev) | `dev` |
13+
| [4.15.0](#4150-beta) | `beta` |
14+
| [4.14.0](#4140-stable) | `stable` | Jan 15, 2025
15+
| [4.13.1](#4131) | | Sep 29, 2024
16+
| [4.13.0](#4130) | | Aug 12, 2024
1517
| [4.12.0](#4120) | | Feb 22, 2024
1618
| [4.11.1](#4111) | | Nov 14, 2023
1719
| [4.11.0](#4110) | | Sep 15, 2023
@@ -70,11 +72,57 @@ The table below shows which release corresponds to each branch, and what date th
7072
| [3.0.0](#300) | | Aug 20, 2016
7173
| [2.2.0](#220) | | Jan 5, 2015
7274

73-
## 4.15.0 (`dev`)
74-
75-
76-
77-
## 4.14.0 (`beta`)
75+
## 5.0.0 (`dev`)
76+
77+
78+
## 4.15.0 (`beta`)
79+
- [#2508][2508] Ignore a warning when compiling with asm on nix
80+
- [#2471][2471] Properly close spawned kitty window
81+
- [#2358][2358] Cache output of `asm()`
82+
- [#2457][2457] Catch exception of non-ELF files in checksec.
83+
- [#2444][2444] Add `ELF.close()` to release resources
84+
- [#2413][2413] libcdb: improve the search speed of `search_by_symbol_offsets` in local libc-database
85+
- [#2470][2470] Fix waiting for gdb under WSL2
86+
- [#2479][2479] Support extracting libraries from Docker image in `pwn template`
87+
- [#2483][2483] Only print `checksec` output of `ELF.libc` when it was printed for the `ELF` already
88+
- [#2482][2482] Throw error when using `sni` and setting `server_hostname` manually in `remote`
89+
- [#2478][2478] libcdb-cli: add `--offline-only`, refactor unstrip and add fetch parser for download libc-database
90+
- [#2484][2484] Allow to disable caching
91+
- [#2291][2291] Fix attaching to a gdbserver with tuple `gdb.attach(('0.0.0.0',12345))`
92+
- [#2410][2410] Add `tube.upload_manually` to upload files in chunks
93+
- [#2502][2502] Fix loading ELF files without valid .dynamic section
94+
- [#2476][2476] Deprecate 'keepends' argument in favor of 'drop' in `tube.recvline*`
95+
- [#2364][2364] Deprecate direct commandline scripts invocation and exclude nonsense ones
96+
97+
[2508]: https://github.com/Gallopsled/pwntools/pull/2508
98+
[2471]: https://github.com/Gallopsled/pwntools/pull/2471
99+
[2358]: https://github.com/Gallopsled/pwntools/pull/2358
100+
[2457]: https://github.com/Gallopsled/pwntools/pull/2457
101+
[2444]: https://github.com/Gallopsled/pwntools/pull/2444
102+
[2413]: https://github.com/Gallopsled/pwntools/pull/2413
103+
[2470]: https://github.com/Gallopsled/pwntools/pull/2470
104+
[2479]: https://github.com/Gallopsled/pwntools/pull/2479
105+
[2483]: https://github.com/Gallopsled/pwntools/pull/2483
106+
[2482]: https://github.com/Gallopsled/pwntools/pull/2482
107+
[2478]: https://github.com/Gallopsled/pwntools/pull/2478
108+
[2484]: https://github.com/Gallopsled/pwntools/pull/2484
109+
[2291]: https://github.com/Gallopsled/pwntools/pull/2291
110+
[2410]: https://github.com/Gallopsled/pwntools/pull/2410
111+
[2502]: https://github.com/Gallopsled/pwntools/pull/2502
112+
[2476]: https://github.com/Gallopsled/pwntools/pull/2476
113+
[2364]: https://github.com/Gallopsled/pwntools/pull/2364
114+
115+
## 4.14.1 (`stable`)
116+
117+
- [#2533][2533] Fix installation on Python 3.5 and lower
118+
- [#2518][2518] fix: update apport coredump path handling for CorefileFinder
119+
- [#2559][2559] Fix parsing corefile with missing auxv
120+
121+
[2533]: https://github.com/Gallopsled/pwntools/pull/2533
122+
[2518]: https://github.com/Gallopsled/pwntools/pull/2518
123+
[2559]: https://github.com/Gallopsled/pwntools/pull/2559
124+
125+
## 4.14.0
78126

79127
- [#2356][2356] Add local libc database provider for libcdb
80128
- [#2360][2360] Add offline parameter for `search_by_hash` series function
@@ -96,6 +144,7 @@ The table below shows which release corresponds to each branch, and what date th
96144
- [#2382][2382] added optional port, gdb_args and gdbserver_args parameters to gdb.debug()
97145
- [#2435][2435] Speed up gdbserver handshake in gdb.debug()
98146
- [#2436][2436] Add resolution_addr parameter to Ret2dlresolvePayload
147+
- [#2497][2497] Fix remote.fromsocket() to handle AF_INET6 socket
99148

100149
[2436]: https://github.com/Gallopsled/pwntools/pull/2436
101150
[2371]: https://github.com/Gallopsled/pwntools/pull/2371
@@ -117,17 +166,22 @@ The table below shows which release corresponds to each branch, and what date th
117166
[2382]: https://github.com/Gallopsled/pwntools/pull/2382
118167
[2435]: https://github.com/Gallopsled/pwntools/pull/2435
119168
[2437]: https://github.com/Gallopsled/pwntools/pull/2437
169+
[2497]: https://github.com/Gallopsled/pwntools/pull/2497
120170

121171
## 4.13.1
122172

123173
- [#2445][2445] Fix parsing the PLT on Windows
124174
- [#2466][2466] Fix PLT emulation with Unicorn 2.1.0
125175
- [#2466][2466] Switch to PyPi Simple API for update checks
176+
- [#2467][2467] Fix loading at all on Windows
177+
- [#2469][2469] GDB 15+ rpyc detection
126178

127179
[2445]: https://github.com/Gallopsled/pwntools/pull/2445
128180
[2466]: https://github.com/Gallopsled/pwntools/pull/2466
181+
[2467]: https://github.com/Gallopsled/pwntools/pull/2467
182+
[2469]: https://github.com/Gallopsled/pwntools/pull/2469
129183

130-
## 4.13.0 (`stable`)
184+
## 4.13.0
131185

132186
- [#2242][2242] Term module revamp: activating special handling of terminal only when necessary
133187
- [#2277][2277] elf: Resolve more relocations into GOT entries

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ Pwntools is best supported on 64-bit Ubuntu LTS releases (14.04, 16.04, 18.04, a
3737
Python3 is suggested, but Pwntools still works with Python 2.7. Most of the functionality of pwntools is self-contained and Python-only. You should be able to get running quickly with
3838

3939
```sh
40-
apt-get update
41-
apt-get install python3 python3-pip python3-dev git libssl-dev libffi-dev build-essential
40+
sudo apt-get update
41+
sudo apt-get install python3 python3-pip python3-dev git libssl-dev libffi-dev build-essential
4242
python3 -m pip install --upgrade pip
4343
python3 -m pip install --upgrade pwntools
4444
```

docs/requirements.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ isort
88
mako>=1.0.0
99
paramiko>=1.15.2
1010
pip>=6.0.8
11-
pyelftools>=0.2.3
11+
pyelftools>=0.29, <0.30; python_version<'3'
12+
pyelftools>=0.29; python_version>='3'
1213
pygments>=2.0
1314
pypandoc
1415
pyserial>=2.7

0 commit comments

Comments
 (0)