mirror of
https://github.com/nmap/nmap.git
synced 2026-01-22 14:19:02 +00:00
Remove "other" from doubly consolidated port state change lines. When all the
ports had the same state change, "other" doesn't make sense.
This commit is contained in:
@@ -23,7 +23,7 @@ Here is a sample of the text output:
|
||||
Add ipv4 address 10.214.143.33.
|
||||
Add hostname cuvtdnray-504.example.com.
|
||||
3389/tcp is open.
|
||||
999 other tcp ports are filtered.
|
||||
999 tcp ports are filtered.
|
||||
scnqxez-842.example.com (10.189.71.117):
|
||||
Remove hostname scnqxez-842.example.com.
|
||||
10.226.19.80:
|
||||
@@ -35,7 +35,7 @@ Here is a sample of the text output:
|
||||
Host is up, was unknown.
|
||||
Add ipv4 address 10.242.160.155.
|
||||
Add hostname ywnleu-108.example.com.
|
||||
1000 other tcp ports are filtered.
|
||||
1000 tcp ports are filtered.
|
||||
|
||||
Here is an abbreviated sample of the XML output:
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
.\" Title: ndiff
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
|
||||
.\" Date: 09/17/2008
|
||||
.\" Date: 09/18/2008
|
||||
.\" Manual:
|
||||
.\" Source:
|
||||
.\"
|
||||
.TH "NDIFF" "1" "09/17/2008" "" ""
|
||||
.TH "NDIFF" "1" "09/18/2008" "" ""
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
@@ -45,7 +45,7 @@ Do not consolidate long port lists into a simple count\. When a host is up in th
|
||||
.sp
|
||||
.RS 4
|
||||
.nf
|
||||
994 other tcp ports changed state from unknown to filtered\.
|
||||
994 tcp ports changed state from unknown to filtered\.
|
||||
.fi
|
||||
.RE
|
||||
.sp
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
commonly most of its ports will change from the state
|
||||
"unknown" to "closed" or "filtered". If the port list is very
|
||||
long, it will be consolidated into a line like
|
||||
<screen>994 other tcp ports changed state from unknown to filtered.
|
||||
<screen>994 tcp ports changed state from unknown to filtered.
|
||||
</screen>
|
||||
With <option>--verbose</option>, all 994 ports will be listed:
|
||||
<screen>The following tcp ports changed state from unknown to filtered:
|
||||
|
||||
@@ -331,9 +331,9 @@ class ScanDiff(object):
|
||||
print >> f, u"\t\t" + port_list_string
|
||||
else:
|
||||
if a_state == Port.UNKNOWN:
|
||||
print >> f, u"\t%d other %s ports are %s." % (len(port_list), protocol, b_state)
|
||||
print >> f, u"\t%d %s ports are %s." % (len(port_list), protocol, b_state)
|
||||
else:
|
||||
print >> f, u"\t%d other %s ports changed state from %s to %s." % (len(port_list), protocol, a_state, b_state)
|
||||
print >> f, u"\t%d %s ports changed state from %s to %s." % (len(port_list), protocol, a_state, b_state)
|
||||
|
||||
def print_xml(self, f = sys.stdout):
|
||||
impl = xml.dom.minidom.getDOMImplementation()
|
||||
|
||||
Reference in New Issue
Block a user