From bee956bf441ba45679b8f02c09408fc5e390b591 Mon Sep 17 00:00:00 2001 From: david Date: Tue, 5 May 2009 18:10:07 +0000 Subject: [PATCH] Make the NSE "Usage Examples" conform to the style used in the rest of the section. Rename the subsection "Complete Examples" because there are already a lot of other partial examples. Add some indexterms. --- docs/scripting.xml | 59 +++++++++++++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 22 deletions(-) diff --git a/docs/scripting.xml b/docs/scripting.xml index c94972cbb..739d95d9a 100644 --- a/docs/scripting.xml +++ b/docs/scripting.xml @@ -569,6 +569,7 @@ Nmap script database. Script Selection + script selection The option takes a comma-separated list @@ -610,6 +611,7 @@ Nmap script database. + wildcardsin script selection When referring to scripts from script.db by name, you can use a shell-style ‘*’ @@ -630,6 +632,7 @@ Nmap script database. + Boolean expressions in script selection More complicated script selection can be done using the and, or, and @@ -730,31 +733,43 @@ Nmap script database. - Usage Examples - - A simple script scan using the default set of scripts: - - - example of - nmap -sC example.com - - - Executing a specific script with tracing enabled: - - - example of - example of - nmap --script=./showSSHVersion.nse --script-trace example.com - + Complete Examples - - Execute all scripts in the mycustomscripts directory as well as all default scripts in the safe category: - - - nmap --script=mycustomscripts,safe example.com - + + + nmap -sC example.com + + A simple script scan using the default set of + scripts. + + + + example of + nmap --script smb-os-discovery --script-trace example.com + + Execute a specific script with script tracing. + + + + example of + nmap --script snmp-sysdescr --script-args snmpcommunity=admin example.com + + Run an individual script that takes a script + argument. + + + + nmap --script mycustomscripts,safe example.com + + Execute all scripts in the + mycustomscripts directory as well as all + scripts in the safe category. + + + + Script Format NSE scripts consist of two–five descriptive fields along with either a port or host rule defining when the script should be executed and an action block containing the actual script instructions. Values can be assigned to the descriptive fields just as you would assign any other Lua variables. Their names must be lowercase as shown in this section.