mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 06:40:48 +00:00
Adding nmap.verbosity() and nmap.debugging() for scripts so they can get the o.verbose and o.debugging values
This commit is contained in:
parent
7c3448c1f7
commit
c3b2e9af3f
1 changed files with 16 additions and 0 deletions
|
|
@ -36,6 +36,8 @@ static int l_print_debug_unformatted(lua_State *l);
|
|||
static int l_get_port_state(lua_State* l, Target* target, Port* port);
|
||||
static int l_set_port_state(lua_State* l, Target* target, Port* port);
|
||||
static int l_set_port_version(lua_State* l, Target* target, Port* port);
|
||||
static int l_get_verbosity(lua_State *);
|
||||
static int l_get_debugging(lua_State *);
|
||||
|
||||
int l_clock_ms(lua_State* l);
|
||||
|
||||
|
|
@ -53,6 +55,8 @@ int set_nmaplib(lua_State* l) {
|
|||
{"clock_ms", l_clock_ms},
|
||||
{"print_debug_unformatted", l_print_debug_unformatted},
|
||||
{"new_try", l_exc_newtry},
|
||||
{"verbosity", l_get_verbosity},
|
||||
{"debugging", l_get_debugging},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
|
|
@ -486,3 +490,15 @@ static int l_exc_newtry(lua_State *l) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int l_get_verbosity(lua_State *l)
|
||||
{
|
||||
lua_pushnumber(l, o.verbose);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int l_get_debugging(lua_State *l)
|
||||
{
|
||||
lua_pushnumber(l, o.debugging);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue