Skip to content

Commit

Permalink
Quit if no target was provided
Browse files Browse the repository at this point in the history
  • Loading branch information
Sh1Yo committed Apr 29, 2022
1 parent 91c712b commit afdea43
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,11 @@ pub fn get_config() -> (Config, usize) {

let args = app.clone().get_matches();

if args.value_of("url").is_none() && args.value_of("request").is_none() {
writeln!(io::stderr(), "A target was not provided").ok();
std::process::exit(1);
}

let delay = Duration::from_millis(parse_int(&args, "delay") as u64);

let max: usize = if args.is_present("max") {
Expand Down

0 comments on commit afdea43

Please sign in to comment.