about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2019-09-04 12:14:35 +0200
committervan Hauser <vh@thc.org>2019-09-04 12:14:35 +0200
commit52bfd1fc3d6c1e6610469dbddad19aacb4e7f848 (patch)
treeb5de5e1cbcdc096a7d57e82aa0edb89d23baa26d /src
parenta8d96967c426f031d61dd91287906a28975334fb (diff)
downloadafl++-52bfd1fc3d6c1e6610469dbddad19aacb4e7f848.tar.gz
added man pages
Diffstat (limited to 'src')
-rw-r--r--src/README.src22
-rw-r--r--src/afl-analyze.c7
-rw-r--r--src/afl-fuzz.c7
-rw-r--r--src/afl-gcc.c8
-rw-r--r--src/afl-gotcpu.c8
-rw-r--r--src/afl-showmap.c7
-rw-r--r--src/afl-tmin.c7
7 files changed, 62 insertions, 4 deletions
diff --git a/src/README.src b/src/README.src
new file mode 100644
index 00000000..244f5ddd
--- /dev/null
+++ b/src/README.src
@@ -0,0 +1,22 @@
+Quick explanation about the files here:
+
+afl-analyze.c		- afl-analyze binary tool
+afl-as.c		- afl-as binary tool
+afl-gotcpu.c		- afl-gotcpu binary tool
+afl-showmap.c		- afl-showmap binary tool
+afl-tmin.c		- afl-tmin binary tool
+afl-fuzz.c		- afl-fuzz binary tool (just main() and usage())
+afl-fuzz-bitmap.c	- afl-fuzz bitmap handling
+afl-fuzz-extras.c	- afl-fuzz the *extra* function calls
+afl-fuzz-globals.c	- afl-fuzz global variables
+afl-fuzz-init.c		- afl-fuzz initialization
+afl-fuzz-misc.c		- afl-fuzz misc functions
+afl-fuzz-one.c          - afl-fuzz fuzzer_one big loop, this is where the mutation is happening
+afl-fuzz-python.c	- afl-fuzz the python mutator extension
+afl-fuzz-queue.c	- afl-fuzz handling the queue
+afl-fuzz-run.c		- afl-fuzz running the target
+afl-fuzz-stats.c	- afl-fuzz writing the statistics file
+afl-gcc.c		- afl-gcc binary tool (deprecated)
+afl-common.c		- common functions, used by afl-analyze, afl-fuzz, afl-showmap and afl-tmin
+afl-forkserver.c	- forkserver implementation, used by afl-fuzz and afl-tmin
+afl-sharedmem.c		- sharedmem implementation, used by afl-fuzz and afl-tmin
diff --git a/src/afl-analyze.c b/src/afl-analyze.c
index 357672b1..e30f53b8 100644
--- a/src/afl-analyze.c
+++ b/src/afl-analyze.c
@@ -900,7 +900,7 @@ int main(int argc, char** argv) {
 
   SAYF(cCYA "afl-analyze" VERSION cRST " by <lcamtuf@google.com>\n");
 
-  while ((opt = getopt(argc, argv, "+i:f:m:t:eQU")) > 0)
+  while ((opt = getopt(argc, argv, "+i:f:m:t:eQUh")) > 0)
 
     switch (opt) {
 
@@ -988,6 +988,11 @@ int main(int argc, char** argv) {
 
         unicorn_mode = 1;
         break;
+        
+      case 'h':
+        usage(argv[0]);
+        return -1;
+        break;
 
       default: usage(argv[0]);
 
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c
index e94116f5..eb0060a4 100644
--- a/src/afl-fuzz.c
+++ b/src/afl-fuzz.c
@@ -131,7 +131,7 @@ int main(int argc, char** argv) {
   gettimeofday(&tv, &tz);
   init_seed = tv.tv_sec ^ tv.tv_usec ^ getpid();
 
-  while ((opt = getopt(argc, argv, "+i:o:f:m:t:T:dnCB:S:M:x:QUe:p:s:V:E:L:")) >
+  while ((opt = getopt(argc, argv, "+i:o:f:m:t:T:dnCB:S:M:x:QUe:p:s:V:E:L:h")) >
          0)
 
     switch (opt) {
@@ -490,6 +490,11 @@ int main(int argc, char** argv) {
 
       } break;
 
+      case 'h':
+        usage(argv[0]);
+        return -1;
+        break; // not needed
+
       default: usage(argv[0]);
 
     }
diff --git a/src/afl-gcc.c b/src/afl-gcc.c
index 2dc17baf..2f72ef34 100644
--- a/src/afl-gcc.c
+++ b/src/afl-gcc.c
@@ -333,6 +333,14 @@ static void edit_params(u32 argc, char** argv) {
 
 int main(int argc, char** argv) {
 
+  if (argc == 2 && strcmp(argv[1], "-h") == 0) {
+    printf("afl-cc" VERSION" by <lcamtuf@google.com>\n\n");
+    printf("%s \n\n", argv[0]);
+    printf("afl-gcc has no command line options\n");
+    printf("NOTE: afl-gcc is deprecated, llvm_mode is much faster and has more options\n");
+    return -1;
+  }
+
   if (isatty(2) && !getenv("AFL_QUIET")) {
 
     SAYF(cCYA "afl-cc" VERSION cRST " by <lcamtuf@google.com>\n");
diff --git a/src/afl-gotcpu.c b/src/afl-gotcpu.c
index a39659bb..85864c6f 100644
--- a/src/afl-gotcpu.c
+++ b/src/afl-gotcpu.c
@@ -127,6 +127,14 @@ repeat_loop:
 
 int main(int argc, char** argv) {
 
+  if (argc > 1) {
+    printf("afl-gotcpu" VERSION " by <lcamtuf@google.com>\n");
+    printf("\n%s \n\n", argv[0]);
+    printf("afl-gotcpu does not have command line options\n");
+    printf("afl-gotcpu prints out which CPUs are available\n");
+    return -1;
+  }
+
 #ifdef HAVE_AFFINITY
 
   u32 cpu_cnt = sysconf(_SC_NPROCESSORS_ONLN), idle_cpus = 0, maybe_cpus = 0, i;
diff --git a/src/afl-showmap.c b/src/afl-showmap.c
index f3b6c561..6aa72746 100644
--- a/src/afl-showmap.c
+++ b/src/afl-showmap.c
@@ -563,7 +563,7 @@ int main(int argc, char** argv) {
 
   doc_path = access(DOC_PATH, F_OK) ? "docs" : DOC_PATH;
 
-  while ((opt = getopt(argc, argv, "+o:m:t:A:eqZQUbcr")) > 0)
+  while ((opt = getopt(argc, argv, "+o:m:t:A:eqZQUbcrh")) > 0)
 
     switch (opt) {
 
@@ -691,6 +691,11 @@ int main(int argc, char** argv) {
         if (edges_only) FATAL("-e and -r are mutually exclusive");
         raw_instr_output = 1;
         break;
+    
+      case 'h':
+        usage(argv[0]);
+        return -1;
+        break;
 
       default: usage(argv[0]);
 
diff --git a/src/afl-tmin.c b/src/afl-tmin.c
index a501b068..baf22557 100644
--- a/src/afl-tmin.c
+++ b/src/afl-tmin.c
@@ -1091,7 +1091,7 @@ int main(int argc, char** argv) {
 
   SAYF(cCYA "afl-tmin" VERSION cRST " by <lcamtuf@google.com>\n");
 
-  while ((opt = getopt(argc, argv, "+i:o:f:m:t:B:xeQU")) > 0)
+  while ((opt = getopt(argc, argv, "+i:o:f:m:t:B:xeQUh")) > 0)
 
     switch (opt) {
 
@@ -1211,6 +1211,11 @@ int main(int argc, char** argv) {
         mask_bitmap = ck_alloc(MAP_SIZE);
         read_bitmap(optarg);
         break;
+      
+      case 'h':
+        usage(argv[0]);
+        return -1;
+        break;
 
       default: usage(argv[0]);