Skip to content

Commit

Permalink
Merge branch 'beta' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Arusekk committed Jun 25, 2023
2 parents 91be8af + b9cc118 commit 909d583
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 9 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,23 @@ jobs:
key: ${{ matrix.os }}-cache-pip

- name: Set up Python ${{ matrix.python_version }}
if: matrix.python_version != '2.7'
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}

- name: Set up Python 2.7
if: matrix.python_version == '2.7'
run: |
sudo apt-get update
sudo apt-get install -y \
python2.7 python2.7-dev python2-pip-whl
sudo ln -sf python2.7 /usr/bin/python
export PYTHONPATH=`echo /usr/share/python-wheels/pip-*py2*.whl`
sudo --preserve-env=PYTHONPATH python -m pip install --upgrade pip setuptools wheel
sudo chown -R $USER /usr/local/lib/python2.7
- name: Verify tag against version
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
env:
Expand All @@ -49,7 +62,8 @@ jobs:
sudo apt-get update
sudo apt-get install -y --no-install-recommends -o Acquire::Retries=3 \
ash bash-static dash ksh mksh zsh \
pandoc gdb gdbserver socat \
python3-rpyc \
gdb gdbserver socat \
binutils-multiarch qemu-user-static \
binutils-aarch64-linux-gnu \
binutils-arm-linux-gnueabihf \
Expand All @@ -62,11 +76,6 @@ jobs:
libc6-dbg \
elfutils
- name: Install RPyC for GDB
run: |
sudo apt-get install -y python3-pip
/usr/bin/python3 -m pip install rpyc
- name: Testing Corefiles
run: |
ulimit -a
Expand All @@ -93,6 +102,7 @@ jobs:
run: pip install -r docs/requirements.txt

- name: Manually install non-broken Unicorn
if: matrix.python_version == '2.7'
run: pip install unicorn==2.0.0rc7

- name: Disable yama ptrace_scope
Expand Down
2 changes: 1 addition & 1 deletion pwnlib/libcdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def unstrip_libc(filename):
>>> libc = ELF(filename)
>>> hex(libc.symbols.main_arena)
'0x219c80'
>>> unstrip_libc(which('python'))
>>> unstrip_libc(which('python3'))
False
>>> filename = search_by_build_id('d1704d25fbbb72fa95d517b883131828c0883fe9', unstrip=True)
>>> 'main_arena' in ELF(filename).symbols
Expand Down
4 changes: 2 additions & 2 deletions pwnlib/tubes/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -1151,10 +1151,10 @@ def system(self, process, tty = True, wd = None, env = None, timeout = None, raw
Examples:
>>> s = ssh(host='example.pwnme')
>>> py = s.run('python -i')
>>> py = s.run('python3 -i')
>>> _ = py.recvuntil(b'>>> ')
>>> py.sendline(b'print(2+2)')
>>> py.sendline(b'exit')
>>> py.sendline(b'exit()')
>>> print(repr(py.recvline()))
b'4\n'
>>> s.system('env | grep -a AAAA', env={'AAAA': b'\x90'}).recvall()
Expand Down
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@
project = toml.load('pyproject.toml')['project']
compat['install_requires'] = project['dependencies']
compat['name'] = project['name']
if '--user' in sys.argv:
sys.argv.remove('--user')


# Check that the user has installed the Python development headers
PythonH = os.path.join(get_python_inc(), 'Python.h')
Expand Down

0 comments on commit 909d583

Please sign in to comment.