mirror of
https://github.com/nmap/nmap.git
synced 2025-12-08 21:51:28 +00:00
Don't crash in the profile editor when script.db is missing.
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
# Nmap Changelog ($Id$); -*-text-*-
|
||||
|
||||
o [Zenmap] Fixed a crash that would happen in the profile editor when
|
||||
the script.db file doesn't exist. The bug was reported by Daniel
|
||||
Miller.
|
||||
|
||||
o [Zenmap] It is now possible to compare scans having the same name or
|
||||
command line. [Jah, David Fifield]
|
||||
|
||||
|
||||
@@ -417,7 +417,10 @@ def get_script_entries(scripts_dir, nselib_dir):
|
||||
"""Merge the information obtained so far into one single entry for
|
||||
each script and return it."""
|
||||
metadata = ScriptMetadata(scripts_dir, nselib_dir)
|
||||
try:
|
||||
scriptdb = ScriptDB(os.path.join(scripts_dir, "script.db"))
|
||||
except IOError:
|
||||
return []
|
||||
entries = []
|
||||
for dbentry in scriptdb.get_entries_list():
|
||||
entry = metadata.get_metadata(dbentry["filename"])
|
||||
|
||||
Reference in New Issue
Block a user