mirror of
https://github.com/nmap/nmap.git
synced 2025-12-29 10:59:02 +00:00
Change max protocol count when ignoring states. The IPProto Scan wasn't taken into account when figuring out how many ports/protocols should be in a given state before ignoring them. For me in most cases, -d caused every protocol to be listed because most were open|filtered and the -d set the max to a value a lot larger than 255. Now for the same hosts, it takes -d3 to print them all.
This commit is contained in:
@@ -694,8 +694,12 @@ bool PortList::isIgnoredState(int state) {
|
||||
|
||||
int max_per_state = 25; // Ignore states with more ports than this
|
||||
/* We will show more ports when verbosity is requested */
|
||||
if (o.verbose || o.debugging)
|
||||
max_per_state *= (o.verbose + 20 * o.debugging);
|
||||
if (o.verbose || o.debugging) {
|
||||
if (o.ipprotscan)
|
||||
max_per_state *= (o.verbose + 3 * o.debugging);
|
||||
else
|
||||
max_per_state *= (o.verbose + 20 * o.debugging);
|
||||
}
|
||||
|
||||
if (getStateCounts(state) > max_per_state)
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user