Skip to content

Commit

Permalink
pwn template: Don't search for challenge binary when already given (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
peace-maker committed Feb 21, 2024
1 parent eb0043a commit c17f835
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pwnlib/commandline/template.py
Expand Up @@ -47,10 +47,11 @@ def detect_missing_binaries(args):
else:
if os.access(filename, os.X_OK):
other_files.append(filename)
if len(other_files) == 1:
exe = other_files[0]
elif len(other_files) > 1:
log.warning("Failed to find challenge binary. There are multiple binaries in the current directory: %s", other_files)
if not exe:
if len(other_files) == 1:
exe = other_files[0]
elif len(other_files) > 1:
log.warning("Failed to find challenge binary. There are multiple binaries in the current directory: %s", other_files)

if exe != args.exe:
log.success("Found challenge binary %r", exe)
Expand Down

0 comments on commit c17f835

Please sign in to comment.