Skip to content

Commit 19d68e3

Browse files
authored
Merge branch 'dev' into riscv-avoid-compressed
2 parents 3ca6c61 + 35da0c3 commit 19d68e3

File tree

684 files changed

+6641
-2490
lines changed

Some content is hidden

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

684 files changed

+6641
-2490
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Thanks for contributing to Pwntools!
44

55
When reporting an issue, be sure that you are running the latest released version of pwntools (`pip install --upgrade pwntools`).
66

7-
Please verify that your issue occurs on 64-bit Ubuntu 14.04. You can use the Dockerfile on `docker.io` for quick testing.
7+
Please verify that your issue occurs on 64-bit Ubuntu 22.04. You can use the Dockerfile on `docker.io` for quick testing.
88

99
```
1010
$ docker pull pwntools/pwntools:stable

.github/workflows/android.yml

Lines changed: 0 additions & 70 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 89 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@ jobs:
55
test:
66
strategy:
77
matrix:
8-
python_version: ['3.10', '3.12']
8+
python_version: ['3.10', '3.12', '3.13']
99
os: [ubuntu-latest]
10-
include:
11-
- python_version: '2.7'
12-
os: ubuntu-22.04
1310
runs-on: ${{ matrix.os }}
1411
timeout-minutes: 30
1512
services:
@@ -36,7 +33,7 @@ jobs:
3633
run: |
3734
git fetch origin
3835
git log --oneline --graph -10
39-
36+
4037
- name: Fix libcdb-cache permissions
4138
id: fix-perms
4239
run: |
@@ -66,17 +63,8 @@ jobs:
6663
sudo apt-get update && sudo apt-get install -y python3-pip gdb gdbserver
6764
/usr/bin/python -m pip install --break-system-packages rpyc || /usr/bin/python -m pip install rpyc
6865
gdb --batch --quiet --nx --nh --ex 'py import rpyc; print(rpyc.version.version)'
69-
70-
- name: Cache for pip
71-
uses: actions/cache@v4
72-
if: matrix.python_version == '2.7'
73-
with:
74-
path: ~/.cache/pip
75-
key: ${{ matrix.os }}-${{ matrix.python_version }}-cache-pip-${{ hashFiles('**/pyproject.toml', '**/requirements*.txt') }}
76-
restore-keys: ${{ matrix.os }}-${{ matrix.python_version }}-cache-pip-
7766
7867
- name: Set up Python ${{ matrix.python_version }}
79-
if: matrix.python_version != '2.7'
8068
uses: actions/setup-python@v5
8169
with:
8270
python-version: ${{ matrix.python_version }}
@@ -85,17 +73,6 @@ jobs:
8573
**/pyproject.toml
8674
**/requirements*.txt
8775
88-
- name: Set up Python 2.7
89-
if: matrix.python_version == '2.7'
90-
run: |
91-
sudo apt-get update
92-
sudo apt-get install -y \
93-
python2.7 python2.7-dev python2-pip-whl
94-
sudo ln -sf python2.7 /usr/bin/python
95-
export PYTHONPATH=`echo /usr/share/python-wheels/pip-*py2*.whl`
96-
sudo --preserve-env=PYTHONPATH python -m pip install --upgrade pip setuptools wheel
97-
sudo chown -R $USER /usr/local/lib/python2.7
98-
9976
10077
- name: Verify tag against version
10178
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
@@ -125,11 +102,12 @@ jobs:
125102
binutils-s390x-linux-gnu \
126103
binutils-sparc64-linux-gnu \
127104
binutils-riscv64-linux-gnu \
105+
binutils-loongarch64-linux-gnu \
128106
gcc-multilib \
129107
libc6-dbg \
130108
elfutils \
131109
patchelf
132-
110+
133111
- name: Testing Corefiles
134112
run: |
135113
ulimit -a
@@ -155,10 +133,6 @@ jobs:
155133
- name: Install documentation dependencies
156134
run: pip install -r docs/requirements.txt
157135

158-
- name: Manually install non-broken Unicorn
159-
if: matrix.python_version == '2.7'
160-
run: pip install unicorn==2.0.0rc7
161-
162136
- name: Disable yama ptrace_scope
163137
run: |
164138
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope # required by some gdb doctests
@@ -244,7 +218,6 @@ jobs:
244218
pwn libcdb hash b229d1da1e161f95e839cf90cded5f719e5de308
245219
246220
- name: Build source and wheel distributions
247-
if: matrix.python_version != '2.7'
248221
run: |
249222
python -m build
250223
@@ -260,13 +233,83 @@ jobs:
260233
name: coverage-${{ matrix.python_version }}
261234
path: .coverage*
262235
include-hidden-files: true
263-
236+
264237
- name: Fix libcdb-cache permissions
265238
run: |
266239
container_id=$(docker ps --filter volume=/home/runner/libcdb-cache --no-trunc --format "{{.ID}}")
267240
docker stop $container_id
268241
sudo chown -R runner:runner /home/runner/libcdb-cache
269242
243+
android-test:
244+
runs-on: ubuntu-latest
245+
timeout-minutes: 30
246+
continue-on-error: true
247+
steps:
248+
- uses: actions/checkout@v4
249+
250+
- name: Set up Python 3.12
251+
uses: actions/setup-python@v5
252+
with:
253+
python-version: '3.12'
254+
cache: 'pip'
255+
cache-dependency-path: |
256+
**/pyproject.toml
257+
**/requirements*.txt
258+
259+
- name: Install Linux dependencies
260+
run: |
261+
sudo apt-get update
262+
sudo apt-get install -y --no-install-recommends -o Acquire::Retries=3 \
263+
gdb gdbserver socat \
264+
qemu-user-static \
265+
binutils-aarch64-linux-gnu \
266+
binutils-arm-linux-gnueabihf \
267+
libc6-dbg
268+
269+
- name: Cache for avd
270+
uses: actions/cache@v4
271+
id: cache-avd
272+
with:
273+
path: |
274+
~/.android
275+
/usr/local/lib/android/sdk/emulator
276+
/usr/local/lib/android/sdk/platform-tools
277+
/usr/local/lib/android/sdk/system-images
278+
key: ${{ matrix.os }}-cache-avd-${{ hashFiles('travis/setup_avd*.sh') }}
279+
restore-keys: |
280+
${{ matrix.os }}-cache-avd-
281+
282+
- name: Install Android AVD
283+
run: |
284+
sudo usermod -aG kvm $USER
285+
source travis/setup_avd_fast.sh
286+
sed -i 's/skip_android = True/skip_android = False/' docs/source/conf.py
287+
set | grep ^PATH >.android.env
288+
289+
- name: Install dependencies
290+
run: |
291+
pip install --upgrade pip
292+
pip install --upgrade wheel build
293+
pip install --upgrade flake8 appdirs
294+
pip install --upgrade --editable .
295+
296+
- name: Sanity checks
297+
run: PWNLIB_NOTERM=1 python -c 'from pwn import *; print(pwnlib.term.term_mode)'
298+
299+
- name: Install documentation dependencies
300+
run: pip install -r docs/requirements.txt
301+
302+
- name: Coverage Doctests (Android Only)
303+
run: |
304+
source .android.env
305+
PWNLIB_NOTERM=1 coverage run -m sphinx -b doctest docs/source docs/build/doctest docs/source/adb.rst
306+
307+
- uses: actions/upload-artifact@v4
308+
with:
309+
name: coverage-android
310+
path: .coverage*
311+
include-hidden-files: true
312+
270313
windows-test:
271314
runs-on: windows-latest
272315
timeout-minutes: 30
@@ -283,12 +326,25 @@ jobs:
283326
run: |
284327
pip install --upgrade pip
285328
pip install --upgrade --editable .
286-
329+
330+
- name: Install documentation dependencies
331+
run: pip install -r docs/requirements.txt
332+
287333
- name: Sanity checks
288334
run: |
289335
python -bb -c 'from pwn import *'
290336
python -bb examples/text.py
291337
338+
- name: Coverage doctests
339+
run: |
340+
python -bb -m coverage run -m sphinx -b doctest docs/source docs/build/doctest
341+
342+
- uses: actions/upload-artifact@v4
343+
with:
344+
name: coverage-windows
345+
path: .coverage*
346+
include-hidden-files: true
347+
292348
upload-coverage:
293349
runs-on: ubuntu-latest
294350
needs: test

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
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

0 commit comments

Comments
 (0)