about summary refs log tree commit diff
path: root/llvm_mode/afl-clang-fast.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2019-09-16 15:17:14 +0200
committervan Hauser <vh@thc.org>2019-09-16 15:17:14 +0200
commit46ac5590037af101cd17fcdc9b488cfc483523b0 (patch)
tree6deaece5cdd9d1b84c2f98314be638fc35f5a9fd /llvm_mode/afl-clang-fast.c
parentcaba176c874b0dcab3cc3f905613b85484948580 (diff)
downloadafl++-46ac5590037af101cd17fcdc9b488cfc483523b0.tar.gz
man page for afl-clang-fast
Diffstat (limited to 'llvm_mode/afl-clang-fast.c')
-rw-r--r--llvm_mode/afl-clang-fast.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/llvm_mode/afl-clang-fast.c b/llvm_mode/afl-clang-fast.c
index 2c25f4de..1925f5f8 100644
--- a/llvm_mode/afl-clang-fast.c
+++ b/llvm_mode/afl-clang-fast.c
@@ -375,20 +375,16 @@ static void edit_params(u32 argc, char** argv) {
 
 int main(int argc, char** argv) {
 
-  if (isatty(2) && !getenv("AFL_QUIET")) {
+  if (argc < 2 || strcmp(argv[1], "-h") == 0) {
 
 #ifdef USE_TRACE_PC
-    SAYF(cCYA "afl-clang-fast" VERSION cRST
-              " [tpcg] by <lszekeres@google.com>\n");
+    printf(cCYA "afl-clang-fast" VERSION cRST
+                " [tpcg] by <lszekeres@google.com>\n"
 #else
-    SAYF(cCYA "afl-clang-fast" VERSION cRST " by <lszekeres@google.com>\n");
+    printf(cCYA "afl-clang-fast" VERSION cRST " by <lszekeres@google.com>\n"
 #endif                                                     /* ^USE_TRACE_PC */
-
-  }
-
-  if (argc < 2) {
-
-    SAYF(
+        "\n"
+        "afl-clang-fast[++] [options]\n"
         "\n"
         "This is a helper application for afl-fuzz. It serves as a drop-in "
         "replacement\n"
@@ -412,6 +408,15 @@ int main(int argc, char** argv) {
 
     exit(1);
 
+  } else if (isatty(2) && !getenv("AFL_QUIET")) {
+
+#ifdef USE_TRACE_PC
+    SAYF(cCYA "afl-clang-fast" VERSION cRST
+              " [tpcg] by <lszekeres@google.com>\n");
+#else
+    SAYF(cCYA "afl-clang-fast" VERSION cRST " by <lszekeres@google.com>\n");
+#endif                                                     /* ^USE_TRACE_PC */
+
   }
 
   find_obj(argv[0]);