1
0
mirror of https://github.com/nmap/nmap.git synced 2026-02-16 02:16:34 +00:00

Don't elide port state changes when a state changes to "unknown." I originally

did this with the idea of making diffing like scan aggregation, with known
characteristics carrying forward through unknown. But it can be confusing. I
think when you diff
  nmap scanme.nmap.org
and
  nmap -F scanme.nmap.org
you want to see that the gopher port changes from closed to unknown, because
it's not scanned by fast scan.
This commit is contained in:
david
2008-09-19 00:41:51 +00:00
parent 68e326252e
commit f2782f3e4e

View File

@@ -429,8 +429,7 @@ def host_diff(a, b):
all_specs = list(set(a.ports.keys()).union(set(b.ports.keys())))
all_specs.sort()
for spec in all_specs:
if b.ports[spec].state != Port.UNKNOWN:
diff.extend(port_diff(a.ports[spec], b.ports[spec]))
diff.extend(port_diff(a.ports[spec], b.ports[spec]))
return diff
def scan_diff(a, b):