From 10d136939b2ce206db801ba08cbcfe414fb95cb5 Mon Sep 17 00:00:00 2001 From: fyodor Date: Tue, 15 Jul 2008 01:10:35 +0000 Subject: [PATCH] some more changes from jah --- docs/scripting.xml | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/docs/scripting.xml b/docs/scripting.xml index ea50faff4..6869e6fd7 100644 --- a/docs/scripting.xml +++ b/docs/scripting.xml @@ -3663,8 +3663,7 @@ calls would yield a false status. Initialization Phase - During its initialization stage, Nmap loads the Lua interpreter and its provided - libraries get loaded. These libraries are: + During its initialization stage, Nmap loads the Lua interpreter, including its provided libraries. These libraries are documented in the Lua Reference Manual. Here is a summary: The package library (namespace: @@ -3690,10 +3689,7 @@ calls would yield a false status. The OS library (namespace: os)—The - Operating System lib provides facilities of the operating - system, including filesystem operations (renaming/removing files, - creating of temporary filenames) and access to the environment. - + Operating System library provides facilities of the operating system, including filesystem operations (renaming/removing files, temporary file creation) and access to the environment. The string library (namespace: @@ -3707,11 +3703,7 @@ calls would yield a false status. The math library (namespace: - math)—Since usually numbers in Lua correspond - to the double C-type, the - math library gives you access to rounding functions, - trigonometric functions, random number generation, and many more. - + math)—Numbers in Lua usually correspond to the double C type, so the math library provides access to rounding functions, trigonometric functions, random number generation, and more. The debug library (namespace: @@ -3724,14 +3716,8 @@ calls would yield a false status. -In addition to loading the libraries provided with Lua, the functions -in the nmap namespace are also loaded. The search -path for modules is set to the default one prepended by the nselib -directory (which is searched in the locations Nmap searches for its -data files and scripts). In this step the provided script arguments -also get stored inside the registry. -registry (NSE) - +In addition to loading the libraries provided by Lua, the functions in the nmap namespace are loaded. The search paths are the same directories that Nmap searches for its data files and scripts, except that the nselib directory is appended to each. In this step the provided script arguments are stored inside the registry.registry (NSE) + The next phase of NSE initialization is loading the chosen @@ -3754,12 +3740,12 @@ also get stored inside the registry. - All the .nse files inside a loaded directory are - loaded as files. Each file loaded is executed in Lua. If a + All of the .nse files inside a loaded directory are + loaded as files. Each file loaded is executed by Lua. If a portrule is present, then it is saved in the porttests table with a portrule key and file closure value. Otherwise, if the script has a hostrule - , then it is saved in the hosttests + , then it is saved in the hosttests table in the same manner.