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.