Skip to content

Commit

Permalink
Merge branch 'stable' into disasm_highlights
Browse files Browse the repository at this point in the history
  • Loading branch information
Arusekk committed May 21, 2023
2 parents a819d54 + 5a84bbf commit 41a060c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/ci.yml
Expand Up @@ -198,6 +198,8 @@ jobs:
pypi:
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
permissions:
id-token: write
needs: test
steps:
- name: Download artifacts
Expand All @@ -207,10 +209,7 @@ jobs:
path: dist

- name: Publish package
uses: pypa/gh-action-pypi-publish@v1.1.0
with:
user: __token__
password: ${{ secrets.pypi_password }}
uses: pypa/gh-action-pypi-publish@release/v1

- if: failure()
run: ls -R
2 changes: 1 addition & 1 deletion pwnlib/elf/elf.py
Expand Up @@ -225,7 +225,7 @@ def __init__(self, path, checksec=True):
super(ELF,self).__init__(self.mmap)

#: :class:`str`: Path to the file
self.path = os.path.abspath(path)
self.path = packing._need_text(os.path.abspath(path))

#: :class:`str`: Architecture of the file (e.g. ``'i386'``, ``'arm'``).
#:
Expand Down
13 changes: 7 additions & 6 deletions pwnlib/libcdb.py
Expand Up @@ -25,7 +25,10 @@
log = getLogger(__name__)

HASHES = ['build_id', 'sha1', 'sha256', 'md5']
DEBUGINFOD_SERVERS = ['https://debuginfod.systemtap.org/']
DEBUGINFOD_SERVERS = [
'https://debuginfod.systemtap.org',
'https://debuginfod.ubuntu.com',
] + os.environ.get('DEBUGINFOD_SERVERS', '').split()

# https://gitlab.com/libcdb/libcdb wasn't updated after 2019,
# but still is a massive database of older libc binaries.
Expand Down Expand Up @@ -202,20 +205,18 @@ def unstrip_libc(filename):
:const:`True` if binary was unstripped, :const:`False` otherwise.
Examples:
>>> filename = search_by_build_id('2d1c5e0b85cb06ff47fa6fa088ec22cb6e06074e', unstrip=False)
>>> filename = search_by_build_id('69389d485a9793dbe873f0ea2c93e02efaa9aa3d', unstrip=False)
>>> libc = ELF(filename)
>>> hex(libc.symbols.read)
'0xe56c0'
>>> 'main_arena' in libc.symbols
False
>>> unstrip_libc(filename)
True
>>> libc = ELF(filename)
>>> hex(libc.symbols.main_arena)
'0x1d57a0'
'0x219c80'
>>> unstrip_libc(which('python'))
False
>>> filename = search_by_build_id('06a8004be6e10c4aeabbe0db74423ace392a2d6b', unstrip=True)
>>> filename = search_by_build_id('d1704d25fbbb72fa95d517b883131828c0883fe9', unstrip=True)
>>> 'main_arena' in ELF(filename).symbols
True
"""
Expand Down
2 changes: 1 addition & 1 deletion pwnlib/util/web.py
Expand Up @@ -25,7 +25,7 @@ def wget(url, save=None, timeout=5, **kwargs):
Example:
>>> url = 'https://httpbin.org/robots.txt'
>>> url = 'https://httpbingo.org/robots.txt'
>>> result = wget(url, timeout=60)
>>> result
b'User-agent: *\nDisallow: /deny\n'
Expand Down

0 comments on commit 41a060c

Please sign in to comment.