mirror of
https://github.com/nmap/nmap.git
synced 2026-08-03 22:29:06 +00:00
Added error message to output for NSE when a script could not be loaded.
See: http://seclists.org/nmap-dev/2008/q3/0265.html
This commit is contained in:
parent
213d3a4808
commit
984bdf65bb
1 changed files with 2 additions and 1 deletions
|
|
@ -85,7 +85,8 @@ static int loadfile (lua_State *L)
|
|||
lua_setmetatable(L, -2);
|
||||
|
||||
if (luaL_loadfile(L, filename) != 0) // load the file (index 3)
|
||||
luaL_error(L, "'%s' could not be loaded!", filename);
|
||||
luaL_error(L, "'%s' could not be loaded:\n%s", filename,
|
||||
lua_tostring(L, -1));
|
||||
lua_pushvalue(L, -1);
|
||||
lua_pushvalue(L, 2); // push environment table
|
||||
lua_setfenv(L, -2); // set it
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue