diff options
author | WorksButNotTested <62701594+WorksButNotTested@users.noreply.github.com> | 2021-06-25 22:14:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-25 23:14:27 +0200 |
commit | 6a3877dcd35d31eb79bebbc30ffe70ac0342743e (patch) | |
tree | f3ddccc0e1315a728fe5b12fdf10990f48f05298 /frida_mode/src/persistent/persistent.c | |
parent | c88b98d1c91b37c1941483980161bd46cb03c4d5 (diff) | |
download | afl++-6a3877dcd35d31eb79bebbc30ffe70ac0342743e.tar.gz |
Improved FRIDA mode scripting support (#994)
Co-authored-by: Your Name <you@example.com>
Diffstat (limited to 'frida_mode/src/persistent/persistent.c')
-rw-r--r-- | frida_mode/src/persistent/persistent.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/frida_mode/src/persistent/persistent.c b/frida_mode/src/persistent/persistent.c index e3e0b0ca..bcc59ea7 100644 --- a/frida_mode/src/persistent/persistent.c +++ b/frida_mode/src/persistent/persistent.c @@ -47,19 +47,6 @@ void persistent_config(void) { } -} - -void persistent_init(void) { - - OKF("Instrumentation - persistent mode [%c] (0x%016" G_GINT64_MODIFIER "X)", - persistent_start == 0 ? ' ' : 'X', persistent_start); - OKF("Instrumentation - persistent count [%c] (%" G_GINT64_MODIFIER "d)", - persistent_start == 0 ? ' ' : 'X', persistent_count); - OKF("Instrumentation - hook [%s]", hook_name); - - OKF("Instrumentation - persistent ret [%c] (0x%016" G_GINT64_MODIFIER "X)", - persistent_ret == 0 ? ' ' : 'X', persistent_ret); - if (hook_name == NULL) { return; } void *hook_obj = dlopen(hook_name, RTLD_NOW); @@ -79,7 +66,20 @@ void persistent_init(void) { if (persistent_hook == NULL) FATAL("Failed to find afl_persistent_hook in %s", hook_name); - __afl_sharedmem_fuzzing = 1; +} + +void persistent_init(void) { + + OKF("Instrumentation - persistent mode [%c] (0x%016" G_GINT64_MODIFIER "X)", + persistent_start == 0 ? ' ' : 'X', persistent_start); + OKF("Instrumentation - persistent count [%c] (%" G_GINT64_MODIFIER "d)", + persistent_start == 0 ? ' ' : 'X', persistent_count); + OKF("Instrumentation - hook [%s]", hook_name); + + OKF("Instrumentation - persistent ret [%c] (0x%016" G_GINT64_MODIFIER "X)", + persistent_ret == 0 ? ' ' : 'X', persistent_ret); + + if (persistent_hook != NULL) { __afl_sharedmem_fuzzing = 1; } } |