1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-29 10:59:02 +00:00

Fix softmatches: enable skipping port-matching probes, too.

This commit is contained in:
dmiller
2018-02-04 21:31:41 +00:00
parent b9f3fb910f
commit 06c38c79dd
2 changed files with 8 additions and 1 deletions

View File

@@ -1,5 +1,11 @@
#Nmap Changelog ($Id$); -*-text-*-
o Increased effectiveness of service scan soft matches. Previously, all probes
which matched the port being scanned would be sent regardless of whether the
service was soft matched; softmatch lines only restricted non-port-matching
probes from being sent. Now, a soft match will cause ALL non-service-matching
probes to be skipped, even if the port number matches. [Daniel Miller]
o [GH#1112] Resolved crash opportunities caused by unexpected libpcap version
string format. [Gisle Vanem, nnposter]

View File

@@ -1846,7 +1846,8 @@ bool dropdown = false;
while (current_probe != AP->probes.end()) {
// For the first run, we only do probes that match this port number
if ((proto == (*current_probe)->getProbeProtocol()) &&
(*current_probe)->portIsProbable(tunnel, portno)) {
(*current_probe)->portIsProbable(tunnel, portno) &&
(!softMatchFound || (*current_probe)->serviceIsPossible(probe_matched))) {
// This appears to be a valid probe. Let's do it!
return *current_probe;
}