1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-29 02:49:01 +00:00

Fix a bug I found by reading Daniel Roethlisberger's article at

http://www.linux-magazin.de/Heft-Abo/Ausgaben/2009/06/Alles-inklusive/(offset)/4.
Don't print a "Not shown: " line if there were no extraports.
This commit is contained in:
david
2009-05-24 18:59:19 +00:00
parent 35eb7f1137
commit 6e25eff176

View File

@@ -491,12 +491,13 @@ class HostDiff(object):
# Extraports.
if self.extraports_changed:
if host_a.state is not None:
if len(host_a.extraports) > 0:
print >> f, u"-Not shown: %s" % host_a.extraports_string()
if host_b.state is not None:
if len(host_b.extraports) > 0:
print >> f, u"+Not shown: %s" % host_b.extraports_string()
elif verbose:
print >> f, u" Not shown: %s" % host_a.extraports_string()
if len(host_a.extraports) > 0:
print >> f, u" Not shown: %s" % host_a.extraports_string()
# Port table.
port_table = Table(u"** * * *")