1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Update docs for Lua 5.4.4 upgrade

This commit is contained in:
dmiller
2023-05-01 17:44:47 +00:00
parent 7d57e7d6b1
commit 6fdccee5ba
3 changed files with 24 additions and 21 deletions

View File

@@ -7,16 +7,16 @@
<!ENTITY nmap_version "7.25SVN"> <!ENTITY nmap_version "7.25SVN">
<!-- Software source versions --> <!-- Software source versions -->
<!ENTITY nmap_libpcap_version "1.7.3"> <!ENTITY nmap_libpcap_version "1.10.4">
<!ENTITY nmap_libdnet_version "1.12"> <!ENTITY nmap_libdnet_version "1.12">
<!ENTITY nmap_pcre_version "7.6"> <!ENTITY nmap_pcre_version "7.6">
<!ENTITY nmap_liblinear_version "1.7"><!-- https://github.com/cjlin1/liblinear/commit/61a6d1b38ef5c77d1d7a18c177c203708d77b0f5 --> <!ENTITY nmap_liblinear_version "1.7"><!-- https://github.com/cjlin1/liblinear/commit/61a6d1b38ef5c77d1d7a18c177c203708d77b0f5 -->
<!ENTITY nmap_lua_version "5.3.3"> <!ENTITY nmap_lua_version "5.4.4">
<!-- Software static linked versions --> <!-- Software static linked versions -->
<!ENTITY npcap_version "0.08r9"> <!ENTITY npcap_version "1.75">
<!ENTITY openssl_version "1.0.2h"> <!ENTITY openssl_version "3.0.8">
<!ENTITY python_version "2.7.11"> <!ENTITY python_version "3.11.3">
<!-- Lua library versions --> <!-- Lua library versions -->
<!ENTITY slaxml_version "0.7"> <!ENTITY slaxml_version "0.7">

View File

@@ -2257,7 +2257,7 @@ way.</para>
<para>The Nmap Scripting Engine (NSE) is one of Nmap's most <para>The Nmap Scripting Engine (NSE) is one of Nmap's most
powerful and flexible features. It allows users to write (and powerful and flexible features. It allows users to write (and
share) simple scripts (using the <ulink url="http://lua.org">Lua programming language</ulink> share) simple scripts (using the <ulink url="https://lua.org">Lua programming language</ulink>
<indexterm><primary>Lua programming language</primary></indexterm> <indexterm><primary>Lua programming language</primary></indexterm>
) to automate a wide variety of ) to automate a wide variety of
networking tasks. Those scripts are executed in parallel with the networking tasks. Those scripts are executed in parallel with the
@@ -2410,7 +2410,7 @@ which lists the category or categories in which each script belongs.</para>
<literal>and</literal>, <literal>or</literal>, and <literal>and</literal>, <literal>or</literal>, and
<literal>not</literal> operators to build Boolean expressions. The <literal>not</literal> operators to build Boolean expressions. The
operators have the same operators have the same
<ulink role="hidepdf" url="http://www.lua.org/manual/5.1/manual.html#2.5.3">precedence</ulink> <ulink role="hidepdf" url="http://www.lua.org/manual/5.4/manual.html#3.4.8">precedence</ulink>
as in Lua: <literal>not</literal> is the highest, followed by as in Lua: <literal>not</literal> is the highest, followed by
<literal>and</literal> and then <literal>or</literal>. You can <literal>and</literal> and then <literal>or</literal>. You can
alter precedence by using parentheses. Because expressions contain alter precedence by using parentheses. Because expressions contain

View File

