aboutsummaryrefslogtreecommitdiff
path: root/afl-cmin.bash
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-06-29 18:36:06 +0200
committerGitHub <noreply@github.com>2020-06-29 18:36:06 +0200
commitfc5cfc6cb309b072a45b991be117c17396e46a89 (patch)
tree4c762f1e2cfb4a8741c08b5b60d07c2ae8eee860 /afl-cmin.bash
parent76a2d9b59b23873c8a6d174a2f3c48eba60712fb (diff)
parent6d9b29daca46c8912aa9ddf6c053bc8554e9e9f7 (diff)
downloadafl++-fc5cfc6cb309b072a45b991be117c17396e46a89.tar.gz
Merge pull request #428 from AFLplusplus/dev
Dev
Diffstat (limited to 'afl-cmin.bash')
-rwxr-xr-xafl-cmin.bash49
1 files changed, 24 insertions, 25 deletions
diff --git a/afl-cmin.bash b/afl-cmin.bash
index 1f23f6bc..3e29aa5c 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.
@@ -246,7 +245,7 @@ if [ ! "$STDIN_FILE" = "" ]; then
fi
if [ "$AFL_PATH" = "" ]; then
- SHOWMAP="${0%/afl-cmin}/afl-showmap"
+ SHOWMAP="${0%/afl-cmin.bash}/afl-showmap"
else
SHOWMAP="$AFL_PATH/afl-showmap"
fi