diff options
author | hexcoder- <heiko@hexco.de> | 2020-01-07 08:39:24 +0100 |
---|---|---|
committer | hexcoder- <heiko@hexco.de> | 2020-01-07 08:39:24 +0100 |
commit | da42afe32f8772dab8b374907fe7281565e8bce5 (patch) | |
tree | d41d0ea034e89e913a7f2a5fe0f231284f4f5f29 | |
parent | f88910755b280fdd8681dfcfff62d76a4fc416e5 (diff) | |
download | afl++-da42afe32f8772dab8b374907fe7281565e8bce5.tar.gz |
undo bash -> sh change, remove some bash specific constructs.
(WIP: does not yet work with bourne shell)
-rwxr-xr-x | afl-cmin | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/afl-cmin b/afl-cmin index 129ed209..1dd782d8 100755 --- a/afl-cmin +++ b/afl-cmin @@ -1,4 +1,4 @@ -#!/usr/bin/env sh +#!/usr/bin/env bash # # american fuzzy lop++ - corpus minimization tool # --------------------------------------------- @@ -45,7 +45,7 @@ echo # Process command-line options... -MEM_LIMIT=100 +MEM_LIMIT=200 TIMEOUT=none unset IN_DIR OUT_DIR STDIN_FILE EXTRA_PAR MEM_LIMIT_GIVEN \ @@ -320,18 +320,18 @@ echo "[*] Obtaining traces for input files in '$IN_DIR'..." if [ "$STDIN_FILE" = "" ]; then - while read -r fn; do + ls "$IN_DIR" | while read -r fn; do CUR=$((CUR+1)) printf "\\r Processing file $CUR/$IN_COUNT... " "$SHOWMAP" -m "$MEM_LIMIT" -t "$TIMEOUT" -o "$TRACE_DIR/$fn" -Z $EXTRA_PAR -- "$@" <"$IN_DIR/$fn" - done < <(ls "$IN_DIR") + done else - while read -r fn; do + ls "$IN_DIR" | while read -r fn; do CUR=$((CUR+1)) printf "\\r Processing file $CUR/$IN_COUNT... " @@ -340,7 +340,7 @@ echo "[*] Obtaining traces for input files in '$IN_DIR'..." "$SHOWMAP" -m "$MEM_LIMIT" -t "$TIMEOUT" -o "$TRACE_DIR/$fn" -Z $EXTRA_PAR -A "$STDIN_FILE" -- "$@" </dev/null - done < <(ls "$IN_DIR") + done fi @@ -381,14 +381,14 @@ echo "[*] Finding best candidates for each tuple..." CUR=0 -while read -r fn; do +ls -rS "$IN_DIR" | while read -r fn; do CUR=$((CUR+1)) printf "\\r Processing file $CUR/$IN_COUNT... " sed "s#\$# $fn#" "$TRACE_DIR/$fn" >>"$TRACE_DIR/.candidate_list" -done < <(ls -rS "$IN_DIR") +done echo |