mirror of
https://github.com/nmap/nmap.git
synced 2026-06-09 17:22:26 +00:00
Don't crash in the profile editor when script.db is missing.
This commit is contained in:
parent
9c8ff6b3d2
commit
be2e413914
2 changed files with 8 additions and 1 deletions
|
|
@ -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)
|
||||
scriptdb = ScriptDB(os.path.join(scripts_dir, "script.db"))
|
||||
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"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue