diff options
author | van Hauser <vh@thc.org> | 2022-06-28 14:18:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-28 14:18:44 +0200 |
commit | 40947508037b874020c8dd1251359fecaab04b9d (patch) | |
tree | e512d9b04e55c619adaefb22cd9ed1e33eac1feb /afl-cmin | |
parent | ba3c7bfe40f9b17a691958e3525828385127ad25 (diff) | |
parent | 92352951d7a8485bd2413009fcd052e85dc398fb (diff) | |
download | afl++-4.01c.tar.gz |
Merge pull request #1438 from AFLplusplus/dev 4.01c
push to stable
Diffstat (limited to 'afl-cmin')
-rwxr-xr-x | afl-cmin | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/afl-cmin b/afl-cmin index 853c9398..71723c70 100755 --- a/afl-cmin +++ b/afl-cmin @@ -135,6 +135,12 @@ function exists_and_is_executable(binarypath) { } BEGIN { + if (0 != system( "test -t 1")) { + redirected = 1 + } else { + redirected = 0 + } + print "corpus minimization tool for afl++ (awk version)\n" # defaults @@ -463,7 +469,8 @@ BEGIN { while (cur < in_count) { fn = infilesSmallToBig[cur] ++cur - printf "\r Processing file "cur"/"in_count + if (redirected == 0) { printf "\r Processing file "cur"/"in_count } + else { print " Processing file "cur"/"in_count } # create path for the trace file from afl-showmap tracefile_path = trace_dir"/"fn # gather all keys, and count them @@ -502,7 +509,9 @@ BEGIN { key = field[nrFields] ++tcnt; - printf "\r Processing tuple "tcnt"/"tuple_count" with count "key_count[key]"..." + if (redirected == 0) { printf "\r Processing tuple "tcnt"/"tuple_count" with count "key_count[key]"..." } + else { print " Processing tuple "tcnt"/"tuple_count" with count "key_count[key]"..." } + if (key in keyAlreadyKnown) { continue } |