1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-03 21:29:01 +00:00

Fix Nikto db path resolution

This commit is contained in:
nnposter
2021-02-17 03:42:33 +00:00
parent d4bf034df9
commit 6d1c3f091e
2 changed files with 6 additions and 1 deletions

View File

@@ -65,6 +65,9 @@ o [GH#2199] Updated Nmap's NPSL license to rewrite a poorly-worded
Version 0.93 of the NPSL so that users and distributors may choose
either version of the license.
o [NSE] Loading of a Nikto database failed if the file was referenced
relative to the Nmap directory [nnposter]
o [NSE][GH#2208][GH#2203] SMB2 dialect handling has been redesigned. Visible
changes include:
* Notable improvement in speed of script smb-protocols and others

View File

@@ -12718,10 +12718,12 @@ local stdnse = require "stdnse"
local nmap = require "nmap"
nikto_db_path = stdnse.get_script_args("http-fingerprints.nikto-db-path") or "db_tests"
local f = nmap.fetchfile(nikto_db_path) or io.open(nikto_db_path, "r")
nikto_db_path = nmap.fetchfile(nikto_db_path) or nikto_db_path
local f = io.open(nikto_db_path, "r")
if f then
f:close()
stdnse.debug1("Found nikto db.")
local nikto_db = {}