Set name_confidence for PROBESTATE_FINISHED_NOMATCH,

PROBESTATE_EXCLUDED, and PROBESTATE_INCOMPLETE to 3, not 2. We're
looking up the service name in the same way as when no service detection
is done, so the confidence should be the same.

I think you can make a case that the confidence should be lower if
service detection is done but doesn't find a match. But this matches the
behavior of Nmap 4.76, using a confidence of 3 for
PROBESTATE_FINISHED_NOMATCH.
This commit is contained in:
david 2010-04-30 17:24:32 +00:00
parent db328f191f
commit e3aff298eb

View file

@ -346,7 +346,7 @@ void PortList::setServiceProbeResults(u16 portno, int protocol,
sname = service->s_name;
}
port->service->dtype = SERVICE_DETECTION_TABLE;
port->service->name_confidence = 2; // Since we didn't even check it, we aren't very confident
port->service->name_confidence = 3; // Since we didn't even check it, we aren't very confident
}
// port->serviceprobe_results = sres;