mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 06:40:48 +00:00
Require separate host groups for targets with different source addresses.
This commit is contained in:
parent
acaade017b
commit
9941656055
2 changed files with 11 additions and 1 deletions
|
|
@ -1,5 +1,10 @@
|
|||
# Nmap Changelog ($Id$); -*-text-*-
|
||||
|
||||
o Targets requiring different source addresses now go into different
|
||||
hostgroups, not only for host discovery but also for port scanning.
|
||||
Before, only responses to one of the source addresses would be
|
||||
processed, and the others would be ignored. [David]
|
||||
|
||||
o [NSE] Added script broadcast-wpad-discover which detects proxy servers on the
|
||||
network by using the Web Proxy Auto Discover Protocol (WPAD). [Patrik]
|
||||
|
||||
|
|
|
|||
7
nmap.cc
7
nmap.cc
|
|
@ -2057,7 +2057,8 @@ int nmap_main(int argc, char *argv[]) {
|
|||
/* Returns true iff this target is incompatible with the other hosts in the host
|
||||
group. This happens when:
|
||||
1. it uses a different interface, or
|
||||
2. it has the same IP address as another target already in the group.
|
||||
2. it uses a different source address, or
|
||||
3. it has the same IP address as another target already in the group.
|
||||
These restrictions only apply for raw scans. This function is similar to one
|
||||
of the same name in targets.cc. That one is for ping scanning, this one is
|
||||
for port scanning. */
|
||||
|
|
@ -2076,6 +2077,10 @@ static bool target_needs_new_hostgroup(std::vector<Target *> &targets,
|
|||
return true;
|
||||
}
|
||||
|
||||
/* Different source address? */
|
||||
if (sockaddr_storage_cmp(targets[0]->SourceSockAddr(), target->SourceSockAddr()) != 0)
|
||||
return true;
|
||||
|
||||
/* Is there already a target with this same IP address? ultra_scan doesn't
|
||||
cope with that, because it uses IP addresses to look up targets from
|
||||
replies. What happens is one target gets the replies for all probes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue