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

Only report warning about ratelimits when filtered ports exist

This commit is contained in:
dmiller
2017-05-02 20:36:08 +00:00
parent 4b65a1a247
commit e09cb62439

View File

@@ -664,12 +664,7 @@ void printportoutput(Target *currenths, PortList *plist) {
prevstate = istate;
}
if (prevstate != PORT_UNKNOWN) {
log_write(LOG_PLAIN, "\n");
if (o.defeat_rst_ratelimit && o.TCPScan()) {
log_write(LOG_PLAIN, "Some closed ports may be reported as filtered due to --defeat-rst-ratelimit\n");
}
}
log_write(LOG_PLAIN, "\n");
if (o.reason)
print_state_summary(plist, STATE_REASON_FULL);
@@ -879,6 +874,10 @@ void printportoutput(Target *currenths, PortList *plist) {
xml_end_tag(); /* ports */
xml_newline();
if (o.defeat_rst_ratelimit && o.TCPScan() && plist->getStateCounts(PORT_FILTERED) > 0) {
log_write(LOG_PLAIN, "Some closed ports may be reported as filtered due to --defeat-rst-ratelimit\n");
}
// Now we write the table for the user
log_write(LOG_PLAIN, "%s", Tbl->printableTable(NULL));
delete Tbl;