about summary refs log tree commit diff
diff options
context:
space:
mode:
authorhexcoder- <heiko@hexco.de>2020-02-19 23:14:06 +0100
committerhexcoder- <heiko@hexco.de>2020-02-19 23:14:06 +0100
commitd375b0e0a3b5cc87f5e8fe8353340edcf15b692b (patch)
treeafcdad58de5d2f9fce4e407e795296a4dc04ca55
parent97d34b52d78ccc56b2c8a7f00173121652c34f29 (diff)
downloadafl++-d375b0e0a3b5cc87f5e8fe8353340edcf15b692b.tar.gz
fix forkserver output (support AFL_QUIET)
-rwxr-xr-xafl-cmin6
-rw-r--r--src/afl-forkserver.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/afl-cmin b/afl-cmin
index 9570bc93..41fea8a3 100755
--- a/afl-cmin
+++ b/afl-cmin
@@ -394,14 +394,12 @@ BEGIN {
   cur = 0;
   if (!stdin_file) {
     print "    Processing "in_count" files (forkserver mode)..."
-    system( "AFL_CMIN_ALLOW_ANY=1 \""showmap"\" -m "mem_limit" -t "timeout" -o \""trace_dir"\" -Z "extra_par" -i \""in_dir"\" -- \""target_bin"\" "prog_args_string)
+    system( "AFL_QUIET=1 AFL_CMIN_ALLOW_ANY=1 \""showmap"\" -m "mem_limit" -t "timeout" -o \""trace_dir"\" -Z "extra_par" -i \""in_dir"\" -- \""target_bin"\" "prog_args_string)
   } else {
     print "    Processing "in_count" files (forkserver mode)..."
-    system( "AFL_CMIN_ALLOW_ANY=1 \""showmap"\" -m "mem_limit" -t "timeout" -o \""trace_dir"\" -Z "extra_par" -i \""in_dir"\" -- \""target_bin"\" "prog_args_string" </dev/null")
+    system( "AFL_QUIET=1 AFL_CMIN_ALLOW_ANY=1 \""showmap"\" -m "mem_limit" -t "timeout" -o \""trace_dir"\" -Z "extra_par" -i \""in_dir"\" -- \""target_bin"\" "prog_args_string" </dev/null")
   }
 
-  print ""
-
   #######################################################
   # STEP 2: register smallest input file for each tuple #
   # STEP 3: copy that file (at most once)               #
diff --git a/src/afl-forkserver.c b/src/afl-forkserver.c
index b1943633..57d46391 100644
--- a/src/afl-forkserver.c
+++ b/src/afl-forkserver.c
@@ -154,7 +154,8 @@ void init_forkserver(char **argv) {
   int                     status;
   s32                     rlen;
 
-  ACTF("Spinning up the fork server...");
+  if (!getenv("AFL_QUIET"))
+    ACTF("Spinning up the fork server...");
 
   if (pipe(st_pipe) || pipe(ctl_pipe)) PFATAL("pipe() failed");
 
@@ -311,7 +312,8 @@ void init_forkserver(char **argv) {
 
   if (rlen == 4) {
 
-    OKF("All right - fork server is up.");
+    if (!getenv("AFL_QUIET"))
+      OKF("All right - fork server is up.");
     return;
 
   }