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:
11
output.cc
11
output.cc
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user