1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-17 11:59:04 +00:00

o Added a new timing_level() function to NSE which reports the Nmap

timing level from 0 to 5, as set by the Nmap -T option.  The default
  is 3. [Thomas Buchanan]
This commit is contained in:
fyodor
2008-06-14 00:22:05 +00:00
parent 9c646a4873
commit ac12ab6b41
3 changed files with 23 additions and 0 deletions

View File

@@ -1,5 +1,9 @@
# Nmap Changelog ($Id$); -*-text-*-
o Added a new timing_level() function to NSE which reports the Nmap
timing level from 0 to 5, as set by the Nmap -T option. The default
is 3. [Thomas Buchanan]
o Integrated several service match lines from Tom Sellers.
o An error was fixed where Zenmap would crash when trying to load from

View File

@@ -1961,6 +1961,18 @@ nmap.fetchfile("nmap-rpc")
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>nmap.timing_level()</option>
<indexterm><primary>timing_level</primary><secondary><literal>nmap.timing_level</literal></secondary></indexterm></term>
<listitem>
<para>
Returns the timing level as a non-negative integer. Possible return
values vary from 0 to 5, corresponding to the six built-in Nmap
timing templates. The timing level can be set with the
<option>-T</option> option<bookex> (see <xref linkend="man-performance"/>)</bookex>.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</sect2>

View File

@@ -42,6 +42,7 @@ static int l_get_verbosity(lua_State *);
static int l_get_debugging(lua_State *);
static int l_get_have_ssl(lua_State *L);
static int l_fetchfile(lua_State *L);
static int l_get_timing_level(lua_State *L);
int l_clock_ms(lua_State *L);
@@ -63,6 +64,7 @@ int l_clock_ms(lua_State *L);
{"debugging", l_get_debugging},
{"have_ssl", l_get_have_ssl},
{"fetchfile", l_fetchfile},
{"timing_level", l_get_timing_level},
{NULL, NULL}
};
@@ -584,3 +586,8 @@ err:
return 0;
}
static int l_get_timing_level(lua_State *L)
{
lua_pushnumber(L, o.timing_level);
return 1;
}