mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 13:11:28 +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;
|
prevstate = istate;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (prevstate != PORT_UNKNOWN) {
|
log_write(LOG_PLAIN, "\n");
|
||||||
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");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (o.reason)
|
if (o.reason)
|
||||||
print_state_summary(plist, STATE_REASON_FULL);
|
print_state_summary(plist, STATE_REASON_FULL);
|
||||||
@@ -879,6 +874,10 @@ void printportoutput(Target *currenths, PortList *plist) {
|
|||||||
xml_end_tag(); /* ports */
|
xml_end_tag(); /* ports */
|
||||||
xml_newline();
|
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
|
// Now we write the table for the user
|
||||||
log_write(LOG_PLAIN, "%s", Tbl->printableTable(NULL));
|
log_write(LOG_PLAIN, "%s", Tbl->printableTable(NULL));
|
||||||
delete Tbl;
|
delete Tbl;
|
||||||
|
|||||||
Reference in New Issue
Block a user