diff --git a/afl/src/engines/mod.rs b/afl/src/engines/mod.rs index 0eb5739a1f..b17c9e05a9 100644 --- a/afl/src/engines/mod.rs +++ b/afl/src/engines/mod.rs @@ -83,7 +83,7 @@ where let attr = attributes?; if attr.is_file() && attr.len() > 0 { - println!("Load file {:?}", &path); + println!("Loading file {:?} ...", &path); let bytes = std::fs::read(&path)?; let input = BytesInput::new(bytes); let fitness = self.evaluate_input(&input, engine.executor_mut())?; @@ -118,7 +118,7 @@ where } manager.log( 0, - format!("Loaded {} initial testcases", in_dirs.len()), // get corpus count + format!("Loaded {} initial testcases.", corpus.count()), // get corpus count )?; manager.process(self, corpus)?; Ok(()) diff --git a/fuzzers/libfuzzer/src/lib.rs b/fuzzers/libfuzzer/src/lib.rs index 1011c7e5a1..390dd617ff 100644 --- a/fuzzers/libfuzzer/src/lib.rs +++ b/fuzzers/libfuzzer/src/lib.rs @@ -104,25 +104,14 @@ pub extern "C" fn afl_libfuzzer_main() { println!("Information: the first process started is the broker and only processes the \'-p PORT\' option if present."); } - // debug prints - - println!("workdir: {:?}", workdir); - - match dictionary { - Some(x) => for file in x { - println!("dic: {:?}", file); - }, - None => (), - } - - // original code + println!("Workdir: {:?}", workdir); let mut rand = StdRand::new(0); let mut corpus = InMemoryCorpus::new(); let mut generator = RandPrintablesGenerator::new(32); - let stats = SimpleStats::new(|s| println!("{}", s)); let mut mgr = LlmpEventManager::new_on_port(broker_port, stats).unwrap(); + if mgr.is_broker() { println!("Doing broker things."); mgr.broker_loop().unwrap(); @@ -148,15 +137,9 @@ pub extern "C" fn afl_libfuzzer_main() { } match input { - Some(x) => { - for indir in &x { - println!("in: {:?}", indir); - }; - - state + Some(x) => state .load_initial_inputs(&mut corpus, &mut generator, &mut engine, &mut mgr, &x) - .expect("Failed to load initial corpus") - }, + .expect("Failed to load initial corpus"), None => (), }