4672 Commits
Author SHA1 Message Date
Yahya Kayaal af4918c43f Fix NameError in submit_flag and Kernel.enable_uart (#2798)
* Fix NameError in submit_flag and Kernel.enable_uart

* Add changelog entry for #2798
2026-11-02 18:32:53 +01:00
Eapp1e 01f5cf08d7 feat(errno): resolve errno values for the requested context (#2788) (#2789)
`pwn errno` only ever consulted the host's errno module, so numbers from a
target of a different architecture were reported as unknown (131 is
ECONNRESET on mips but unused here).

Add -c/--context, built on the same context_arg helper as asm, constgrep and
cyclic: number and name lookups now resolve against pwnlib.constants for the
requested os/arch, and --list/--search honour the flag too. --search also
matches errno names, so the flag stays useful on hosts whose strerror cannot
spell out the target's codes.

Covered with three inline doctests, as TESTING.md asks for.
2026-11-02 08:02:18 +01:00
peace-maker b83a0ddc8c Test on Python 3.15 (#2792)
* Test on Python 3.15

* Use `RLIM_INFINITY` instead of `-1` constant for rlimit modification

Python 3.15 warns against using negative values instead of the constant:

DeprecationWarning: Use RLIM_INFINITY instead of negative limit value.

It has been available since Python 2.

* Update CHANGELOG
2026-10-30 14:16:56 +01:00
Lim Jooyoung f8432266cd docs: fix argument names in regsort, ROP.raw and SSHPath docstrings (#2793)
* docs: fix argument names in regsort, ROP.raw and SSHPath docstrings

regsort documented random instead of randomize, ROP.raw documented data
instead of value, and SSHPath documented name instead of path.

* Add PR number to CHANGELOG entry

* docs: remove changelog entry for docstring fixes
2026-10-29 13:08:20 +01:00
Peace-Maker a3890a57f2 Merge branch 'beta' into dev 2026-10-27 14:55:24 +08:00
Adil Alperen Çiftci 928d2d36df fix(encoders): handle xor_pair failure and encoder fallback (#2005) (#2780)
* fix(encoders): register ascii_shellcode for i386 and handle xor_pair failure (#2005)

* docs: add PR 2780 changelog entry

* test(encoders): add doctest regression coverage

* fix(encoders): escape null bytes in printable doctest

* test(encoders): move regression coverage to doctests

* fix(encoders): dont register ascii encoder by defualt

* docs(encoders): drop stael ascii reg changelog claim

* fix(encoders): preserve existing byte filtering behavior

---------

Signed-off-by: Adil Alperen Çiftci <[email protected]>
2026-10-26 07:58:11 +01:00
peace-maker d8d47977ac gdb.corefile: Run gdb directly to prevent detach race (#2787)
* gdb.corefile: Run gdb directly to prevent detach race

`attach()` waits for the debugger to attach by polling the `TracerPid` regularly. `corefile()` runs `detach` in gdb after dumping the core, so the debugger might attach and detach between two `TracerPid` polls and `wait_for_debugger()` thinks gdb exited before attaching and returns `None` as gdb's pid is no longer valid.

Later `corefile()` ran `psutil.Process(pid).wait()` with `pid = None` which effectively waited on the Python process itself to exit.
This caused a hang in the doctest CI sometimes, which was killed by the watchdog timer eventually.

Run `gdb` directly and just observe the exit code instead of relying on the more advanced `attach` logic for longer running debug sessions.

* Update CHANGELOG
2026-10-26 06:15:28 +00:00
Max Freedom Pollardandpeace-maker 3daf28b6be fix(packing): dd() raises TypeError on a bytearray destination (#2772)
* fix(packing): dd() raises TypeError on a bytearray destination

dd() documents bytearray as a supported destination type, but
dd(bytearray(b'Hello!'), b'?', skip=5) raises
"TypeError: 'bytes' object cannot be interpreted as an integer".

pwnlib/util/packing.py:1108 handled list and bytearray destinations in a
single branch and filled both with list(map(p8, bytearray(src))). p8()
returns a length-1 bytes object, which is what a list destination is
documented to hold (see the existing dd(list('Hello!'), (63,), skip=5)
doctest), but a bytearray slice assignment needs an iterable of int, so
every bytearray destination crashed.

Assign the byte string src directly when the destination is a bytearray.
Every src branch above the destination dispatch (packing.py:1039-1089)
has already reduced src to a byte string, so the slice assignment is
always valid. This also makes a bytearray destination agree with the
bytes and str destinations, which already copy src verbatim.

Add a doctest covering the returned value and the in-place update of the
caller's bytearray.

* Add changelog entry for #2772

---------

Co-authored-by: peace-maker <[email protected]>
2026-10-24 12:15:03 +02:00
h4kk4p4kk4andpeace-maker f4b3e6e1c4 fix(elf): prevent elf.libc returning the executable when its name starts with libc[.-] (#2781)
Co-authored-by: peace-maker <[email protected]>
2026-10-24 12:12:47 +02:00
c2b9afc472 feat(cli): add 'pwn errno --list' + perror-string lookup (#2657) (#2727)
* feat(cli): add 'pwn errno --list' / -l + perror-string fallback (#2657)

- '--list / -l': dump every known errno (value, name, strerror message).
- '--search / -s': force perror-substring match (case-insensitive).
- Bare 'pwn errno <text>' falls back to a perror substring search when the
  argument is neither an integer nor a known errno macro name. So
  'pwn errno "Cannot allocate memory"' now prints ENOMEM directly.
- Positional 'error' arg is now optional so '--list' can be used alone;
  argparse explains the requirement when neither is supplied.

Closes #2657

* Update CHANGELOG.md for #2727

* Add type hints to errno commandline tool

---------

Co-authored-by: Chris (ChrisJr404) <[email protected]>
Co-authored-by: Peace-Maker <[email protected]>
2026-10-24 12:00:21 +02:00
Taranandpeace-maker 4904b537bf fix: don't truncate the last byte of FileStructure.struntil (#2761)
* fix: don't truncate the last byte of FileStructure.struntil

* changelog: add entry for #2761

---------

Co-authored-by: peace-maker <[email protected]>
2026-10-24 11:46:51 +02:00
colinthebomb1andArusekk 12c7072a77 memleak: add opt-in persistent leak cache (#2741)
* memleak: add opt-in persistent leak cache via cache_file

* memleak: document cache_file and add a persistence doctest

* simplify doctest

* add changelog

---------

Co-authored-by: Arusekk <[email protected]>
2026-10-24 11:21:47 +02:00
Toniandpeace-maker 78d1809580 fix: Fix DeprecationWarning when setting ssl=True in remote() (#2750)
* fix: Fix DeprecationWarning when setting ssl=True in remote()

The current code initializes SSLContext with `ssl.PROTOCOL_TLSv1_2`, which has been deprecated for a while now

This should be the correct fix according to the documentation (https://docs.python.org/3/library/ssl.html#ssl.SSLContext)

* Update CHANGELOG

* Fix the new ssl thing, document a way to disable cert verification

---------

Co-authored-by: peace-maker <[email protected]>
2026-10-24 11:09:05 +02:00
Max Freedom PollardandPeace-Maker 2b39684912 Disable debuginfod doctests in libcdb.unstrip_libc on stable (#2773)
* Disable debuginfod tests in libcdb.unstrip_libc

The external debuginfod servers are really slow or won't respond at all like debuginfod.ubuntu.com.
The caching in CI doesn't help since we only cache it for 3 month and the query fails afterwards most of the time. We cache the negative response too which doesn't help if the service is flakey itself :D

(cherry picked from commit 86cafce196)

* Add changelog entry for #2773

---------

Co-authored-by: Peace-Maker <[email protected]>
2026-10-21 20:04:53 +02:00
Sharique Ahmad 99a4fe5596 docs: put plain doctest blocks in the default group for Sphinx 9 (#2784)
* docs: put plain doctest blocks in the default group for Sphinx 9

doctest_test_doctest_blocks is the group name plain >>> blocks are
assigned to. Sphinx < 9 ignored it and always used "default"; Sphinx 9.0
honours it (sphinx-doc/sphinx#13858), so our 'true' moved every plain
block into a group named "true" while `.. doctest:: :hide:` blocks stayed
in "default". The two groups run separately, so hidden context.clear()
calls no longer ran between the examples around them.

Fixes #2711

* Update CHANGELOG for #2784
2026-10-17 16:12:16 +02:00
peace-maker 1429a134ec Fix more global type errors (#2770)
Fix most of the type errors in global scope before enabling type checks on untyped functions.
2026-09-03 11:43:35 +02:00
Arusekk c8645fef4c Fixup homebrew docs
Ref: #2768
2026-08-30 09:24:09 +02:00
Waasila AsifandArusekk be8b5480db Added the homebrew workaround in documentation (#2768)
* Added the homebrew workaround in documentation

* Logged PR in CHANGELOG.d

* install.rst: wording

---------

Co-authored-by: Arusekk <[email protected]>
2026-08-28 18:55:35 +02:00
Rogdham d9eff01662 Use compression.zstd (PEP-784) (#2769)
* Use compression.zstd (PEP-784)

* Add changelog entry
2026-08-28 13:54:23 +02:00
Peace-Maker b22998ab12 Re-export toplevel imports in pwn
Help linters to know what to expect when importing `from pwn import *`
2026-08-16 21:47:50 +02:00
d41db1ff27 feat(libcdb): use local debuginfod client cache before hitting servers (#2623) (#2726)
* feat(libcdb): use local debuginfod client cache before hitting servers (#2623)

If gdb / eu-debuginfod-find / abrt has already downloaded the matching
debuginfo for our libc's build-id (cached at $DEBUGINFOD_CACHE_PATH or
$XDG_CACHE_HOME/debuginfod_client/ or ~/.cache/debuginfod_client/),
unstrip_libc() now reuses it directly instead of doing another network
round-trip via debuginfod servers. Validated by ELF magic so non-ELF
junk in the cache is ignored.

Closes #2623

* Update CHANGELOG.md for #2726

* Check our own cache before looking at debuginfod-client

---------

Co-authored-by: Chris (ChrisJr404) <[email protected]>
Co-authored-by: Peace-Maker <[email protected]>
2026-08-16 21:07:10 +02:00
Scott Laglerandpeace-maker 5efe909a91 Add Type Annotations for parts of pwnlib/util (#2679)
* Add Type Annotations for parts of pwnlib/util

* fix: use Callable in pwnlib/util/lists.py

* fix: Import Errors

* fix: use getLogger in pwnlib/util/net

* feat: use collections.abc.Buffer where appropriate

* fix: remove collections.abc.Buffer to use Sequence

* add CHANGELOG.md entry

* Improve packing and fiddling types

* Introduce own `BytesLike` type instead of 3.12 Buffer

* Improve web.wget types

* Use TypedDict in util.net

Specify generics properly.

* Improve pwnlib.proc types

* Improve pwnlib.util.lists types

* Fix util.splash types

* Make TypeVars private

* Improve util.hexdump types

* Remove partial types from packing.fit/flat

Those require more work to be useful.

* Fix implicit wget return

* Fix term.text type export

* Fix js_escape return type

* Fix sh_string doctest types

* Fix usage of ssh_channel as ssh_process

We access the pid, so a plain ssh_channel is not enough.

* Improve util.lists types

* Improve packing.dd types

* Fix relying on socket.AddressFamily type at runtime

The type is only in typeshed and not the real socket module. Don't access it at runtime, only at type checking.

* Fix lists.findall with string needle

* Fix dd on two files

* Update mypy-baseline.txt

* Remove testing artifacts from mypy-baseline.txt

---------

Co-authored-by: peace-maker <[email protected]>
2026-08-16 19:45:40 +02:00
Peace-Maker 29c20ddf6e Skip ssh.ibt doctest since some runners appear to support it now 2026-08-16 12:16:19 +02:00
peace-maker b309e102ba Support paginated libc.rip API requests (#2767)
* Support paginated libc.rip API requests

libc.rip used to truncate the result set but supports pagination now. Fetch all results reliably now by requesting all pages.

Fixes #2651

* Update CHANGELOG
2026-08-16 11:30:55 +02:00
Peace-Maker 7f891444b9 Add types-docutils to dev dependencies 2026-08-09 23:31:19 +02:00
dependabot[bot] 76da472406 build(deps): bump the github-actions group across 1 directory with 3 updates (#2763)
Bumps the github-actions group with 3 updates in the / directory: [actions/checkout](https://github.com/actions/checkout), [actions/cache](https://github.com/actions/cache) and [actions/setup-python](https://github.com/actions/setup-python).


Updates `actions/checkout` from 6 to 7
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v6...v7)

Updates `actions/cache` from 5 to 6
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v5...v6)

Updates `actions/setup-python` from 6 to 7
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/cache
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/setup-python
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-09 11:35:58 +02:00
Taran 508283eac1 fix(srop): correct amd64 SigreturnFrame uc_sigmask offset (#2762)
* fix(srop): correct amd64 SigreturnFrame uc_sigmask offset

* changelog: add entry for #2762
2026-08-02 18:53:22 +02:00
citizen204 de073eb151 docs(args): clarify reserved args (DEBUG/NOASLR) map to context, not args (#2753)
* docs(args): clarify reserved args map to context, not args.NOASLR

Reserved magic arguments such as DEBUG and NOASLR are consumed as hooks
that adjust context (context.log_level, context.aslr) and are never
stored in the args dict, so args.NOASLR is always the empty string.

The pwnup template comment previously claimed these settings 'show up
in args', which reinforced the wrong mental model and led users to
check args.NOASLR instead of context.aslr. Clarify both the template
comment and the pwnlib.args module docstring.

Fixes #2564

* docs: add changelog entry for args/pwnup.mako docstring clarification

CI requires a CHANGELOG.md entry for changes touching pwnlib/args.py
and pwnlib/data/templates/pwnup.mako.
2026-07-25 08:14:33 +02:00
peace-makerandChristian Clauss 6571ec7de5 Add support for debugging with x64dbg on Windows (#2735)
* Add support for debugging with x64dbg on Windows

Add x64dbg option to `context.debugger` to attach using x64dbg in `windbg.debug()`.

The path to the x96dbg.exe is looked up in the path and through the "Debug with x64dbg" shell extension you can install optionally when first launching the x96dbg.exe launcher.
You can specify the path using `context.x64dbg_binary` too.

* Refactor exclusion of `context.debugger="auto"` while handling `"auto"`

Co-authored-by: Christian Clauss <[email protected]>

* Update CHANGELOG

* Remove absolute path workaround

x64dbg 2026.05.27 fixed passing absolute paths to a script file using -cf.

* Remove bare raise

log.error raises already.

* Fix linting error of winreg import on linux

The module is only available on Windows. So ignore the error when linting on another platform.

---------

Co-authored-by: Christian Clauss <[email protected]>
2026-07-05 23:47:24 +02:00
Peace-Maker 86cafce196 Disable debuginfod tests in libcdb.unstrip_libc
The external debuginfod servers are really slow or won't respond at all like debuginfod.ubuntu.com.
The caching in CI doesn't help since we only cache it for 3 month and the query fails afterwards most of the time. We cache the negative response too which doesn't help if the service is flakey itself :D
2026-07-05 23:22:27 +02:00
peace-maker cded3cf1e5 ROP: Add labels to reference addresses relative to your chain (#2734)
* ROP: Add labels to reference gadgets dynamically

Allow to assign a name to a point in the ROP chain using `ROP.setlabel(name)`
and reference it somewhere else using `ROP.uselabel(name, offset)`.
You have to know the location of your chain in memory to resolve the
right addresses. This allows to specify addresses relative to your ROP chain payload in your chain.

Refs #2583

* Update ret2dlresolve test output

* Update CHANGELOG

* Rename functions to `label` and `ref`

This is less verbose than `setlabel` and `uselabel` but still descriptive enough to be able to guess what they do.
2026-07-04 18:39:10 +02:00
09fbd3a681 fix: replace bare except with except Exception (#2743)
* fix: improve exception handling in process.py and adb.py

- process.py: restore bare except with pylint disable (intentional: catches
  non-Exception errors during Python interpreter shutdown)
- adb.py: use specific (OSError, EOFError) instead of broad except Exception

* fix: add missing import for remote in adb.py

The bare except was silently catching NameError from the missing
remote import. Added 'from pwnlib.tubes.remote import remote' to
fix the actual underlying bug.

* docs: add changelog entry for PR #2743

* docs: move changelog reference link near 5.0.0 release section

* fix: catch PwnlibException in emulator AVD name lookup

The bare except was catching PwnlibException raised by remote() when
connection fails. Replacing with except (OSError, EOFError) caused
PwnlibException to propagate, potentially causing retry loops in
Android CI.

Fix by adding PwnlibException to the exception tuple.

* fix: prevent __getattr__ infinite recursion with context.device setter

When context.device setter accesses device.arch, it triggers AdbDevice's
__getattr__ (instead of the arch property). __getattr__ then calls
context.local(device=self), which triggers the setter again, causing
infinite recursion.

Fix: check if the attribute exists on the class via MRO.__dict__
before entering the context.local() path. This lets Python's normal
property resolution handle class-defined attributes.

* revert: remove __getattr__ MRO guard

Peace-maker correctly points out that __getattr__ is only called when
normal attribute lookup fails, so the MRO guard is unnecessary.
The infinite recursion is a pre-existing bug unrelated to this PR.

* Assign to `_avd` instead of `avd`

---------

Co-authored-by: mshzy <[email protected]>
Co-authored-by: peace-maker <[email protected]>
2026-06-27 23:42:54 +02:00
九条涼果 2ec3fe6ac0 fix(ssh): ssh.which returning None for POSIX paths when running on Windows (#2732)
* fix(ssh): use POSIX separator for path detection in ssh.which

On Windows, `os.path.sep` is '\\', which fails to detect POSIX paths.
Hardcoding '/' ensures consistent path detection since the `ssh`
module targets POSIX-compliant systems.

* Update CHANGELOG.md

* feat(context): add path_sep and pathlist_sep to context, make the path seperator dependent on the context.os

* fix(ssh): declare path separator as private member in ssh

* fix(ssh): remote path handling with pathlib

* fix(ssh): replace os.path.basename functions with pathlib for path handling

* fix(ssh): ensure remote paths are decoded to str
2026-06-26 11:47:38 +02:00
Carlos Luna-Penaandpeace-maker f4205e5e9e Guide users to libc_start_main_return for __libc_start_main_ret (#2746)
* guide users to libc_start_main_return for __libc_start_main_ret

looking up __libc_start_main_ret on ELF(libc).sym just threw a plain
KeyError/AttributeError even though libcdb shows that symbol, which is
confusing (issue 2563). it's not a real symbol so we can't just add it,
and computing it means disassembling __libc_start_main which we don't
want to do for everyone by default.

so for now the symbols dotdict raises a message pointing at the existing
ELF.libc_start_main_return property when you ask for that key. lazy auto
calc can come later. added a doctest covering both sym['...'] and
sym.__libc_start_main_ret access, tests pass.

* use bare super() in symboldict

peace-maker noted new code can use py3 super(), so drop the
redundant (symboldict, self) args.

* add changelog entry for 2746

---------

Co-authored-by: peace-maker <[email protected]>
2026-06-22 19:18:15 +02:00
peace-maker 6221f41a45 Fix libcdb CI cache not forwarding URI path (#2749)
The nginx docs say that you have to specify the $request_uri manually when a variable is used in the `proxy_pass` value.
Since we just put `/` at the end, all requests were rewritten to `/` instead of the intended e.g. `/api/find` endpoints.

https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass

This broke in #2718 but didn't manifest right away since the responses were still cached in CI. Now after the cache expired the fetch failed.
2026-06-22 19:16:52 +02:00
colinthebomb1 4c39ca92f2 setup: install docs to FHS-compliant share/doc/pwntools (#2740)
* setup: install docs to FHS-compliant share/doc/pwntools

* changelog: add entry for #2740
2026-06-02 18:30:21 +02:00
Carlos Luna-Pena 57de79f0e3 fix #2737: pwnlib.shellcraft submodule imports on python 3.12+ (#2739)
* shellcraft: migrate lazy importer to find_spec for py3.12+

* shellcraft: changelog entry + mypy baseline sync for #2739
2026-05-31 00:03:11 +02:00
peace-maker 5c37c2477b Add type hints to pwnlib.log (#2738) 2026-05-30 23:15:26 +02:00
peace-maker fb35a123b4 Fix some global type hint errors (#2736)
* Fix some global type hint errors

Errors in global scope should be fixed before we're enabling strict mode in mypy and tackle the local problems.

* Remove pwnlib.util.pairwise since it's in itertools now

pairwise was added to itertools itself in 3.10.
https://docs.python.org/3/library/itertools.html#itertools.pairwise
2026-05-28 17:16:27 +02:00
xtex b0e224b02c loongarch64: prefer assembler macros (#2733)
It turned out that the generator I wrote previously
was incorrect. The assembler pseudo-instruction
should work.
2026-05-26 10:14:26 +02:00
peace-maker 658479605b Fix atexception handlers in term mode (#2730)
* Fix atexception handlers in term mode

The colored-traceback module registers its own `sys.excepthook` but doesn't call the original handler.
Reorder the includes such that the colored-traceback is setup before and our own hooks afterwards.
We always call the old excepthook and forward the exception to the colored-traceback after firing our own handlers.

It worked before in non-term mode when stderr wasn't a tty and colors were disabled.

* Update CHANGELOG

* Import atexception in doctests
2026-05-21 15:59:17 +02:00
Arusekk c05fc99200 no atexit, OS will suffice 2026-05-15 00:21:44 +02:00
Arusekk 5d48acaa6b rop: simplify logging 2026-05-14 23:31:10 +02:00
4e1780781f feat(libcdb): add extra_mirrors arg + PWN_EXTRA_LIBC_MIRRORS env to download_libraries (#2666) (#2725)
* feat(libcdb): add extra_mirrors arg + PWN_EXTRA_LIBC_MIRRORS env to download_libraries (#2666)

When the libc.rip URL points at a deb.debian.org / archive.ubuntu.com /
security.debian.org URL whose package has been pulled (e.g. older
vulnerable libc versions like 'GLIBC 2.36-9+deb12u6'), download_libraries
now also tries the same /pool/... path against any user-supplied mirror
prefix(es). Mirrors can be passed via the new keyword argument
extra_mirrors=... (str or list) or the comma/whitespace-separated
PWN_EXTRA_LIBC_MIRRORS environment variable.

Closes #2666

* Update CHANGELOG.md for #2725

* Rename environment variable to `PWNLIB_EXTRA_LIBC_MIRRORS`

All our other user-facing environment variables are `PWNLIB_` instead of `PWN_`.

* Move `import re` to toplevel

* Add type hints to touched functions

* Add example usage for download_libraries with extra_mirrors parameter

* Fix envvar in CHANGELOG

---------

Co-authored-by: Chris (ChrisJr404) <[email protected]>
Co-authored-by: Peace-Maker <[email protected]>
2026-05-07 18:17:22 +02:00
peace-makerandCopilot 79ca9a962c Add type hints to timeout, term.text, hashes, and more (#2723)
* Add typehints to timeout module

Co-authored-by: Copilot <[email protected]>

* Add typehints to device class

* Add typehints to PwnlibException

* Add general typehints for term.text module

Since the available module attributes are handled dynamically like `text.green()` or `text.green_on_white()` or `text.underline_red()`, it's not feasible to type out all possible combinations.

Just tell the type checker that all module attibutes have the same type and thus avoid the `error: Module has no attribute "bold_blue"  [attr-defined]` errors.

* Add typehints for config module

* Add typehints for hashes module

The guaranteed algorithms in hashlib are pretty stable and we can generate the list out proper type checking and auto complete.

Still add a check in CI that notifies us if there are changes in the future.

* Add atexception and atexit types

atexception.unregister was not documented correctly since the function expects an identifier returned by `atexception.register` instead of the handler function.

* Fix toplevel type hints in shellcraft.internal

* Fix toplevel type hints in term.key

---------

Co-authored-by: Copilot <[email protected]>
2026-05-07 14:37:29 +02:00
RocketDevandPeace-Maker 9871b5a112 Add atexit functions for glibc exploits (#2683)
* feat: implement basic Exit*

* feat: add docs and doc test to exit func classes

closes #2633 #2637

* fix: add missing line; fix doc test

* chore: update changelog

* fix: remove function signature in docs

Sphinx will automatically resolve it via Python code

* feat: Add source code refs, fix typos

* fix: correct escapes to suppress warning

* feat: add implementation of `struct dtor_list`

* feat: add exit-handler example

* refactor: standardize repr class name

* Fix types and docs

* Fix links in docs

---------

Co-authored-by: Peace-Maker <[email protected]>
2026-05-07 12:21:31 +02:00
ChrisJr404andChris b0d6dcfab8 safeeval: allow LIST_APPEND and SET_ADD opcodes (Python 3.14) (#2722)
* safeeval: allow LIST_APPEND and SET_ADD opcodes (Python 3.14)

* changelog: add entry for #2722 (safeeval Python 3.14 opcodes)

* ci: retrigger after transient libcdb network failure

---------

Co-authored-by: Chris (ChrisJr404) <[email protected]>
2026-05-02 10:27:16 +02:00
OriPandPeace-Maker 52a354b316 Don't cache username in ssh checksec output (#2702)
* add ":" to Distro string

* Update cache file path to include username

Include username in cache file path for better uniqueness.

* Added public_key+fingerprint for ssh class & Modified ssh checksec_cache path to be more unique & checksec is per ssh server and not attached to a user

* Fix typeo

* Revert indentation to 10 chars

* ssh: Fix downloading data to tmp on Windows

Allows the checksec output of the target server to be generated.
Filenames cannot contain a colon ":".

* Update CHANGELOG

---------

Co-authored-by: Peace-Maker <[email protected]>
2026-04-29 07:48:54 +02:00
RocketDev bf68cc1e36 Refactor zsh completion script and deprecate -e in pwn asm (#2689)
* refactor: optimize completion script

And deprecate an interface

* chore: update changelog

* refactor: full patch of zsh comp script

* fix: add missing message in output

* fix: a typo and a missing help

* feat: allow -l to match multiple arguments

* feat: optimize completion logic

1. move all complicated functions in front of pwn()
2. add file completion for libcdb subcommands
3. add completion for pwn errno
2026-04-29 07:29:49 +02:00
Peace-Maker 0304039a07 Merge branch 'beta' into dev 2026-04-27 18:29:25 +02:00