io12 / pwninit

pwninit - automate starting binary exploit challenges

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DEBUG check in template doesn't work?

poniponiponiponiponiponiponiponiponi opened this issue · comments

I don't know if it's a bug in pwntools or what but the check if args.DEBUG: in the standard template doesn't work for me. It seems like launching solve.py with python3 solve.py LOCAL DEBUG only changes the log_level to debug.

commented

I am having the same issue. The code in pwntools appears to deliberately not expose arguments it hooks internally in args anymore.
From args.py 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.
https://github.com/Gallopsled/pwntools/blob/dev/pwnlib/args.py#L19

Maybe the default template should change to something else like args.GDB