persistent record for frida and qmeu

This commit is contained in:
vanhauser-thc
2024-10-01 10:13:35 +02:00
parent b88f132975
commit 146e535f7b
4 changed files with 43 additions and 22 deletions

View File

@ -1237,19 +1237,26 @@ void perform_dry_run(afl_state_t *afl) {
u8 crash_log_fn[PATH_MAX];
snprintf(crash_log_fn, PATH_MAX, "%s.log", crash_fn);
fd = open(crash_log_fn, O_WRONLY | O_CREAT | O_EXCL, DEFAULT_PERMISSION);
if (unlikely(fd < 0)) { PFATAL("Unable to create '%s'", crash_log_fn); }
fd = open(crash_log_fn, O_WRONLY | O_CREAT | O_EXCL,
DEFAULT_PERMISSION);
if (unlikely(fd < 0)) {
PFATAL("Unable to create '%s'", crash_log_fn);
}
u32 nyx_aux_string_len = afl->fsrv.nyx_handlers->nyx_get_aux_string(
afl->fsrv.nyx_runner, afl->fsrv.nyx_aux_string,
afl->fsrv.nyx_aux_string_len);
ck_write(fd, afl->fsrv.nyx_aux_string, nyx_aux_string_len, crash_log_fn);
ck_write(fd, afl->fsrv.nyx_aux_string, nyx_aux_string_len,
crash_log_fn);
close(fd);
}
#endif
afl->last_crash_time = get_cur_time();
afl->last_crash_execs = afl->fsrv.total_execs;
@ -2905,6 +2912,7 @@ void check_binary(afl_state_t *afl, u8 *fname) {
afl->fsrv.target_path);
}
#endif
if (stat(afl->fsrv.target_path, &st) || !S_ISREG(st.st_mode) ||