diff --git a/util/symcc_fuzzing_helper/Cargo.toml b/util/symcc_fuzzing_helper/Cargo.toml index d09d8ae3..f8858d88 100644 --- a/util/symcc_fuzzing_helper/Cargo.toml +++ b/util/symcc_fuzzing_helper/Cargo.toml @@ -20,7 +20,7 @@ edition = "2018" license = "GPL-3.0-or-later" [dependencies] -structopt = "0.3" +clap = { version = "3.0", features = ["derive"]} tempfile = "3.1" anyhow = "1.0" log = "0.4.0" diff --git a/util/symcc_fuzzing_helper/src/main.rs b/util/symcc_fuzzing_helper/src/main.rs index 6d284e1e..a75f9db8 100644 --- a/util/symcc_fuzzing_helper/src/main.rs +++ b/util/symcc_fuzzing_helper/src/main.rs @@ -22,7 +22,7 @@ use std::io::Write; use std::path::{Path, PathBuf}; use std::thread; use std::time::{Duration, Instant}; -use structopt::StructOpt; +use clap::{self, StructOpt}; use symcc::{AflConfig, AflMap, AflShowmapResult, SymCC, TestcaseDir}; use tempfile::tempdir; @@ -32,22 +32,22 @@ const STATS_INTERVAL_SEC: u64 = 60; // inputs. #[derive(Debug, StructOpt)] -#[structopt(about = "Make SymCC collaborate with AFL.", no_version)] -struct CLI { +#[clap(about = "Make SymCC collaborate with AFL.", no_version)] +struct Opt { /// The name of the fuzzer to work with - #[structopt(short = "a")] + #[clap(short = 'a')] fuzzer_name: String, /// The AFL output directory - #[structopt(short = "o")] + #[clap(short = 'o')] output_dir: PathBuf, /// Name to use for SymCC - #[structopt(short = "n")] + #[clap(short = 'n')] name: String, /// Enable verbose logging - #[structopt(short = "v")] + #[clap(short = 'v')] verbose: bool, /// Program under test @@ -264,7 +264,7 @@ impl State { } fn main() -> Result<()> { - let options = CLI::from_args(); + let options = Opt::parse(); env_logger::builder() .filter_level(if options.verbose { log::LevelFilter::Debug