1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-03 05:09:14 +00:00

New option --unique to prevent scanning same address twice. See #2180

This commit is contained in:
dmiller
2020-11-15 04:57:44 +00:00
parent 7400723efa
commit 0de714e8d3
6 changed files with 16 additions and 4 deletions

View File

@@ -593,6 +593,7 @@ void parse_options(int argc, char **argv) {
{"version-all", no_argument, 0, 0},
{"system-dns", no_argument, 0, 0},
{"resolve-all", no_argument, 0, 0},
{"unique", no_argument, 0, 0},
{"log-errors", no_argument, 0, 0},
{"deprecated-xml-osclass", no_argument, 0, 0},
{(char*)k, no_argument, 0, 0},
@@ -844,6 +845,8 @@ void parse_options(int argc, char **argv) {
o.dns_servers = strdup(optarg);
} else if (strcmp(long_options[option_index].name, "resolve-all") == 0) {
o.resolve_all = true;
} else if (strcmp(long_options[option_index].name, "unique") == 0) {
o.unique = true;
} else if (strcmp(long_options[option_index].name, "log-errors") == 0) {
/*Nmap Log errors is deprecated and is now always enabled by default.
This option is left in so as to not break anybody's scanning scripts.