mirror of
https://github.com/edu4rdshl/unimap.git
synced 2026-07-17 23:24:49 +00:00
Fixes.
This commit is contained in:
parent
945e09bb23
commit
9861d0c925
4 changed files with 5 additions and 11 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -1683,7 +1683,7 @@ checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unimap"
|
name = "unimap"
|
||||||
version = "0.1.0"
|
version = "0.2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"atty",
|
"atty",
|
||||||
"chrono",
|
"chrono",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "unimap"
|
name = "unimap"
|
||||||
version = "0.1.0"
|
version = "0.2.0"
|
||||||
authors = ["Eduard Tolosa <edu4rdshl@protonmail.com>"]
|
authors = ["Eduard Tolosa <edu4rdshl@protonmail.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
description = "Scan only once by IP address and reduce scan times with Nmap for large amounts of data."
|
description = "Scan only once by IP address and reduce scan times with Nmap for large amounts of data."
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ args:
|
||||||
takes_value: false
|
takes_value: false
|
||||||
|
|
||||||
- logs-dir:
|
- 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
|
long: logs-dir
|
||||||
takes_value: true
|
takes_value: true
|
||||||
multiple: false
|
multiple: false
|
||||||
|
|
|
||||||
|
|
@ -48,13 +48,7 @@ lazy_static! {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn async_resolver_all(args: &mut Args) -> Result<()> {
|
pub fn async_resolver_all(args: &mut Args) -> Result<()> {
|
||||||
if args.with_output && !args.unique_output_flag && !files::check_full_path(&args.logs_dir) {
|
files::check_full_path(&args.logs_dir);
|
||||||
error!(
|
|
||||||
"Error creating the logs folder in the path {}. Leaving...",
|
|
||||||
&args.logs_dir
|
|
||||||
);
|
|
||||||
std::process::exit(1)
|
|
||||||
}
|
|
||||||
|
|
||||||
if !args.quiet_flag {
|
if !args.quiet_flag {
|
||||||
info!(
|
info!(
|
||||||
|
|
@ -172,7 +166,7 @@ fn async_resolver_engine(args: &Args, targets: HashSet<String>) -> HashMap<Strin
|
||||||
let nmap_data: HashMap<String, Nmaprun> = nmap_ips
|
let nmap_data: HashMap<String, Nmaprun> = nmap_ips
|
||||||
.par_iter()
|
.par_iter()
|
||||||
.map(|ip| {
|
.map(|ip| {
|
||||||
let filename = format!("{}.xml", &ip);
|
let filename = format!("{}/{}.xml", &args.logs_dir, &ip);
|
||||||
match nmap::get_nmap_data(
|
match nmap::get_nmap_data(
|
||||||
&filename,
|
&filename,
|
||||||
&ip,
|
&ip,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue