1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Fix usage of nmap.fetchfile in several scripts

Discussion thread: http://seclists.org/nmap-dev/2013/q2/121

Existing behavior preserved and preferred, but absolute and local paths
should also work now. Notably, smb-psexec's locate_file function claimed
to check current directory but did not.
This commit is contained in:
dmiller
2013-04-26 12:14:44 +00:00
parent 666de7b83f
commit 93eee124c2
5 changed files with 30 additions and 26 deletions

View File

@@ -208,7 +208,7 @@ end
-- load error strings to the errorstrings table
local function get_error_strings(path)
local f = nmap.fetchfile(path)
local f = nmap.fetchfile(path) or path
if f then
for e in io.lines(f) do
if not string.match(e, "^#") then