o [Ndiff] The Nmap banner (with the version number and date of the scan)

is not printed unless there were other differences. This makes Nidff
  produce no output when there wre no differences other than the version
  number and date. Dr. Jesus contributed an initial patch. [David]
This commit is contained in:
david 2011-03-22 18:59:02 +00:00
parent 93aa8e052b
commit ce23a35715
2 changed files with 11 additions and 5 deletions

View file

@ -1,5 +1,10 @@
# Nmap Changelog ($Id$); -*-text-*-
o [Ndiff] The Nmap banner (with the version number and date of the scan)
is not printed unless there were other differences. This makes Nidff
produce no output when there wre no differences other than the version
number and date. Dr. Jesus contributed an initial patch. [David]
o [Zenmap] Fixed a bug in the option parser: -sN (null scan) was
interpreted as -sn (no port scan). This was reported by
shitaneddine. [David]

View file

@ -461,11 +461,12 @@ class ScanDiff(object):
"""Print this diff in a human-readable text form."""
banner_a = format_banner(self.scan_a)
banner_b = format_banner(self.scan_b)
if banner_a != banner_b:
print >> f, u"-%s" % banner_a
print >> f, u"+%s" % banner_b
elif verbose:
print >> f, u" %s" % banner_a
if self.cost > 0 or verbose:
if banner_a != banner_b:
print >> f, u"-%s" % banner_a
print >> f, u"+%s" % banner_b
elif verbose:
print >> f, u" %s" % banner_a
print_script_result_diffs_text("Pre-scan script results",
self.scan_a.pre_script_results, self.scan_b.pre_script_results,