Nmap Development mailing list archives

[patch] Fix for MainWindow._load_diff_compare_cb scan list construction


From: jah <jah () zadkiel plus com>
Date: Sat, 24 Mar 2012 02:03:43 +0000

Hi folks,

With a freshly opened window of the latest zenmap I tried to compare two scans having the same args and targets, but 
the Diff window drop-downs were only allowing the more recent of the two scans to be selected.  The same happens when 
loading two scans having the same args and targets from the scan database.

The problem is caused by the way MainWindow._load_diff_compare_cb creates a dictionary of scans for the DiffWindow 
constructor - it doesn't ensure the dictionary keys are unique and so adding later scans with the same parsed name or 
command line clobbers earlier ones.

The attached patch duplicates code from ScanChooser.add_scan to 'version' the scan names - I reckon this is cleaner 
than either trying to get access to ScanChooser.add_scan from MainWindow or moving add_scan somewhere else.

Best,

John

Attachment: MainWindow.py.patch
Description:

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/

Current thread: