diff --git a/Cargo.lock b/Cargo.lock index f58fbe0..973c412 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1683,7 +1683,7 @@ checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" [[package]] name = "unimap" -version = "0.1.0" +version = "0.2.0" dependencies = [ "atty", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 708cb40..43a9766 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "unimap" -version = "0.1.0" +version = "0.2.0" authors = ["Eduard Tolosa "] edition = "2018" description = "Scan only once by IP address and reduce scan times with Nmap for large amounts of data." diff --git a/src/cli.yml b/src/cli.yml index 26b2c79..51dcae2 100644 --- a/src/cli.yml +++ b/src/cli.yml @@ -78,7 +78,7 @@ args: takes_value: false - logs-dir: - help: Path to save the CSV data of the process. Default to logs/ when using -o. + help: Path to save the CSV data of the process and/or Nmap XML files. Default to logs/. long: logs-dir takes_value: true multiple: false diff --git a/src/resolver_engine.rs b/src/resolver_engine.rs index c0c854a..86a55c9 100644 --- a/src/resolver_engine.rs +++ b/src/resolver_engine.rs @@ -48,13 +48,7 @@ lazy_static! { } pub fn async_resolver_all(args: &mut Args) -> Result<()> { - if args.with_output && !args.unique_output_flag && !files::check_full_path(&args.logs_dir) { - error!( - "Error creating the logs folder in the path {}. Leaving...", - &args.logs_dir - ); - std::process::exit(1) - } + files::check_full_path(&args.logs_dir); if !args.quiet_flag { info!( @@ -172,7 +166,7 @@ fn async_resolver_engine(args: &Args, targets: HashSet) -> HashMap = nmap_ips .par_iter() .map(|ip| { - let filename = format!("{}.xml", &ip); + let filename = format!("{}/{}.xml", &args.logs_dir, &ip); match nmap::get_nmap_data( &filename, &ip,