mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-13 02:28:09 +00:00
call afl-cmin.py if it can be executed successfully
This commit is contained in:
14
afl-cmin
14
afl-cmin
@ -4,11 +4,17 @@ test "$SYS" = "Darwin" && {
|
|||||||
echo Error: afl-cmin does not work on Apple currently. please use afl-cmin.bash instead.
|
echo Error: afl-cmin does not work on Apple currently. please use afl-cmin.bash instead.
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
THISPATH=`dirname ${0}`
|
||||||
|
|
||||||
|
# call afl-cmin.py if it can be executed successfully.
|
||||||
|
if $THISPATH/afl-cmin.py --help > /dev/null 2>&1; then
|
||||||
|
exec $THISPATH/afl-cmin.py "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
export AFL_QUIET=1
|
export AFL_QUIET=1
|
||||||
export ASAN_OPTIONS=detect_leaks=0
|
export ASAN_OPTIONS=detect_leaks=0
|
||||||
THISPATH=`dirname ${0}`
|
|
||||||
export PATH="${THISPATH}:$PATH"
|
export PATH="${THISPATH}:$PATH"
|
||||||
awk -v script_dir="$THISPATH" -f - -- ${@+"$@"} <<'EOF'
|
awk -f - -- ${@+"$@"} <<'EOF'
|
||||||
#!/usr/bin/awk -f
|
#!/usr/bin/awk -f
|
||||||
# awk script to minimize a test corpus of input files
|
# awk script to minimize a test corpus of input files
|
||||||
#
|
#
|
||||||
@ -258,10 +264,6 @@ BEGIN {
|
|||||||
# sanity checks
|
# sanity checks
|
||||||
if (!prog_args[0] || !in_dir || !out_dir) usage()
|
if (!prog_args[0] || !in_dir || !out_dir) usage()
|
||||||
|
|
||||||
if (0 == system( script_dir "/afl-cmin.py --help > /dev/null 2>&1" )) {
|
|
||||||
print "[*] Are you aware of the experimental afl-cmin.py that minimize corpus much faster?"
|
|
||||||
}
|
|
||||||
|
|
||||||
target_bin = prog_args[0]
|
target_bin = prog_args[0]
|
||||||
|
|
||||||
# Do a sanity check to discourage the use of /tmp, since we can't really
|
# Do a sanity check to discourage the use of /tmp, since we can't really
|
||||||
|
Reference in New Issue
Block a user