From ddd6366540a6fc1216fcdff46361225dec6a25f3 Mon Sep 17 00:00:00 2001 From: kris Date: Sat, 3 Feb 2007 21:29:13 +0000 Subject: [PATCH] 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. --- portlist.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/portlist.cc b/portlist.cc index 0a27df8bc..b2c722899 100644 --- a/portlist.cc +++ b/portlist.cc @@ -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;