From 3c38c2099b63425ad5df06066292fa01d3daa09e Mon Sep 17 00:00:00 2001 From: jay Date: Sun, 3 Aug 2014 04:16:13 +0000 Subject: [PATCH] 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 --- nse_nmaplib.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/nse_nmaplib.cc b/nse_nmaplib.cc index 3a1f913f2..c63aff7ff 100644 --- a/nse_nmaplib.cc +++ b/nse_nmaplib.cc @@ -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;