summaryrefslogtreecommitdiff
path: root/src/usr.bin/nc/nc.1
diff options
context:
space:
mode:
authoraaron <>1999-06-05 01:21:34 +0000
committeraaron <>1999-06-05 01:21:34 +0000
commit64e5679419440e1ce0502f4372226d92fcff26b1 (patch)
tree9c3b90da016c1c41dd27b8d47abc1d183dfdd217 /src/usr.bin/nc/nc.1
parent569578dc356ba2402bc9d1b54016c009127366cb (diff)
downloadopenbsd-64e5679419440e1ce0502f4372226d92fcff26b1.tar.gz
openbsd-64e5679419440e1ce0502f4372226d92fcff26b1.tar.bz2
openbsd-64e5679419440e1ce0502f4372226d92fcff26b1.zip
- remove trailing white space
- remove arguments from .Os macros - remove arguments from .Nm macros, where appropriate - some more Dq/Sq/Ql insanity - still lots to do in the usr.bin tree... :/
Diffstat (limited to 'src/usr.bin/nc/nc.1')
-rw-r--r--src/usr.bin/nc/nc.142
1 files changed, 21 insertions, 21 deletions
diff --git a/src/usr.bin/nc/nc.1 b/src/usr.bin/nc/nc.1
index 8d87051c73..1c0cd6fa48 100644
--- a/src/usr.bin/nc/nc.1
+++ b/src/usr.bin/nc/nc.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: nc.1,v 1.5 1998/09/28 06:57:35 millert Exp $ 1.\" $OpenBSD: nc.1,v 1.6 1999/06/05 01:21:34 aaron Exp $
2.\" 2.\"
3.\" Copyright (c) 1996 David Sacerdote 3.\" Copyright (c) 1996 David Sacerdote
4.\" All rights reserved. 4.\" All rights reserved.
@@ -39,14 +39,14 @@
39.Op Fl i Ar interval 39.Op Fl i Ar interval
40.Op Fl lnrtuvz 40.Op Fl lnrtuvz
41.Op Fl o Ar filename 41.Op Fl o Ar filename
42.Op Fl p Ar source port 42.Op Fl p Ar source port
43.Op Fl s Ar ip address 43.Op Fl s Ar ip address
44.Op Fl w Ar timeout 44.Op Fl w Ar timeout
45.Op Ar hostname 45.Op Ar hostname
46.Op Ar port[s...] 46.Op Ar port[s...]
47.Sh DESCRIPTION 47.Sh DESCRIPTION
48The 48The
49.Nm nc 49.Nm
50(or 50(or
51.Nm netcat ) 51.Nm netcat )
52utility is used for just about anything under the sun 52utility is used for just about anything under the sun
@@ -54,11 +54,11 @@ involving TCP or UDP. It can open TCP connections, send UDP packets,
54listen on arbitrary TCP and UDP ports, do port scanning, and source 54listen on arbitrary TCP and UDP ports, do port scanning, and source
55routing. Unlike 55routing. Unlike
56.Xr telnet 1 , 56.Xr telnet 1 ,
57.Nm nc 57.Nm
58scripts nicely, and separates error messages onto standard error instead 58scripts nicely, and separates error messages onto standard error instead
59of sending them to standard output, as 59of sending them to standard output, as
60.Xr telnet 1 60.Xr telnet 1
61does with some. 61does with some.
62.Pp 62.Pp
63Destination ports can be single integers, names as listed in 63Destination ports can be single integers, names as listed in
64.Xr services 5 , 64.Xr services 5 ,
@@ -66,7 +66,7 @@ or ranges. Ranges are in the form nn-mm, and several separate ports and/or
66ranges may be specified on the command line. 66ranges may be specified on the command line.
67.Pp 67.Pp
68Common uses include: 68Common uses include:
69.Bl -bullet 69.Bl -bullet
70.It 70.It
71simple TCP proxies 71simple TCP proxies
72.It 72.It
@@ -84,7 +84,7 @@ The options are as follows:
84.It Fl e Ar command 84.It Fl e Ar command
85Execute the specified command, using data from the network for stdin, 85Execute the specified command, using data from the network for stdin,
86and sending stdout and stderr to the network. This option is only present if 86and sending stdout and stderr to the network. This option is only present if
87.Nm nc 87.Nm
88was compiled with the GAPING_SECURITY_HOLE compile time option, since it 88was compiled with the GAPING_SECURITY_HOLE compile time option, since it
89allows users to make arbitrary programs available to anyone on the network. 89allows users to make arbitrary programs available to anyone on the network.
90.It Fl g Ar intermediate-host 90.It Fl g Ar intermediate-host
@@ -98,7 +98,7 @@ Specifies a delay time interval between lines of text sent and received.
98Also causes a delay time between connections to multiple ports. 98Also causes a delay time between connections to multiple ports.
99.It Fl l 99.It Fl l
100Is used to specify that 100Is used to specify that
101.Nm nc 101.Nm
102should listen for an incoming connection, rather than initiate a 102should listen for an incoming connection, rather than initiate a
103connection to a remote host. Any hostname/IP address and port arguments 103connection to a remote host. Any hostname/IP address and port arguments
104restrict the source of inbound connections to only that address and 104restrict the source of inbound connections to only that address and
@@ -112,7 +112,7 @@ Each line begins with ``<'' or ``>''. ``<'' means "from the net" and ``>''
112means "to the net". 112means "to the net".
113.It Fl p Ar port 113.It Fl p Ar port
114Specifies the source port 114Specifies the source port
115.Nm nc 115.Nm
116should use, subject to privilege restrictions and availability. 116should use, subject to privilege restrictions and availability.
117.It Fl r 117.It Fl r
118Specifies that source and/or destination ports should be chosen semi-randomly 118Specifies that source and/or destination ports should be chosen semi-randomly
@@ -125,37 +125,37 @@ On some platforms, this can be used for UDP spoofing by using
125to bring up a dummy interface with the desired source IP address. 125to bring up a dummy interface with the desired source IP address.
126.It Fl t 126.It Fl t
127Causes 127Causes
128.Nm nc 128.Nm
129to send RFC854 DON'T and WON'T responses to RFC854 DO 129to send RFC854 DON'T and WON'T responses to RFC854 DO
130and WILL requests. This makes it possible to use 130and WILL requests. This makes it possible to use
131.Nm nc 131.Nm
132to script telnet sessions. The presence of this option can be 132to script telnet sessions. The presence of this option can be
133enabled or disabled as a compile-time option. 133enabled or disabled as a compile-time option.
134.It Fl u 134.It Fl u
135Use UDP instead of TCP. 135Use UDP instead of TCP.
136On most platforms, 136On most platforms,
137.Nm nc 137.Nm
138will behave as if a connection is established until it receives an 138will behave as if a connection is established until it receives an
139ICMP packet indicating that there is no program listening to what it 139ICMP packet indicating that there is no program listening to what it
140sends. 140sends.
141.It Fl v 141.It Fl v
142Verbose. Cause 142Verbose. Cause
143.Nm nc 143.Nm
144to display connection information. Using 144to display connection information. Using
145.Fl v 145.Fl v
146more than once will cause 146more than once will cause
147.Nm nc 147.Nm
148to become even more verbose. 148to become even more verbose.
149.It Fl w Ar timeout 149.It Fl w Ar timeout
150Specifies the number of seconds 150Specifies the number of seconds
151.Nm nc 151.Nm
152should wait before deciding that 152should wait before deciding that
153an attempt to establish a connection is hopeless. 153an attempt to establish a connection is hopeless.
154Also used to specify how long to wait for more network data after standard 154Also used to specify how long to wait for more network data after standard
155input closes. 155input closes.
156.It Fl z 156.It Fl z
157Specifies that 157Specifies that
158.Nm nc 158.Nm
159should just scan for listening 159should just scan for listening
160daemons, without sending any data to them. Diagnostic messages about refused 160daemons, without sending any data to them. Diagnostic messages about refused
161connections will not be 161connections will not be
@@ -191,7 +191,7 @@ diagnostic messages on stderr.
191.It Li "nc -v -z example.host 20-30" 191.It Li "nc -v -z example.host 20-30"
192Attempt to open TCP connections to ports 20 through 30 of 192Attempt to open TCP connections to ports 20 through 30 of
193example.host, and report which ones 193example.host, and report which ones
194.Nm nc 194.Nm
195was able to connect to. 195was able to connect to.
196.It Li "nc -v -u -z -w 3 example.host 20-30" 196.It Li "nc -v -u -z -w 3 example.host 20-30"
197Send UDP packets to ports 20-30 of example.host, and report which ones 197Send UDP packets to ports 20-30 of example.host, and report which ones