1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-31 20:09:02 +00:00

merge soc07 r4780 - Moved OSScan warning message (may not be reliable because could not find 1 open and 1 closed port) so it is printed along with the OSScan results instead of above it

This commit is contained in:
fyodor
2007-08-11 03:24:04 +00:00
parent 90e464602a
commit f5e32d305f
7 changed files with 42 additions and 10 deletions

View File

@@ -1337,10 +1337,11 @@ void printosscanoutput(Target *currenths) {
FingerPrintResults *FPR;
int osscanSys = 0;
int distance = -1;
int osscan_flag;
if (!currenths->osscan_performed)
if (!(osscan_flag = currenths->osscanPerformed()))
return;
if (currenths->FPR == NULL && currenths->FPR1 == NULL) {
return;
} else if (currenths->FPR != NULL && currenths->FPR1 == NULL) {
@@ -1387,7 +1388,12 @@ void printosscanoutput(Target *currenths) {
"<portused state=\"closed\" proto=\"udp\" portid=\"%hu\" />\n",
FPR->osscan_closedudpport);
}
if(osscan_flag == OS_PERF_UNREL &&
!(FPR->overall_results == OSSCAN_TOOMANYMATCHES ||
(FPR->num_perfect_matches > 8 && !o.debugging)))
log_write(LOG_NORMAL|LOG_SKID|LOG_STDOUT, "Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port\n");
// If the FP can't be submitted anyway, might as well make a guess.
const char *reason = FPR->OmitSubmissionFP();
printosclassificationoutput(FPR->getOSClassification(),