mirror of
https://github.com/nmap/nmap.git
synced 2025-12-15 20:29:03 +00:00
Use std::multiset to keep script outputs in order instead of sorting.
This commit is contained in:
16
nmap.cc
16
nmap.cc
@@ -2026,10 +2026,12 @@ int nmap_main(int argc, char *argv[]) {
|
||||
script_scan_results = get_script_scan_results_obj();
|
||||
script_scan(Targets, SCRIPT_PRE_SCAN);
|
||||
printscriptresults(script_scan_results, SCRIPT_PRE_SCAN);
|
||||
while (!script_scan_results->empty()) {
|
||||
script_scan_results->front().clear();
|
||||
script_scan_results->pop_front();
|
||||
for (ScriptResults::iterator it = script_scan_results->begin();
|
||||
it != script_scan_results->end(); it++) {
|
||||
ScriptResult sr = *it;
|
||||
sr.clear();
|
||||
}
|
||||
script_scan_results->clear();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2280,10 +2282,12 @@ int nmap_main(int argc, char *argv[]) {
|
||||
if (o.script) {
|
||||
script_scan(Targets, SCRIPT_POST_SCAN);
|
||||
printscriptresults(script_scan_results, SCRIPT_POST_SCAN);
|
||||
while (!script_scan_results->empty()) {
|
||||
script_scan_results->front().clear();
|
||||
script_scan_results->pop_front();
|
||||
for (ScriptResults::iterator it = script_scan_results->begin();
|
||||
it != script_scan_results->end(); it++) {
|
||||
ScriptResult sr = *it;
|
||||
sr.clear();
|
||||
}
|
||||
script_scan_results->clear();
|
||||
delete new_targets;
|
||||
new_targets = NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user