Nmap Development mailing list archives
Re: [patch] Fix for MainWindow._load_diff_compare_cb scan list construction
From: David Fifield <david () bamsoftware com>
Date: Thu, 29 Mar 2012 23:55:46 -0700
On Sat, Mar 24, 2012 at 02:03:43AM +0000, jah wrote:
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.
Thanks, this is a good idea. Rather than duplicate code I thought it better to make the ScanChooser constructor always use add_scan so it can enforce the no-duplcates rule itself. I committed something to this effect. David Fifield _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- [patch] Fix for MainWindow._load_diff_compare_cb scan list construction jah (Mar 23)
- Re: [patch] Fix for MainWindow._load_diff_compare_cb scan list construction David Fifield (Mar 29)