File: nrun.html

package info (click to toggle)
ndiff 0.05beta4-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 300 kB
  • ctags: 254
  • sloc: perl: 1,806; makefile: 56
file content (194 lines) | stat: -rw-r--r-- 6,803 bytes parent folder | download | duplicates (2)
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 &lt;nrun options&gt; -- &lt;nmap options&gt;

<P>
<PRE>    &lt;nrun options&gt; =
</PRE>
<P>
<PRE>     [-o|-output &lt;filename-or-:tag&gt;] [-b|-baseline &lt;filename-or:tag&gt;]
     [-no|-ndiff-options &quot;&lt;ndiff options&gt;&quot;]  [-nm|-nmap &lt;path-to-nmap-binary&gt;]
     [-l|-logfile]  
</PRE>
<P>
<HR>
<H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
<P>
Nrun passes &lt;nmap options&gt; 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 &lt;nmap options&gt; 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 &lt;nmap options&gt; 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 &lt;filename-or-:tag&gt;</A></STRONG><DD>
<DT><STRONG><A NAME="item__output">-output &lt;filename-or-:tag&gt;</A></STRONG><DD>
<P>
Use &lt;filename-or-:tag&gt; as the name of the stored results. By default
this is treated as a filename. Nrun also writes a metadata file,
``&lt;filename-or-:tag&gt;.info'' containing a some information about the
scan.

<P>
&lt;filename-or-:tag&gt; 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 ``&lt;hostname&gt;-YYYYMMDD.nm'' ( ``%F-%Y%w%D.nm''
).

<P>
If &lt;filename-or-:tag&gt; starts with a colon (:), &lt;filename-or-:tag&gt; 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 &lt;filename-or-:tag&gt;</A></STRONG><DD>
<DT><STRONG><A NAME="item__baseline">-baseline &lt;filename-or-:tag&gt;</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
&lt;filename-or-:tag&gt;.

<P>
As with the <STRONG>-o</STRONG> option above, if &lt;filename-or-:tag&gt; 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 &quot;&lt; ndiff options ... &gt;&quot;</A></STRONG><DD>
<DT><STRONG><A NAME="item__ndiff_options">-ndiff-options &quot;&lt; ndiff options ... &gt;&quot;</A></STRONG><DD>
<P>
Pass the ``&lt;ndiff options&gt;'' 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 &lt;path-to-nmap-binary&gt;</A></STRONG><DD>
<DT><STRONG><A NAME="item__nmap">-nmap &lt;path-to-nmap-binary&gt;</A></STRONG><DD>
<P>
Instructs nrun to execute &lt;path-to-nmap-binary&gt; 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 &lt;logfile&gt;</A></STRONG><DD>
<DT><STRONG><A NAME="item__log">-log &lt;logfile&gt;</A></STRONG><DD>
<P>
Instructs nrun to redirect nmap's human readable output to &lt;logfile&gt;.
Nrun's % substitutions are expanded in &lt;logfile&gt;. 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 &quot;hostname&quot; 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 &lt;<A HREF="mailto:jdl@vinecorp.com">jdl@vinecorp.com</A>&gt;

</BODY>

</HTML>