1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Send any matching probes after a softmatch; do not filter by rarity

This commit is contained in:
dmiller
2018-02-12 04:36:43 +00:00
parent f8c4c4ba98
commit 09d8bf81be
2 changed files with 8 additions and 2 deletions

View File

@@ -1,5 +1,9 @@
#Nmap Changelog ($Id$); -*-text-*-
o When a soft match occurs, any probes that could result in a match with the
same service will be sent regardless of rarity, improving the chances of
matching unusual services on non-standard ports. [Daniel Miller]
o --version-all now turns off the soft match optimization, ensuring that all
probes really are sent, even if there aren't any existing match lines for the
softmatched service. [Daniel Miller]

View File

@@ -1870,8 +1870,10 @@ bool dropdown = false;
// version detection intensity level.
if ((proto == (*current_probe)->getProbeProtocol()) &&
!(*current_probe)->portIsProbable(tunnel, portno) &&
(*current_probe)->getRarity() <= o.version_intensity &&
(!softMatchFound || o.version_intensity >= 9 || (*current_probe)->serviceIsPossible(probe_matched))) {
// No softmatch so obey intensity, or
((!softMatchFound && (*current_probe)->getRarity() <= o.version_intensity) ||
// Softmatch, so only require service match (no rarity check)
(softMatchFound && (o.version_intensity >= 9 || (*current_probe)->serviceIsPossible(probe_matched))))) {
// Valid, probe. Let's do it!
return *current_probe;
}