mirror of
https://github.com/nmap/nmap.git
synced 2026-05-13 16:57:06 +00:00
If a version script is called by name (eg: '-sV --script skypev2-version'), then set version_intensity() to 9 for that script; thus guaranteeing that it will run
This commit is contained in:
parent
1d77f352ed
commit
3c38c2099b
1 changed files with 12 additions and 0 deletions
|
|
@ -638,6 +638,18 @@ static int l_get_version_intensity (lua_State *L)
|
|||
{
|
||||
static int intensity = -1;
|
||||
|
||||
const int max_intensity = 9;
|
||||
|
||||
bool selected_by_name;
|
||||
nse_selectedbyname(L);
|
||||
selected_by_name = lua_toboolean(L, -1);
|
||||
lua_pop(L,1);
|
||||
|
||||
if (selected_by_name) {
|
||||
lua_pushnumber(L, max_intensity);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (intensity < 0) {
|
||||
int is_script_intensity_set;
|
||||
int script_intensity;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue