Trait libafl::fuzzer::Fuzzer[][src]

pub trait Fuzzer<E, EM, I, S, ST> {
    fn fuzz_one(
        &mut self,
        stages: &mut ST,
        executor: &mut E,
        state: &mut S,
        manager: &mut EM
    ) -> Result<usize, Error>;
fn maybe_report_stats(
        state: &mut S,
        manager: &mut EM,
        last: Duration,
        stats_timeout: Duration
    ) -> Result<Duration, Error>; fn fuzz_loop(
        &mut self,
        stages: &mut ST,
        executor: &mut E,
        state: &mut S,
        manager: &mut EM
    ) -> Result<usize, Error> { ... }
fn fuzz_loop_for(
        &mut self,
        stages: &mut ST,
        state: &mut S,
        executor: &mut E,
        manager: &mut EM,
        iters: u64
    ) -> Result<usize, Error> { ... } }
Expand description

The main fuzzer trait.

Required methods

Fuzz for a single iteration Returns the index of the last fuzzed corpus item

If you use this fn in a restarting scenario to only run for n iterations, before exiting, make sure you call event_mgr.on_restart(&mut state)?;. This way, the state will be available in the next, respawned, iteration.

Given the last time, if stats_timeout seconds passed, send off an info/stats/heartbeat message to the broker. Returns the new last time (so the old one, unless stats_timeout time has passed and stats have been sent) Will return an crate::Error, if the stats could not be sent.

Provided methods

Fuzz forever (or until stopped)

Fuzz for n iterations Returns the index of the last fuzzed corpus item

If you use this fn in a restarting scenario to only run for n iterations, before exiting, make sure you call event_mgr.on_restart(&mut state)?;. This way, the state will be available in the next, respawned, iteration.

Implementors