Skip to content

Commit

Permalink
Change --no-auto argument to reduce double negation
Browse files Browse the repository at this point in the history
Co-authored-by: Arusekk <[email protected]>
  • Loading branch information
peace-maker and Arusekk committed Dec 4, 2023
1 parent 6e9f512 commit fb78115
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pwnlib/commandline/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
parser.add_argument('--template', help='Path to a custom template. Tries to use \'~/.config/pwntools/templates/pwnup.mako\', if it exists. '
'Check \'%s\' for the default template shipped with pwntools.' %
os.path.join(printable_data_path, "templates", "pwnup.mako"))
parser.add_argument('--no-auto', help='Do not automatically detect missing binaries', action='store_true')
parser.add_argument('--no-auto', help='Do not automatically detect missing binaries', action='store_false', dest='auto')

def detect_missing_binaries(args):
log.info("Automatically detecting challenge binaries...")
Expand Down Expand Up @@ -86,7 +86,7 @@ def main(args):
if not args.exe:
args.exe = os.path.basename(args.path)

if not args.no_auto and (args.exe is None or args.libc is None):
if args.auto and (args.exe is None or args.libc is None):
args.exe, args.libc = detect_missing_binaries(args)

if args.template:
Expand Down

0 comments on commit fb78115

Please sign in to comment.