diff --git a/README.md b/README.md index 556f127..c18c630 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,7 @@ OPTIONS: --ip-addr Inline list of IP addresses to impersonate, comma-separated --ip-addr-file File with the list of IP addresses to impersonate -m, --mac-addr MAC address to use in the response packets + -q, --quiet Quiet mode: does not output anything on stdout -v Increase message verbosity -V, --version Print version information ``` diff --git a/src/masscanned.rs b/src/masscanned.rs index 5bdfc90..202325e 100644 --- a/src/masscanned.rs +++ b/src/masscanned.rs @@ -139,6 +139,13 @@ fn main() { .multiple_occurrences(true) .help("Increase message verbosity"), ) + .arg( + Arg::new("quiet") + .long("quiet") + .short('q') + .help("Quiet mode: do not output anything on stdout") + .takes_value(false), + ) .get_matches(); let verbose = args.occurrences_of("verbosity") as usize; /* initialise logger */ @@ -210,8 +217,10 @@ fn main() { }; info!("interface......{}", masscanned.iface.unwrap().name); info!("mac address....{}", masscanned.mac); - masscanned.log.add(Box::new(ConsoleLogger::new())); - masscanned.log.init(); + if !args.contains_id("quiet") { + masscanned.log.add(Box::new(ConsoleLogger::new())); + masscanned.log.init(); + } let (mut tx, mut rx) = get_channel(masscanned.iface.unwrap()); loop { /* check if network interface is still up */