diff options
author | van Hauser <vh@thc.org> | 2020-06-22 07:16:24 +0200 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2020-06-22 07:16:24 +0200 |
commit | a49b5ef072011cc840c37653d6f6469dc3671968 (patch) | |
tree | 7af2c14d523544c76f382147f483334d425eeb66 /afl-cmin.bash | |
parent | 5cad92e57ecda270753cf70311a7ac1ff6fdcc9e (diff) | |
download | afl++-a49b5ef072011cc840c37653d6f6469dc3671968.tar.gz |
allow /tmp
Diffstat (limited to 'afl-cmin.bash')
-rwxr-xr-x | afl-cmin.bash | 47 |
1 files changed, 23 insertions, 24 deletions
diff --git a/afl-cmin.bash b/afl-cmin.bash index 1f23f6bc..bdef1edc 100755 --- a/afl-cmin.bash +++ b/afl-cmin.bash @@ -134,7 +134,6 @@ Environment variables used: AFL_KEEP_TRACES: leave the temporary <out_dir>\.traces directory AFL_PATH: path for the afl-showmap binary AFL_SKIP_BIN_CHECK: skip check for target binary -AFL_ALLOW_TMP: allow unsafe use of input/output directories under {/var}/tmp _EOF_ exit 1 fi @@ -142,29 +141,29 @@ fi # Do a sanity check to discourage the use of /tmp, since we can't really # handle this safely from a shell script. -if [ "$AFL_ALLOW_TMP" = "" ]; then - - echo "$IN_DIR" | grep -qE '^(/var)?/tmp/' - T1="$?" - - echo "$TARGET_BIN" | grep -qE '^(/var)?/tmp/' - T2="$?" - - echo "$OUT_DIR" | grep -qE '^(/var)?/tmp/' - T3="$?" - - echo "$STDIN_FILE" | grep -qE '^(/var)?/tmp/' - T4="$?" - - echo "$PWD" | grep -qE '^(/var)?/tmp/' - T5="$?" - - if [ "$T1" = "0" -o "$T2" = "0" -o "$T3" = "0" -o "$T4" = "0" -o "$T5" = "0" ]; then - echo "[-] Error: do not use this script in /tmp or /var/tmp." 1>&2 - exit 1 - fi - -fi +#if [ "$AFL_ALLOW_TMP" = "" ]; then +# +# echo "$IN_DIR" | grep -qE '^(/var)?/tmp/' +# T1="$?" +# +# echo "$TARGET_BIN" | grep -qE '^(/var)?/tmp/' +# T2="$?" +# +# echo "$OUT_DIR" | grep -qE '^(/var)?/tmp/' +# T3="$?" +# +# echo "$STDIN_FILE" | grep -qE '^(/var)?/tmp/' +# T4="$?" +# +# echo "$PWD" | grep -qE '^(/var)?/tmp/' +# T5="$?" +# +# if [ "$T1" = "0" -o "$T2" = "0" -o "$T3" = "0" -o "$T4" = "0" -o "$T5" = "0" ]; then +# echo "[-] Error: do not use this script in /tmp or /var/tmp." 1>&2 +# exit 1 +# fi +# +#fi # If @@ is specified, but there's no -f, let's come up with a temporary input # file name. |