1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-28 02:19:04 +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

@@ -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 = {}