@@ -104,7 +104,7 @@
<para> <para>
Scripts are written in the Scripts are written in the
embedded embedded
<ulink url="http://www.lua.org/">Lua programming language</ulink>, version 5.3.<indexterm><primary>Lua programming language</primary><seealso>Nmap Scripting Engine</seealso></indexterm> <ulink url="https://lua.org/">Lua programming language</ulink>, version 5.4.<indexterm><primary>Lua programming language</primary><seealso>Nmap Scripting Engine</seealso></indexterm>
The language itself is well documented in the books The language itself is well documented in the books
<web> <web>
<citetitle><ulink url="http://www.amazon.com/dp/8590379868?tag=secbks-20">Programming <citetitle><ulink url="http://www.amazon.com/dp/8590379868?tag=secbks-20">Programming
@@ -117,10 +117,10 @@
<citetitle>Lua 5.2 Reference Manual</citetitle>. <citetitle>Lua 5.2 Reference Manual</citetitle>.
</print> </print>
The reference manual, updated for Lua 5.3, is also The reference manual, updated for Lua 5.4, is also
<ulink url="http://www.lua.org/manual/5.3/">freely available <ulink url="https://lua.org/manual/5.4/">freely available
online</ulink>, as is the online</ulink>, as is the
<ulink url="http://www.lua.org/pil/">first edition of <citetitle>Programming in <ulink url="https://lua.org/pil/">first edition of <citetitle>Programming in
Lua</citetitle></ulink>. Given the availability of these excellent general Lua</citetitle></ulink>. Given the availability of these excellent general
Lua programming references, this document only covers aspects and Lua programming references, this document only covers aspects and
extensions specific to Nmap's scripting engine. extensions specific to Nmap's scripting engine.
@@ -911,7 +911,7 @@ https://nmap.org/nsedoc/scripts/afp-showmount.html
<literal>and</literal>, <literal>or</literal>, and <literal>and</literal>, <literal>or</literal>, and
<literal>not</literal> operators to build Boolean expressions. The <literal>not</literal> operators to build Boolean expressions. The
operators have the same operators have the same
<ulink role="hidepdf" url="http://www.lua.org/manual/5.3/manual.html#3.4.8">precedence</ulink> <ulink role="hidepdf" url="https://lua.org/manual/5.4/manual.html#3.4.8">precedence</ulink>
as in Lua: <literal>not</literal> is the highest, followed by as in Lua: <literal>not</literal> is the highest, followed by
<literal>and</literal> and then <literal>or</literal>. You can <literal>and</literal> and then <literal>or</literal>. You can
alter precedence by using parentheses. Because expressions contain alter precedence by using parentheses. Because expressions contain
@@ -1412,7 +1412,7 @@ details of how different return values are handled.
<para> <para>
The Nmap scripting language is an embedded <ulink The Nmap scripting language is an embedded <ulink
url="http://www.lua.org/">Lua</ulink> interpreter which is url="https://lua.org/">Lua</ulink> interpreter which is
extended with libraries for interfacing with Nmap. The Nmap extended with libraries for interfacing with Nmap. The Nmap
API is in the Lua namespace <literal>nmap</literal>. This API is in the Lua namespace <literal>nmap</literal>. This
means that all calls to resources provided by Nmap have an means that all calls to resources provided by Nmap have an
@@ -1488,7 +1488,7 @@ details of how different return values are handled.
script writing more powerful and convenient. These libraries (sometimes called modules) are compiled if necessary and installed along with script writing more powerful and convenient. These libraries (sometimes called modules) are compiled if necessary and installed along with
Nmap. They have their own directory, <filename>nselib</filename>, which Nmap. They have their own directory, <filename>nselib</filename>, which
is installed in the configured Nmap data directory. Scripts need only is installed in the configured Nmap data directory. Scripts need only
<ulink url="http://www.lua.org/manual/5.2/manual.html#pdf-require"><literal>require</literal></ulink> the default libraries in order to use them. <ulink url="https://lua.org/manual/5.4/manual.html#pdf-require"><literal>require</literal></ulink> the default libraries in order to use them.
</para> </para>
<sect2 id="nse-library-list"> <sect2 id="nse-library-list">
@@ -1543,7 +1543,7 @@ details of how different return values are handled.
<print><citetitle>Programming in Lua, Second Edition</citetitle>,</print> <print><citetitle>Programming in Lua, Second Edition</citetitle>,</print>
so this is a short summary. C modules consist of functions that so this is a short summary. C modules consist of functions that
follow the protocol of the follow the protocol of the
<ulink url="http://www.lua.org/manual/5.2/manual.html#lua_CFunction"><type>lua_CFunction</type></ulink> <ulink url="https://lua.org/manual/5.4/manual.html#lua_CFunction"><type>lua_CFunction</type></ulink>
type. The functions are registered with Lua and assembled into a type. The functions are registered with Lua and assembled into a
library by calling the library by calling the
<function>luaL_newlib</function><indexterm><primary><function>luaL_newlib</function></primary></indexterm> <function>luaL_newlib</function><indexterm><primary><function>luaL_newlib</function></primary></indexterm>
@@ -3297,7 +3297,7 @@ mutexfn = nmap.mutex(object)
The <literal>mutexfn</literal> returned is a function which works as a The <literal>mutexfn</literal> returned is a function which works as a
mutex for the <literal>object</literal> passed in. This object can be mutex for the <literal>object</literal> passed in. This object can be
any <ulink role="hidepdf" any <ulink role="hidepdf"
url="http://www.lua.org/manual/5.2/manual.html#2.1">Lua data url="https://lua.org/manual/5.4/manual.html#2.1">Lua data
type</ulink> except <literal>nil</literal>, type</ulink> except <literal>nil</literal>,
Boolean, and number. The Boolean, and number. The
returned function allows you to lock, try to lock, and release the returned function allows you to lock, try to lock, and release the
@@ -3423,7 +3423,7 @@ end
<literal>condvarfn</literal> returned is a function which works as a <literal>condvarfn</literal> returned is a function which works as a
condition variable for the <literal>object</literal> passed in. This condition variable for the <literal>object</literal> passed in. This
object can be any <ulink role="hidepdf" object can be any <ulink role="hidepdf"
url="http://www.lua.org/manual/5.2/manual.html#2.1">Lua data url="https://lua.org/manual/5.4/manual.html#2.1">Lua data
type</ulink> except <literal>nil</literal>, type</ulink> except <literal>nil</literal>,
Boolean, and number. The Boolean, and number. The
returned function allows you to wait, signal, and broadcast on the returned function allows you to wait, signal, and broadcast on the
@@ -3503,7 +3503,7 @@ end
independent execution stack that can be yielded and resumed. independent execution stack that can be yielded and resumed.
The standard <literal>coroutine</literal> table provides access to the The standard <literal>coroutine</literal> table provides access to the
creation and manipulation of coroutines. Lua's online first creation and manipulation of coroutines. Lua's online first
edition of <ulink url="http://www.lua.org/pil/"><citetitle>Programming in edition of <ulink url="https://lua.org/pil/"><citetitle>Programming in
Lua</citetitle></ulink> contains an excellent introduction to Lua</citetitle></ulink> contains an excellent introduction to
coroutines. What follows is an overview of the coroutines. What follows is an overview of the
use of coroutines here for completeness, but this is no replacement for use of coroutines here for completeness, but this is no replacement for
@@ -3847,7 +3847,7 @@ end
It then loads the standard Lua libraries and compiled NSE libraries. It then loads the standard Lua libraries and compiled NSE libraries.
The standard Lua libraries are The standard Lua libraries are
documented in the <ulink documented in the <ulink
url="http://www.lua.org/manual/5.2/manual.html">Lua Reference url="https://lua.org/manual/5.4/manual.html">Lua Reference
Manual</ulink>. The standard Lua libraries available to NSE are Manual</ulink>. The standard Lua libraries available to NSE are
<literal>debug</literal>, <literal>debug</literal>,
<literal>io</literal>, <literal>io</literal>,
@@ -3860,8 +3860,11 @@ end
of a Lua file. They include of a Lua file. They include
<literal>nmap</literal>, <literal>nmap</literal>,
<literal>pcre</literal>, <literal>pcre</literal>,
<literal>bin</literal>, <literal>db</literal>,
<literal>bit</literal>, and <literal>lpeg</literal>,
<literal>debug</literal>,
<literal>zlib</literal>,
<literal>libssh2</literal>, and
<literal>openssl</literal> (if available). <literal>openssl</literal> (if available).
</para> </para>