From 669617ec257e7e53772eb4ad2044ac7079124e75 Mon Sep 17 00:00:00 2001 From: 434b <17012133+0xricksanchez@users.noreply.github.com> Date: Tue, 30 Apr 2024 11:53:45 +0400 Subject: [PATCH] fix: ensure `--dry-run` is respected (#23) --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/cli.rs | 2 +- src/main.rs | 4 ++++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 786342f..166269e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,7 +4,7 @@ version = 3 [[package]] name = "afl_runner" -version = "0.4.0" +version = "0.4.1" dependencies = [ "anyhow", "clap", diff --git a/Cargo.toml b/Cargo.toml index f6ccf95..85c1621 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "afl_runner" authors = ["0x434b Result<()> { let harness = create_harness(&merged_args.gen_args)?; let afl_runner = create_afl_runner(&merged_args.gen_args, harness, raw_afl_flags); let afl_cmds = afl_runner.generate_afl_commands()?; + if merged_args.dry_run { + utils::print_generated_commands(&afl_cmds); + return Ok(()); + } let target_args = merged_args .gen_args .target_args