mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-14 19:08:08 +00:00
write nyx crash logs to AFL++ work directory
This commit is contained in:
@ -771,6 +771,20 @@ save_if_interesting(afl_state_t *afl, void *mem, u32 len, u8 fault) {
|
||||
ck_write(fd, mem, len, fn);
|
||||
close(fd);
|
||||
|
||||
if(afl->fsrv.nyx_mode && fault == FSRV_RUN_CRASH) {
|
||||
u8 fn_log[PATH_MAX];
|
||||
|
||||
snprintf(fn_log, PATH_MAX, "%s.log", fn);
|
||||
|
||||
fd = open(fn_log, O_WRONLY | O_CREAT | O_EXCL, DEFAULT_PERMISSION);
|
||||
if (unlikely(fd < 0)) { PFATAL("Unable to create '%s'", fn_log); }
|
||||
|
||||
u32 nyx_aux_string_len = afl->fsrv.nyx_handlers->nyx_get_aux_string(afl->fsrv.nyx_runner, afl->fsrv.nyx_aux_string, 0x1000);
|
||||
|
||||
ck_write(fd, afl->fsrv.nyx_aux_string, nyx_aux_string_len, fn_log);
|
||||
close(fd);
|
||||
}
|
||||
|
||||
return keeping;
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user