mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-11 09:41:35 +00:00
Merge pull request #2408 from smoelius/color-no-ui-output
Color `AFL_NO_UI` output
This commit is contained in:
commit
aa1c58a077
@ -411,11 +411,12 @@ u8 fuzz_one_original(afl_state_t *afl) {
|
|||||||
u_simplestring_time_diff(time_tmp, afl->prev_run_time + get_cur_time(),
|
u_simplestring_time_diff(time_tmp, afl->prev_run_time + get_cur_time(),
|
||||||
afl->start_time);
|
afl->start_time);
|
||||||
ACTF(
|
ACTF(
|
||||||
"Fuzzing test case #%u (%u total, %llu crashes saved, state: %s, "
|
"Fuzzing test case #%u (%u total, %s%llu crashes saved%s, state: %s, "
|
||||||
"mode=%s, "
|
"mode=%s, "
|
||||||
"perf_score=%0.0f, weight=%0.0f, favorite=%u, was_fuzzed=%u, "
|
"perf_score=%0.0f, weight=%0.0f, favorite=%u, was_fuzzed=%u, "
|
||||||
"exec_us=%llu, hits=%u, map=%u, ascii=%u, run_time=%s)...",
|
"exec_us=%llu, hits=%u, map=%u, ascii=%u, run_time=%s)...",
|
||||||
afl->current_entry, afl->queued_items, afl->saved_crashes,
|
afl->current_entry, afl->queued_items,
|
||||||
|
afl->saved_crashes != 0 ? cRED : "", afl->saved_crashes, cRST,
|
||||||
get_fuzzing_state(afl), afl->fuzz_mode ? "exploit" : "explore",
|
get_fuzzing_state(afl), afl->fuzz_mode ? "exploit" : "explore",
|
||||||
afl->queue_cur->perf_score, afl->queue_cur->weight,
|
afl->queue_cur->perf_score, afl->queue_cur->weight,
|
||||||
afl->queue_cur->favored, afl->queue_cur->was_fuzzed,
|
afl->queue_cur->favored, afl->queue_cur->was_fuzzed,
|
||||||
|
@ -28,8 +28,13 @@
|
|||||||
#include "envs.h"
|
#include "envs.h"
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
static char fuzzing_state[4][12] = {"started :-)", "in progress", "final phase",
|
// 7 is the number of characters in a color control code
|
||||||
"finished..."};
|
// 11 is the number of characters in the fuzzing state itself
|
||||||
|
// 5 is the number of characters in `cRST`
|
||||||
|
// 1 is for the null character
|
||||||
|
static char fuzzing_state[4][7 + 11 + 5 + 1] = {
|
||||||
|
|
||||||
|
"started :-)", "in progress", "final phase", cRED "finished..." cRST};
|
||||||
|
|
||||||
char *get_fuzzing_state(afl_state_t *afl) {
|
char *get_fuzzing_state(afl_state_t *afl) {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user