Add new APIs for the custom mutator

This commit is contained in:
h1994st
2020-03-02 15:27:29 -05:00
parent 95322c11d9
commit 7b59e05600
6 changed files with 242 additions and 65 deletions

View File

@ -155,7 +155,7 @@ static void usage(u8* argv0, int more_help) {
"LD_BIND_LAZY: do not set LD_BIND_NOW env var for target\n"
"AFL_BENCH_JUST_ONE: run the target just once\n"
"AFL_DUMB_FORKSRV: use fork server without feedback from target\n"
"AFL_CUSTOM_MUTATOR_LIBRARY: lib with afl_custom_mutator() to mutate inputs\n"
"AFL_CUSTOM_MUTATOR_LIBRARY: lib with afl_custom_fuzz() to mutate inputs\n"
"AFL_CUSTOM_MUTATOR_ONLY: avoid AFL++'s internal mutators\n"
"AFL_PYTHON_MODULE: mutate and trim inputs with the specified Python module\n"
"AFL_PYTHON_ONLY: skip AFL++'s own mutators\n"
@ -864,13 +864,6 @@ int main(int argc, char** argv, char** envp) {
setup_dirs_fds();
#ifdef USE_PYTHON
if (init_py()) FATAL("Failed to initialize Python module");
#else
if (getenv("AFL_PYTHON_MODULE"))
FATAL("Your AFL binary was built without Python support");
#endif
setup_cmdline_file(argv + optind);
read_testcases();
@ -1147,13 +1140,10 @@ stop_fuzzing:
destroy_extras();
ck_free(target_path);
ck_free(sync_id);
destroy_custom_mutator();
alloc_report();
#ifdef USE_PYTHON
finalize_py();
#endif
OKF("We're done here. Have a nice day!\n");
exit(0);