mirror of
https://github.com/nmap/nmap.git
synced 2026-01-07 23:19:02 +00:00
Accept targets from CLI even when -iL is used
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
#Nmap Changelog ($Id$); -*-text-*-
|
||||
|
||||
o Nmap will now allow targets to be specified both on the command line and in
|
||||
an input file with -iL. Previously, if targets were provided in both places,
|
||||
only the targets in the input file would be scanned, and no notice was given
|
||||
that the command-line targets were ignored. [Daniel Miller]
|
||||
|
||||
o [GH#1451] Nmap now performs forward DNS lookups in parallel, using the same
|
||||
engine that has been reliably performing reverse-DNS lookups for nearly a
|
||||
decade. Scanning large lists of hostnames is now enormously faster and avoids
|
||||
|
||||
@@ -4678,16 +4678,17 @@ const char *grab_next_host_spec(FILE *inputfd, int argc, const char **argv) {
|
||||
static char host_spec[1024];
|
||||
size_t n;
|
||||
|
||||
if (!inputfd) {
|
||||
return( (optind < argc)? argv[optind++] : NULL);
|
||||
} else {
|
||||
if (optind < argc) {
|
||||
return argv[optind++];
|
||||
} else if (inputfd) {
|
||||
n = read_host_from_file(inputfd, host_spec, sizeof(host_spec));
|
||||
if (n == 0)
|
||||
return NULL;
|
||||
else if (n >= sizeof(host_spec))
|
||||
netutil_fatal("One of the host specifications from your input file is too long (>= %u chars)", (unsigned int) sizeof(host_spec));
|
||||
return host_spec;
|
||||
}
|
||||
return host_spec;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user