aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2021-11-16 11:03:53 +0100
committervanhauser-thc <vh@thc.org>2021-11-16 11:03:53 +0100
commit268339a683aab00f8487eac1ca31ef5d6c6abc4b (patch)
tree05bead029a76420a380c5d2625360c70743e04e8 /src
parent464f1a78dff320609d4580a7b2493dc5b527df67 (diff)
downloadafl++-268339a683aab00f8487eac1ca31ef5d6c6abc4b.tar.gz
showmap -A -> -H, accurate help output
Diffstat (limited to 'src')
-rw-r--r--src/afl-analyze.c7
-rw-r--r--src/afl-fuzz-bitmap.c6
-rw-r--r--src/afl-fuzz.c7
-rw-r--r--src/afl-showmap.c19
-rw-r--r--src/afl-tmin.c7
5 files changed, 32 insertions, 14 deletions
diff --git a/src/afl-analyze.c b/src/afl-analyze.c
index bc562c15..ac5a324c 100644
--- a/src/afl-analyze.c
+++ b/src/afl-analyze.c
@@ -848,12 +848,17 @@ static void usage(u8 *argv0) {
" -f file - input file read by the tested program (stdin)\n"
" -t msec - timeout for each run (%u ms)\n"
" -m megs - memory limit for child process (%u MB)\n"
+#if defined(__linux__) && defined(__aarch64__)
" -A - use binary-only instrumentation (ARM CoreSight mode)\n"
+#endif
" -O - use binary-only instrumentation (FRIDA mode)\n"
+#if defined(__linux__)
" -Q - use binary-only instrumentation (QEMU mode)\n"
" -U - use unicorn-based instrumentation (Unicorn mode)\n"
" -W - use qemu-based instrumentation with Wine (Wine "
- "mode)\n\n"
+ "mode)\n"
+#endif
+ "\n"
"Analysis settings:\n"
diff --git a/src/afl-fuzz-bitmap.c b/src/afl-fuzz-bitmap.c
index f7b59f25..a204e374 100644
--- a/src/afl-fuzz-bitmap.c
+++ b/src/afl-fuzz-bitmap.c
@@ -452,14 +452,12 @@ save_if_interesting(afl_state_t *afl, void *mem, u32 len, u8 fault) {
if (unlikely(len == 0)) { return 0; }
+ u8 fn[PATH_MAX];
u8 *queue_fn = "";
- u8 new_bits = '\0';
+ u8 new_bits = 0, keeping = 0, res, classified = 0;
s32 fd;
- u8 keeping = 0, res, classified = 0;
u64 cksum = 0;
- u8 fn[PATH_MAX];
-
/* Update path frequency. */
/* Generating a hash on every input is super expensive. Bad idea and should
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c
index dfd62db8..195366bd 100644
--- a/src/afl-fuzz.c
+++ b/src/afl-fuzz.c
@@ -113,12 +113,17 @@ static void usage(u8 *argv0, int more_help) {
"maximum.\n"
" -m megs - memory limit for child process (%u MB, 0 = no limit "
"[default])\n"
+#if defined(__linux__) && defined(__aarch64__)
" -A - use binary-only instrumentation (ARM CoreSight mode)\n"
+#endif
" -O - use binary-only instrumentation (FRIDA mode)\n"
+#if defined(__linux__)
" -Q - use binary-only instrumentation (QEMU mode)\n"
" -U - use unicorn-based instrumentation (Unicorn mode)\n"
" -W - use qemu-based instrumentation with Wine (Wine "
- "mode)\n\n"
+ "mode)\n"
+#endif
+ "\n"
"Mutator settings:\n"
" -D - enable deterministic fuzzing (once per queue entry)\n"
diff --git a/src/afl-showmap.c b/src/afl-showmap.c
index 899baaa0..0ba265ab 100644
--- a/src/afl-showmap.c
+++ b/src/afl-showmap.c
@@ -844,13 +844,18 @@ static void usage(u8 *argv0) {
"Execution control settings:\n"
" -t msec - timeout for each run (none)\n"
" -m megs - memory limit for child process (%u MB)\n"
+#if defined(__linux__) && defined(__aarch64__)
+ " -A - use binary-only instrumentation (ARM CoreSight mode)\n"
+#endif
" -O - use binary-only instrumentation (FRIDA mode)\n"
- " -P - use binary-only instrumentation (ARM CoreSight mode)\n"
+#if defined(__linux__)
" -Q - use binary-only instrumentation (QEMU mode)\n"
" -U - use Unicorn-based instrumentation (Unicorn mode)\n"
" -W - use qemu-based instrumentation with Wine (Wine mode)\n"
" (Not necessary, here for consistency with other afl-* "
- "tools)\n\n"
+ "tools)\n"
+#endif
+ "\n"
"Other settings:\n"
" -i dir - process all files below this directory, must be combined "
"with -o.\n"
@@ -920,7 +925,7 @@ int main(int argc, char **argv_orig, char **envp) {
if (getenv("AFL_QUIET") != NULL) { be_quiet = true; }
- while ((opt = getopt(argc, argv, "+i:o:f:m:t:A:eqCZOPQUWbcrsh")) > 0) {
+ while ((opt = getopt(argc, argv, "+i:o:f:m:t:A:eqCZOHQUWbcrsh")) > 0) {
switch (opt) {
@@ -1049,7 +1054,7 @@ int main(int argc, char **argv_orig, char **envp) {
quiet_mode = true;
break;
- case 'A':
+ case 'H':
/* Another afl-cmin specific feature. */
at_file = optarg;
break;
@@ -1065,13 +1070,13 @@ int main(int argc, char **argv_orig, char **envp) {
/* FIXME: We want to use -P for consistency, but it is already unsed for
* undocumenetd feature "Another afl-cmin specific feature." */
- case 'P': /* CoreSight mode */
+ case 'A': /* CoreSight mode */
#if !defined(__aarch64__) || !defined(__linux__)
- FATAL("-P option is not supported on this platform");
+ FATAL("-A option is not supported on this platform");
#endif
- if (fsrv->cs_mode) { FATAL("Multiple -P options not supported"); }
+ if (fsrv->cs_mode) { FATAL("Multiple -A options not supported"); }
fsrv->cs_mode = true;
break;
diff --git a/src/afl-tmin.c b/src/afl-tmin.c
index 22383a4e..89546c45 100644
--- a/src/afl-tmin.c
+++ b/src/afl-tmin.c
@@ -866,14 +866,19 @@ static void usage(u8 *argv0) {
" -f file - input file read by the tested program (stdin)\n"
" -t msec - timeout for each run (%u ms)\n"
" -m megs - memory limit for child process (%u MB)\n"
+#if defined(__linux__) && defined(__aarch64__)
" -A - use binary-only instrumentation (ARM CoreSight mode)\n"
+#endif
" -O - use binary-only instrumentation (FRIDA mode)\n"
+#if defined(__linux__)
" -Q - use binary-only instrumentation (QEMU mode)\n"
" -U - use unicorn-based instrumentation (Unicorn mode)\n"
" -W - use qemu-based instrumentation with Wine (Wine "
"mode)\n"
" (Not necessary, here for consistency with other afl-* "
- "tools)\n\n"
+ "tools)\n"
+#endif
+ "\n"
"Minimization settings:\n"