Skip to content
Snippets Groups Projects
Commit 1b083cdf authored by Anh Nguyen-Tuong's avatar Anh Nguyen-Tuong
Browse files

Add option to pass arbitrary args to $PSZ

parent fe10b5b1
No related branches found
No related tags found
No related merge requests found
Pipeline #3502 canceled
......@@ -43,6 +43,7 @@ usage()
echo " -b, --blacklist <file> Specify function blacklist (one function per line)"
echo " -l, --enable-laf Enable laf-intel style instrumentation"
echo " -L, --disable-laf Disable laf-intel style instrumentation"
echo " -a, --args <args> Add extra args to be passed to backend analysis engine"
echo " -v Verbose mode"
echo
}
......@@ -58,7 +59,7 @@ trace_opt=""
zipr_opt=""
random_seed=""
laf_opt=""
extra_args=""
me=$(whoami)
tmp_dir=/tmp/${me}/$$
......@@ -116,6 +117,11 @@ parse_args()
ida_or_rida_opt=" -s rida "
shift
;;
-a | --args)
shift
extra_args=" $extra_args $1"
shift
;;
-s | --stars)
stars_opt=" -o zax:--stars "
shift
......@@ -346,7 +352,7 @@ verify_zafl_symbols()
fi
}
parse_args $*
parse_args "$@"
if [ -z "$entry_opt" ]; then
find_main
else
......@@ -372,7 +378,7 @@ then
fi
zax_opt=" $zax_opt $float_opt "
cmd="$ZAFL_TM_ENV $PSZ $input_binary $output_zafl_binary $ida_or_rida_opt -s move_globals $optional_step -c zax -o move_globals:--elftables-only -o move_globals:--no-use-stars $stars_opt $zax_opt $verbose_opt $options $other_args $trace_opt $zipr_opt"
cmd="$ZAFL_TM_ENV $PSZ $input_binary $output_zafl_binary $ida_or_rida_opt -s move_globals $optional_step -c zax -o move_globals:--elftables-only -o move_globals:--no-use-stars $stars_opt $zax_opt $verbose_opt $options $other_args $trace_opt $zipr_opt $extra_args"
if [ ! -z "$ZAFL_TM_ENV" ]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment