main
E. Almqvist 2 years ago
parent 483dda0bb6
commit 9e0d9de1e1
  1. 24
      src/cli.rs
  2. 2
      src/main.rs

@ -7,12 +7,28 @@ pub struct Args {
#[clap(help = "Which port to scan for.", short = 'p', long = "port")] #[clap(help = "Which port to scan for.", short = 'p', long = "port")]
pub port: u16, pub port: u16,
#[clap(help = "Amount of threads that will be used when scanning for the specified port.", short = 'n', long = "threads", default_value_t = 1)] #[clap(
help = "Amount of threads that will be used when scanning for the specified port.",
short = 'n',
long = "threads",
default_value_t = 1
)]
pub threads: u8, pub threads: u8,
#[clap(help = "A file containing ignored IPv4 addresses (seperated by linebreaks).", short = 'i', long = "ignore-ip-list", default_value = "ignore-ips-list.txt")] #[clap(
help = "A file containing ignored IPv4 addresses (seperated by linebreaks).",
short = 'i',
long = "ignore-ip-list",
default_value = "ignore-ips-list.txt"
)]
pub ignorelist: PathBuf, pub ignorelist: PathBuf,
#[clap(help = "Enable verbose (debug) output", short = 'v', long = "verbose", takes_value = false, required = false)] #[clap(
pub verbose: bool help = "Enable verbose (debug) output",
short = 'v',
long = "verbose",
takes_value = false,
required = false
)]
pub verbose: bool,
} }

@ -1,7 +1,7 @@
mod cli;
mod ipv4; mod ipv4;
mod scanner; mod scanner;
mod util; mod util;
mod cli;
use clap::Parser; use clap::Parser;
use cli::Args; use cli::Args;

Loading…
Cancel
Save