1
0
mirror of https://github.com/nmap/nmap.git synced 2026-02-03 12:06:35 +00:00

document --script all

This commit is contained in:
fyodor
2007-11-29 22:52:02 +00:00
parent 5a24e1a0e7
commit 5e50f5084a
3 changed files with 72 additions and 48 deletions

View File

@@ -8,12 +8,15 @@ o Compatibility with systems that have the pcre.h header file in its
own pcre directory should now be fixed for real. [Fyodor]
o Enhanced the radmind service detection signature and added a
deprecated radmind port to nmap-services. Thanks to Matt Selsky for
the patch.
deprecated radmind port to nmap-services. [Matt Selsky]
o Documented the "--script all" option in the man page and NSE
article. This option executes all scripts in the NSE database
regardless of category. [Fyodor]
o Fixed the NSIS installer so that it does not include some excess
files (mswin32/* and .svn). Thanks to Alan Jones for reporting the
problem.
problem. [Fyodor]
4.23RC3

View File

@@ -1003,21 +1003,31 @@ performs a script scan using the default set of scripts\. it is equivalent to
\fB\-\-script=safe,intrusive\fR
.RE
.PP
\fB\-\-script=<script\-categories|directory|filename>\fR
\fB\-\-script <script\-categories|directory|filename|all>\fR
.RS 4
gives you the opportunity to choose from a custom set of scripts\. You can specify script\-categories, single scripts and/or directories with scripts which are to be run against the target hosts instead of the default set\. Nmap will try to interpret the arguments at first as categories and afterwards as files or directories in one of the following places
\fI\-\-datadir/\fR
;
\fI$(NMAPDIR)/\fR
;
Runs a script scan (like
\fB\-sC\fR) with the scripts you have chosen rather than the defaults\. Arguments can be script categories, single scripts or directories with scripts which are to be run against the target hosts instead of the default set\. Nmap will try to interpret the arguments at first as categories and afterwards as files or directories\. Absolute paths are used as is, relative paths are searched in the following places until found:
\fI\-\-datadir/\fR;
\fI$(NMAPDIR)/\fR;
\fI~user/nmap/\fR
(only on *nix\-platforms);
(not searched on Windows);
\fINMAPDATADIR/\fR
or
\fI\./\fR
(optionally inside a
\fI\./\fR\. A
\fIscripts/\fR
subdirectory)\.
subdirectory is also tried in each of these\. Give the argument
all
to execute all scripts in the Nmap script database\.
.sp
If a directory is specified and found, Nmap loads all NSE scripts (any filenames ending with
\.nse) from that directory\. They must have the filename extension
nse\. Nmap does not recurse into subdirectories to find scripts\. When individual file names are specified, the file extension does not have to be
nse\.
.sp
Nmap scripts are stored in a
\fIscripts\fR
subdirectory of the Nmap data directory by default\. Scripts are indexed in a database stored in
\fIscripts/script\.db\fR\. The database lists all of the scripts in each category\. A single script may be in several categories\.
.RE
.PP
\fB\-\-script\-args=<name1=value1,name2={name3=value3},name4=value4>\fR

View File

@@ -1946,47 +1946,58 @@ way.</para>
</varlistentry>
<varlistentry>
<term><option>--script=&lt;script-categories|directory|filename&gt;</option>
<indexterm><primary>--script</primary></indexterm></term>
<term><option>--script &lt;script-categories|directory|filename|all&gt;</option><indexterm><primary>--script</primary></indexterm></term>
<listitem>
<listitem>
<para>Runs a script scan (like <option>-sC</option>) with the scripts you have chosen rather than the defaults. Arguments can be script categories, single scripts or directories with scripts which are to be run against the target hosts instead of the default set. Nmap will try to interpret the arguments at first as categories and afterwards as files or directories. Absolute paths are used as is, relative paths are searched in the following places until found:
<filename>--datadir/</filename>;
<filename>$(NMAPDIR)/</filename>;
<filename>~user/nmap/</filename> (not searched on Windows);
<filename>NMAPDATADIR/</filename> or
<filename>./</filename>. A <filename>scripts/</filename> subdirectory is also tried in each of these. Give the argument <literal>all</literal> to execute all scripts in the Nmap script database.
</para>
<para>
gives you the opportunity to choose from a custom set of
scripts. You can specify script-categories, single scripts and/or
directories with scripts which are to be run against the target hosts
instead of the default set. Nmap will try to interpret the arguments
at first as categories and afterwards as files or directories in one
of the following places
<filename>--datadir/</filename> ;
<filename>$(NMAPDIR)/</filename> ;
<filename>~user/nmap/</filename> (only on *nix-platforms);
<filename>NMAPDATADIR/</filename> or
<filename>./</filename> (optionally inside a
<filename>scripts/</filename> subdirectory).
</para>
</listitem>
</varlistentry>
<para>If a directory is specified and found, Nmap loads all NSE
scripts (any filenames ending with <literal>.nse</literal>) from that
directory. They must have the filename extension
<literal>nse</literal>. Nmap does not recurse into subdirectories to
find scripts. When individual file names are specified, the file
extension does not have to be <literal>nse</literal>.
</para>
<para>Nmap scripts are stored in a <filename>scripts</filename>
subdirectory of the Nmap data directory
by default. Scripts are indexed in a database stored in
<filename>scripts/script.db</filename>. The database lists all of the
scripts in each category. A single script may be in several
categories.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--script-args=&lt;name1=value1,name2={name3=value3},name4=value4&gt;</option>
<indexterm><primary>--script-args</primary></indexterm></term>
<listitem>
<term><option>--script-args=&lt;name1=value1,name2={name3=value3},name4=value4&gt;</option><indexterm><primary>--script-args</primary></indexterm></term>
<listitem>
<para>lets you provide arguments to NSE-scripts. Arguments are passed
as <literal>name=value</literal> pairs. The provided argument is processed and stored
inside a Lua table, to which all scripts have access. The names are
taken as strings (which must be alphanumeric values) and used as
keys inside the <literal>argument-table</literal>. Values are either strings or tables
themselves (surrounded by &lsquo;<literal>{</literal>&rsquo; and &lsquo;<literal>}</literal>&rsquo;. Subtables make
it possible to override arguments for specific scripts (e.g. when you
want to provide different login/password pairs for different scripts).
For example, you could pass the comma-separated arguments:
<literal>user=bar</literal>,<literal>password=foo</literal>, and <literal>anonFTP={password=nobody@foobar.com}</literal>. If you want to override an option to a script, you should
index the subtable with the script's <literal>id</literal>, since this
is the only way the script knows about its special argument.</para>
</listitem> </varlistentry>
as <literal>name=value</literal> pairs. The provided argument is
processed and stored inside a Lua table, to which all scripts have
access. The names are taken as strings (which must be alphanumeric
values) and used as keys inside the
<literal>argument-table</literal>. Values are either strings or tables
themselves (surrounded by &lsquo;<literal>{</literal>&rsquo; and
&lsquo;<literal>}</literal>&rsquo;. Subtables make it possible to
override arguments for specific scripts (e.g. when you want to provide
different login/password pairs for different scripts). For example,
you could pass the comma-separated arguments:
<literal>user=bar</literal>,<literal>password=foo</literal>, and
<literal>anonFTP={password=nobody@foobar.com}</literal>. If you want
to override an option to a script, you should index the subtable with
the script's <literal>id</literal>, since this is the only way the
script knows about its special argument.</para>
</listitem>
</varlistentry>
<varlistentry>