Skip to content

Commit

Permalink
winafl-cmin: adding a gatekeeper if no @@ has been passed in the comm…
Browse files Browse the repository at this point in the history
…and line
  • Loading branch information
Axel '0vercl0k' Souchet committed Aug 16, 2017
1 parent a725112 commit a944242
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions winafl-cmin.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,15 @@ def main(argc, argv):
if args.target_cmdline[0] == '--':
del args.target_cmdline[0]

# If we are not seeing the '@@' marker somewhere and that we are not
# specifying an input file with -f, then it means something is wrong
if args.file_read is None and '@@' not in args.target_cmdline:
logging.error(
'[!] The target command line needs to include the "@@" marker to'
' specify the input file.'
)
return 1

if os.path.isdir(args.working_dir) is False:
logging.error(
'[!] The working directory %r is not a directory', args.working_dir
Expand Down

0 comments on commit a944242

Please sign in to comment.