mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 13:11:28 +00:00
Put the nselib/* loader at the front, not the end, of the loaders list.
The loaders list determines the order in which places are checked for Lua modules. I had a problem on Windows when the nmap.exe directory contained WinPcap's packet.dll. There was a runtime error when liblua tried to open packet.dll instead of our packet.lua. This way we check for our own files first.
This commit is contained in:
@@ -128,7 +128,7 @@ do -- Add loader to look in nselib/?.lua (nselib/ can be in multiple places)
|
||||
return "\n\tNSE failed to find "..name.." in search paths.";
|
||||
end
|
||||
end
|
||||
insert(package.loaders, loader);
|
||||
insert(package.loaders, 1, loader);
|
||||
end
|
||||
|
||||
local script_database_type, script_database_path =
|
||||
|
||||
Reference in New Issue
Block a user