1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194
|
<HTML>
<HEAD>
<TITLE>nrun - run nmap, storing results in an organized fashion, optionally
running ndiff afterwards</TITLE>
<LINK REV="made" HREF="mailto:root@porky.devel.redhat.com">
</HEAD>
<BODY>
<!-- INDEX BEGIN -->
<UL>
<LI><A HREF="#NAME">NAME</A>
<LI><A HREF="#SYNOPSIS">SYNOPSIS</A>
<LI><A HREF="#DESCRIPTION">DESCRIPTION</A>
<LI><A HREF="#OPTIONS">OPTIONS</A>
<LI><A HREF="#DATA_STORES">DATA STORES</A>
<LI><A HREF="#SUBSTITUTIONS">SUBSTITUTIONS</A>
<LI><A HREF="#BUGS">BUGS</A>
<LI><A HREF="#AUTHOR">AUTHOR</A>
</UL>
<!-- INDEX END -->
<HR>
<P>
<H1><A NAME="NAME">NAME</A></H1>
<P>
nrun - run nmap, storing results in an organized fashion, optionally
running ndiff afterwards
<P>
<HR>
<H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
<P>
nrun <nrun options> -- <nmap options>
<P>
<PRE> <nrun options> =
</PRE>
<P>
<PRE> [-o|-output <filename-or-:tag>] [-b|-baseline <filename-or:tag>]
[-no|-ndiff-options "<ndiff options>"] [-nm|-nmap <path-to-nmap-binary>]
[-l|-logfile]
</PRE>
<P>
<HR>
<H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
<P>
Nrun passes <nmap options> through to nmap verbatim, except that it instructs nmap to
store results in machine-parseable format via nmap's <STRONG>-m</STRONG> switch, and adds the <STRONG>-v</STRONG> switch to generate a port listing in the output file.
<P>
Note that the ``--'' string must be present or <nmap options> will be
missed by nrun.
<P>
Since nrun inserts the <STRONG>-m</STRONG> and <STRONG>-v</STRONG> switches into the nmap command line, you should avoid putting those
switches in <nmap options> yourself.
<P>
In addition, nrun writes a meta-data file containing some interesting
information about the nmap run.
<P>
Nrun can automatically invoke ndiff to generate differences with a
specified baseline after the scan completes -- see <A HREF="#OPTIONS">OPTIONS</A> below.
<P>
<HR>
<H1><A NAME="OPTIONS">OPTIONS</A></H1>
<DL>
<DT><STRONG><A NAME="item__o">-o <filename-or-:tag></A></STRONG><DD>
<DT><STRONG><A NAME="item__output">-output <filename-or-:tag></A></STRONG><DD>
<P>
Use <filename-or-:tag> as the name of the stored results. By default
this is treated as a filename. Nrun also writes a metadata file,
``<filename-or-:tag>.info'' containing a some information about the
scan.
<P>
<filename-or-:tag> may contain %-style substitutions to dynamically add
time/date fields or the local host name. See <A HREF="#SUBSTITUTIONS">SUBSTITUTIONS</A> below.
<P>
The default for tag is ``<hostname>-YYYYMMDD.nm'' ( ``%F-%Y%w%D.nm''
).
<P>
If <filename-or-:tag> starts with a colon (:), <filename-or-:tag> is treated as a key into a data store, colon removed.
See <A HREF="#DATA_STORES">DATA STORES</A> for more information.
<DT><STRONG><A NAME="item__b">-b <filename-or-:tag></A></STRONG><DD>
<DT><STRONG><A NAME="item__baseline">-baseline <filename-or-:tag></A></STRONG><DD>
<P>
If nmap returns a successful result, instructs nrun to execute ndiff with
the new results against the (pre-existing) baseline results specified with
<filename-or-:tag>.
<P>
As with the <STRONG>-o</STRONG> option above, if <filename-or-:tag> starts with a colon, the tag is treated as a data
store key. See <A HREF="#DATA_STORES">DATA STORES</A> below.
<DT><STRONG><A NAME="item__no">-no "< ndiff options ... >"</A></STRONG><DD>
<DT><STRONG><A NAME="item__ndiff_options">-ndiff-options "< ndiff options ... >"</A></STRONG><DD>
<P>
Pass the ``<ndiff options>'' to ndiff. Use with the <STRONG>-b</STRONG> or <STRONG>-baseline</STRONG> switch. Note that the options must be a single (quoted).
<DT><STRONG><A NAME="item__nm">-nm <path-to-nmap-binary></A></STRONG><DD>
<DT><STRONG><A NAME="item__nmap">-nmap <path-to-nmap-binary></A></STRONG><DD>
<P>
Instructs nrun to execute <path-to-nmap-binary> explicitly instead of
using ``nmap'' as found in the search path.
<DT><STRONG><A NAME="item__qn">-qn</A></STRONG><DD>
<DT><STRONG><A NAME="item__quiet_nmap">-quiet-nmap</A></STRONG><DD>
<P>
Instructs nrun to redirect nmap's human readable output to /dev/null.
<DT><STRONG><A NAME="item__l">-l <logfile></A></STRONG><DD>
<DT><STRONG><A NAME="item__log">-log <logfile></A></STRONG><DD>
<P>
Instructs nrun to redirect nmap's human readable output to <logfile>.
Nrun's % substitutions are expanded in <logfile>. Currently there is
no support for storing logfiles with results data through data stores, but
this may be added later.
</DL>
<P>
<HR>
<H1><A NAME="DATA_STORES">DATA STORES</A></H1>
<P>
Nrun and its related tools can manipulate results in regular nmap-format
files, in any user-specified location, or they can handle storing and
organizing the data on behalf of the user, through a user-configurable
``data store''.
<P>
Whenever you precede a results tag with a colon (:), the tag will be
treated as a unique key into a data store, identifying the results set.
<P>
Currently the only supported data store is nmap format files placed in a
preconfigured directory. Other types may be added at a later date.
<P>
A legal tag may contain any alphanumeric string, plus dash, underscore, and
dot. %-style substitutions in the ilk of the ``date'' command are also
supported, allowing a tag to contain date, time, or the local hostname. See <A HREF="#SUBSTITUTIONS">SUBSTITUTIONS</A>
below for more information.
<P>
<HR>
<H1><A NAME="SUBSTITUTIONS">SUBSTITUTIONS</A></H1>
<P>
%-style substitutions supported in tags as follows:
<DL>
<DT><STRONG><A NAME="item__H">%H = hour</A></STRONG><DD>
<DT><STRONG><A NAME="item__M">%M = minute</A></STRONG><DD>
<DT><STRONG><A NAME="item__S">%S = second</A></STRONG><DD>
<DT><STRONG><A NAME="item__D">%D = day of month</A></STRONG><DD>
<DT><STRONG><A NAME="item__m">%m = month of year (01-12)</A></STRONG><DD>
<DT><STRONG><A NAME="item__Y">%Y = year, four digits</A></STRONG><DD>
<DT><STRONG><A NAME="item__j">%j = day of year, three digits</A></STRONG><DD>
<DT><STRONG><A NAME="item__w">%w = day of week (0-6) one digit</A></STRONG><DD>
</DL>
<P>
Except where noted, the above items are two digits, and local time. All are
zero-padded as appropriate.
<P>
In addtion-
<DL>
<DT><STRONG><A NAME="item__F">%F = output of "hostname" on the local machine</A></STRONG><DD>
</DL>
<P>
<HR>
<H1><A NAME="BUGS">BUGS</A></H1>
<P>
Ports Scanned lists in results files don't currently condense sequential
ranges of ports, resulting in larger than necessary files. This will be
fixed in a future update.
<P>
<HR>
<H1><A NAME="AUTHOR">AUTHOR</A></H1>
<P>
James Levine <<A HREF="mailto:jdl@vinecorp.com">jdl@vinecorp.com</A>>
</BODY>
</HTML>
|