mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user