mirror of
https://github.com/nmap/nmap.git
synced 2026-10-22 03:41:32 +00:00
Rename o.resolve_all to o.always_resolve
This is the flag for the -R option. "always" is more appropriate than "all," since "resolveall.nse" does something different, and there is a "resolve_all" function that does that thing as well, unrelated to the -R option.
This commit is contained in:
parent
a51a607abc
commit
d9b66b20a3
5 changed files with 7 additions and 7 deletions
|
|
@ -363,7 +363,7 @@ void NmapOps::Initialize() {
|
|||
spoof_mac_set = false;
|
||||
mass_dns = true;
|
||||
deprecated_xml_osclass = false;
|
||||
resolve_all = 0;
|
||||
always_resolve = false;
|
||||
dns_servers = NULL;
|
||||
implicitARPPing = true;
|
||||
numhosts_scanned = 0;
|
||||
|
|
|
|||
|
|
@ -370,7 +370,7 @@ class NmapOps {
|
|||
Only files that were actually read should be in this map. */
|
||||
std::map<std::string, std::string> loaded_data_files;
|
||||
bool mass_dns;
|
||||
int resolve_all;
|
||||
bool always_resolve;
|
||||
char *dns_servers;
|
||||
|
||||
/* Do IPv4 ARP or IPv6 ND scan of directly connected Ethernet hosts, even if
|
||||
|
|
|
|||
2
nmap.cc
2
nmap.cc
|
|
@ -1284,7 +1284,7 @@ void parse_options(int argc, char **argv) {
|
|||
o.portlist = strdup(optarg);
|
||||
break;
|
||||
case 'R':
|
||||
o.resolve_all++;
|
||||
o.always_resolve = true;
|
||||
break;
|
||||
case 'r':
|
||||
o.randomize_ports = 0;
|
||||
|
|
|
|||
|
|
@ -1162,7 +1162,7 @@ static void nmap_mass_rdns_core(Target **targets, int num_targets) {
|
|||
// Set up the request structure
|
||||
for(hostI = targets; hostI < targets+num_targets; hostI++)
|
||||
{
|
||||
if (!((*hostI)->flags & HOST_UP) && !o.resolve_all) continue;
|
||||
if (!((*hostI)->flags & HOST_UP) && !o.always_resolve) continue;
|
||||
|
||||
// See if it's cached
|
||||
std::string res;
|
||||
|
|
@ -1278,7 +1278,7 @@ static void nmap_system_rdns_core(Target **targets, int num_targets) {
|
|||
for(hostI = targets; hostI < targets+num_targets; hostI++) {
|
||||
currenths = *hostI;
|
||||
|
||||
if (((currenths->flags & HOST_UP) || o.resolve_all) && !o.noresolve) stat_actual++;
|
||||
if (((currenths->flags & HOST_UP) || o.always_resolve) && !o.noresolve) stat_actual++;
|
||||
}
|
||||
|
||||
Snprintf(spmobuf, sizeof(spmobuf), "System DNS resolution of %d host%s.", num_targets, num_targets-1 ? "s" : "");
|
||||
|
|
@ -1290,7 +1290,7 @@ static void nmap_system_rdns_core(Target **targets, int num_targets) {
|
|||
if (keyWasPressed())
|
||||
SPM->printStats((double) i / stat_actual, NULL);
|
||||
|
||||
if (((currenths->flags & HOST_UP) || o.resolve_all) && !o.noresolve) {
|
||||
if (((currenths->flags & HOST_UP) || o.always_resolve) && !o.noresolve) {
|
||||
if (currenths->TargetSockAddr(&ss, &sslen) != 0)
|
||||
fatal("Failed to get target socket address.");
|
||||
if (getnameinfo((struct sockaddr *)&ss, sslen, hostname,
|
||||
|
|
|
|||
|
|
@ -1431,7 +1431,7 @@ static char *num_to_string_sigdigits(double d, int digits) {
|
|||
/* Writes a heading for a full scan report ("Nmap scan report for..."),
|
||||
including host status and DNS records. */
|
||||
void write_host_header(Target *currenths) {
|
||||
if ((currenths->flags & HOST_UP) || o.verbose || o.resolve_all) {
|
||||
if ((currenths->flags & HOST_UP) || o.verbose || o.always_resolve) {
|
||||
if (currenths->flags & HOST_UP) {
|
||||
log_write(LOG_PLAIN, "Nmap scan report for %s\n", currenths->NameIP());
|
||||
} else if (currenths->flags & HOST_DOWN) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue