Fix to handling of persistent mode using JS

This commit is contained in:
Your Name
2021-11-11 18:32:35 +00:00
parent a15b5ef458
commit b033a2d98b
2 changed files with 9 additions and 0 deletions

View File

@ -47,6 +47,14 @@ __attribute__((visibility("default"))) void js_api_set_persistent_address(
persistent_start = GPOINTER_TO_SIZE(address);
if (getenv("__AFL_PERSISTENT") == NULL) {
FATAL(
"You must set __AFL_PERSISTENT manually if using persistent mode "
"configured using JS");
}
}
__attribute__((visibility("default"))) void js_api_set_persistent_return(

View File

@ -144,6 +144,7 @@ frida_entry_slow: $(AFLPP_DRIVER_DUMMY_INPUT) $(AFLPP_FRIDA_DRIVER_HOOK_OBJ) | $
frida_js_load: $(AFLPP_DRIVER_DUMMY_INPUT) $(AFLPP_FRIDA_DRIVER_HOOK_OBJ) | $(BUILD_DIR)
AFL_PRELOAD=$(AFL_PRELOAD) \
__AFL_PERSISTENT=1 \
AFL_FRIDA_JS_SCRIPT=load.js \
$(ROOT)afl-fuzz \
-D \