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

@ -1,6 +1,8 @@
#ifndef NSE_FS
#define NSE_FS
int fetchscript (lua_State *L);
int fetchfile_absolute (lua_State *L);
int nse_readdir (lua_State *L);