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

Add a new cnse.fetchscript, which first checks for an absolute path,

then looks in the scripts subdirectory, then in the current directory.
cnse.fetchfile_absolute now checks for an absolute path, then calls
nmap_fetchfile if that fails (and no longer looks in scripts/). Use
cnse.fetchscript when accessing files that should be in the scripts
subdirectory.
This commit is contained in:
david
2011-03-26 06:48:29 +00:00
parent c8f79b8afe
commit a9a84873f9
4 changed files with 43 additions and 14 deletions

View File

@@ -257,6 +257,7 @@ static void open_cnse (lua_State *L)
{
static const luaL_Reg nse[] = {
{"fetchfile_absolute", fetchfile_absolute},
{"fetchscript", fetchscript},
{"dir", nse_readdir},
{"nsock_loop", nsock_loop},
{"key_was_pressed", key_was_pressed},