mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 13:11:28 +00:00
Report distinct names, not number of requests (A+AAAA)
This commit is contained in:
@@ -1136,6 +1136,7 @@ static void nmap_mass_dns_core(DNS::Request *requests, int num_requests) {
|
|||||||
total_reqs = 0;
|
total_reqs = 0;
|
||||||
|
|
||||||
// Set up the request structure
|
// Set up the request structure
|
||||||
|
std::string *prev = NULL;
|
||||||
for (int i=0; i < num_requests; i++)
|
for (int i=0; i < num_requests; i++)
|
||||||
{
|
{
|
||||||
DNS::Request &reqt = requests[i];
|
DNS::Request &reqt = requests[i];
|
||||||
@@ -1156,8 +1157,11 @@ static void nmap_mass_dns_core(DNS::Request *requests, int num_requests) {
|
|||||||
|
|
||||||
new_reqs.push_back(tpreq);
|
new_reqs.push_back(tpreq);
|
||||||
|
|
||||||
|
if (!prev || *prev != reqt.name) {
|
||||||
stat_actual++;
|
stat_actual++;
|
||||||
|
}
|
||||||
total_reqs++;
|
total_reqs++;
|
||||||
|
prev = &reqt.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (total_reqs == 0 || servs.size() == 0) return;
|
if (total_reqs == 0 || servs.size() == 0) return;
|
||||||
@@ -1183,6 +1187,7 @@ static void nmap_mass_dns_core(DNS::Request *requests, int num_requests) {
|
|||||||
|
|
||||||
Snprintf(spmobuf, sizeof(spmobuf), "Parallel DNS resolution of %d host%s.", stat_actual, stat_actual-1 ? "s" : "");
|
Snprintf(spmobuf, sizeof(spmobuf), "Parallel DNS resolution of %d host%s.", stat_actual, stat_actual-1 ? "s" : "");
|
||||||
SPM = new ScanProgressMeter(spmobuf);
|
SPM = new ScanProgressMeter(spmobuf);
|
||||||
|
stat_actual = total_reqs;
|
||||||
|
|
||||||
while (total_reqs > 0) {
|
while (total_reqs > 0) {
|
||||||
timeout = deal_with_timedout_reads();
|
timeout = deal_with_timedout_reads();
|
||||||
|
|||||||
Reference in New Issue
Block a user