Skip to content

Commit

Permalink
symcc_fuzzing_helper: Move to clap3 (eurecom-s3#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
domenukk authored May 29, 2022
1 parent ae9ea13 commit 88b464c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion util/symcc_fuzzing_helper/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
16 changes: 8 additions & 8 deletions util/symcc_fuzzing_helper/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 88b464c

Please sign in to comment.