about summary refs log tree commit diff
path: root/afl-cmin.bash
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2021-03-25 19:42:27 +0100
committerGitHub <noreply@github.com>2021-03-25 19:42:27 +0100
commit00a53a870d7ccd24e13e6cb2bbbd7535964f7737 (patch)
tree18a123e6c48bb9d3ffd31e87c818c35da60cb562 /afl-cmin.bash
parent0029c1a83ef03825c2d19c73151189f159458496 (diff)
parent1725e6be316b57e89df2a077710b66b684b55242 (diff)
downloadafl++-00a53a870d7ccd24e13e6cb2bbbd7535964f7737.tar.gz
Merge pull request #833 from WorksButNotTested/frida
Frida
Diffstat (limited to 'afl-cmin.bash')
-rwxr-xr-xafl-cmin.bash9
1 files changed, 7 insertions, 2 deletions
diff --git a/afl-cmin.bash b/afl-cmin.bash
index 5b2c3894..f4bd269d 100755
--- a/afl-cmin.bash
+++ b/afl-cmin.bash
@@ -53,7 +53,7 @@ unset IN_DIR OUT_DIR STDIN_FILE EXTRA_PAR MEM_LIMIT_GIVEN \
 
 export AFL_QUIET=1
 
-while getopts "+i:o:f:m:t:eQUCh" opt; do
+while getopts "+i:o:f:m:t:eOQUCh" opt; do
 
   case "$opt" in 
 
@@ -83,6 +83,10 @@ while getopts "+i:o:f:m:t:eQUCh" opt; do
     "C")
          export AFL_CMIN_CRASHES_ONLY=1
          ;;
+    "O")
+         EXTRA_PAR="$EXTRA_PAR -O"
+         FRIDA_MODE=1
+         ;;         
     "Q")
          EXTRA_PAR="$EXTRA_PAR -Q"
          QEMU_MODE=1
@@ -118,6 +122,7 @@ Execution control settings:
   -f file       - location read by the fuzzed program (stdin)
   -m megs       - memory limit for child process ($MEM_LIMIT MB)
   -t msec       - run time limit for child process (none)
+  -O            - use binary-only instrumentation (FRIDA mode)
   -Q            - use binary-only instrumentation (QEMU mode)
   -U            - use unicorn-based instrumentation (Unicorn mode)
   
@@ -209,7 +214,7 @@ if [ ! -f "$TARGET_BIN" -o ! -x "$TARGET_BIN" ]; then
 
 fi
 
-if [ "$AFL_SKIP_BIN_CHECK" = "" -a "$QEMU_MODE" = "" -a "$UNICORN_MODE" = "" ]; then
+if [ "$AFL_SKIP_BIN_CHECK" = "" -a "$QEMU_MODE" = "" -a "$FRIDA_MODE" = "" -a "$UNICORN_MODE" = "" ]; then
 
   if ! grep -qF "__AFL_SHM_ID" "$TARGET_BIN"; then
     echo "[-] Error: binary '$TARGET_BIN' doesn't appear to be instrumented." 1>&2