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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user