diff --git a/CHANGELOG b/CHANGELOG index e39a06769..3bb717016 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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] diff --git a/ndiff/ndiff b/ndiff/ndiff index d36d3a79d..0891505f0 100755 --- a/ndiff/ndiff +++ b/ndiff/ndiff @@ -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,