mirror of
https://github.com/Gallopsled/pwntools.git
synced 2026-10-12 02:02:27 +00:00
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.
This commit is contained in:
@@ -75,6 +75,7 @@ The table below shows which release corresponds to each branch, and what date th
|
||||
|
||||
## 5.0.0 (`dev`)
|
||||
|
||||
- [#2753][2753] docs(args): clarify reserved args (DEBUG/NOASLR) map to context, not args
|
||||
- [#2740][2740] setup: install docs to FHS-compliant share/doc/pwntools
|
||||
- [#2739][2739] shellcraft: migrate lazy importer to find_spec for Python 3.12+
|
||||
- [#2725][2725] feat(libcdb): add extra_mirrors arg + PWNLIB_EXTRA_LIBC_MIRRORS env to download_libraries
|
||||
@@ -209,6 +210,7 @@ The table below shows which release corresponds to each branch, and what date th
|
||||
[2746]: https://github.com/Gallopsled/pwntools/pull/2746
|
||||
[2734]: https://github.com/Gallopsled/pwntools/pull/2734
|
||||
[2735]: https://github.com/Gallopsled/pwntools/pull/2735
|
||||
[2753]: https://github.com/Gallopsled/pwntools/pull/2753
|
||||
|
||||
## 4.15.1
|
||||
|
||||
|
||||
+4
-1
@@ -17,7 +17,10 @@ The easiest example is to enable more verbose debugging. Just set ``DEBUG``.
|
||||
These arguments are automatically extracted, regardless of their name, and
|
||||
exposed via :mod:`pwnlib.args.args`, which is exposed as the global variable
|
||||
:data:`args`. Arguments which ``pwntools`` reserves internally are not exposed
|
||||
this way.
|
||||
this way. These reserved arguments (such as ``DEBUG`` and ``NOASLR``) instead
|
||||
adjust :data:`pwnlib.context.context`, so their effect is read from ``context``
|
||||
(e.g. ``context.log_level``, ``context.aslr``) rather than from ``args`` --
|
||||
``args.NOASLR`` is always the empty string.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
|
||||
@@ -53,9 +53,12 @@ exe = ${binary_repr}
|
||||
%endif
|
||||
|
||||
%if not quiet:
|
||||
# Many built-in settings can be controlled on the command-line and show up
|
||||
# in "args". For example, to dump all data sent/received, and disable ASLR
|
||||
# for all created processes...
|
||||
# Many built-in settings can be controlled on the command-line. Reserved
|
||||
# "magic arguments" such as DEBUG and NOASLR adjust pwntools' behavior via
|
||||
# "context" (e.g. context.log_level, context.aslr) and are NOT stored in
|
||||
# "args"; other arguments (HOST, PORT, EXE, ...) show up in "args". For
|
||||
# example, to dump all data sent/received, and disable ASLR for all created
|
||||
# processes...
|
||||
# ./exploit.py DEBUG NOASLR
|
||||
%if host or port or user:
|
||||
# ./exploit.py GDB HOST=example.com PORT=4141 EXE=/tmp/executable
|
||||
|
||||
Reference in New Issue
Block a user