Skip to content

docs(args): clarify reserved args (DEBUG/NOASLR) map to context, not args#2753

Open
citizen204 wants to merge 1 commit into
Gallopsled:devfrom
citizen204:fix-2564-args-noaslr-docs
Open

docs(args): clarify reserved args (DEBUG/NOASLR) map to context, not args#2753
citizen204 wants to merge 1 commit into
Gallopsled:devfrom
citizen204:fix-2564-args-noaslr-docs

Conversation

@citizen204

Copy link
Copy Markdown

Summary

As reported in #2564, users try to check args.NOASLR and find it is always empty. The root cause is a documentation gap: reserved "magic arguments" like DEBUG and NOASLR are consumed as hooks in pwnlib/args.py that adjust context (context.log_level, context.aslr). They are never stored in the args dict, so args.NOASLR always evaluates to the empty string.

The generated pwnup exploit template — the first thing most users see — reinforced the wrong mental model by commenting that these settings "show up in args". This PR corrects that comment and adds a matching clarification to the pwnlib.args module docstring.

Fixes #2564

Changes

  • pwnlib/data/templates/pwnup.mako: reword the command-line-arguments comment so it distinguishes reserved arguments (DEBUG/NOASLR → context) from arguments that actually appear in args (HOST, PORT, EXE, ...).
  • pwnlib/args.py: extend the module docstring to state that reserved arguments adjust context and that their effect is read from context (e.g. context.aslr), not args.

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 Gallopsled#2564
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[docs] Inform users about using context.aslr instead of non-exist args.NOASLR

1 participant