diff options
author | aaron <> | 1998-09-27 16:57:47 +0000 |
---|---|---|
committer | aaron <> | 1998-09-27 16:57:47 +0000 |
commit | b63a69d9273ccf50124a8571536e468986bd2d11 (patch) | |
tree | 2b7b54bb3fb7cf91223e89841452ef1ae5e5379a /src/usr.bin/nc/nc.1 | |
parent | 583667bf28d2a703b3c969f239bff42bb5aedce2 (diff) | |
download | openbsd-b63a69d9273ccf50124a8571536e468986bd2d11.tar.gz openbsd-b63a69d9273ccf50124a8571536e468986bd2d11.tar.bz2 openbsd-b63a69d9273ccf50124a8571536e468986bd2d11.zip |
usr.bin/ man page cleanups, n-s
Diffstat (limited to 'src/usr.bin/nc/nc.1')
-rw-r--r-- | src/usr.bin/nc/nc.1 | 59 |
1 files changed, 31 insertions, 28 deletions
diff --git a/src/usr.bin/nc/nc.1 b/src/usr.bin/nc/nc.1 index 2900fc7601..8ada12ff95 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.2 1998/03/11 18:42:23 deraadt Exp $ | 1 | .\" $OpenBSD: nc.1,v 1.3 1998/09/27 16:57:47 aaron Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 1996 David Sacerdote | 3 | .\" Copyright (c) 1996 David Sacerdote |
4 | .\" All rights reserved. | 4 | .\" All rights reserved. |
@@ -26,12 +26,11 @@ | |||
26 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | .\" | 27 | .\" |
28 | .Dd August 1, 1996 | 28 | .Dd August 1, 1996 |
29 | .Dt nc 1 | 29 | .Dt NC 1 |
30 | .Sh NAME | 30 | .Sh NAME |
31 | .Os | 31 | .Os |
32 | .Nm nc | 32 | .Nm nc |
33 | .Nd | 33 | .Nd arbitrary TCP and UDP connections and listens |
34 | Arbitrary tcp and udp connections and listens. | ||
35 | .Pp | 34 | .Pp |
36 | .Sh SYNOPSIS | 35 | .Sh SYNOPSIS |
37 | .Nm nc | 36 | .Nm nc |
@@ -53,8 +52,8 @@ The | |||
53 | (or | 52 | (or |
54 | .Nm netcat ) | 53 | .Nm netcat ) |
55 | utility is used for just about anything under the sun | 54 | utility is used for just about anything under the sun |
56 | involving TCP or UDP. It can open tcp connections, send udp packets, | 55 | involving TCP or UDP. It can open TCP connections, send UDP packets, |
57 | listen on arbitrary tcp and udp ports, do port scanning, and source | 56 | listen on arbitrary TCP and UDP ports, do port scanning, and source |
58 | routing. Unlike | 57 | routing. Unlike |
59 | .Xr telnet 1 , | 58 | .Xr telnet 1 , |
60 | .Nm nc | 59 | .Nm nc |
@@ -71,9 +70,9 @@ ranges may be specified on the command line. | |||
71 | Common uses include: | 70 | Common uses include: |
72 | .Bl -bullet | 71 | .Bl -bullet |
73 | .It | 72 | .It |
74 | simple tcp proxies | 73 | simple TCP proxies |
75 | .It | 74 | .It |
76 | shell\-script based http clients and servers | 75 | shell\-script based HTTP clients and servers |
77 | .It | 76 | .It |
78 | network daemon testing | 77 | network daemon testing |
79 | .It | 78 | .It |
@@ -103,7 +102,7 @@ Also causes a delay time between connections to multiple ports. | |||
103 | Is used to specify that | 102 | Is used to specify that |
104 | .Nm nc | 103 | .Nm nc |
105 | should listen for an incoming connection, rather than initiate a | 104 | should listen for an incoming connection, rather than initiate a |
106 | connection to a remote host. Any hostname/ip address and port arguments | 105 | connection to a remote host. Any hostname/IP address and port arguments |
107 | restrict the source of inbound connections to only that address and | 106 | restrict the source of inbound connections to only that address and |
108 | source port. | 107 | source port. |
109 | .It Fl n | 108 | .It Fl n |
@@ -111,20 +110,21 @@ Do not do DNS lookups on any of the specified addresses or hostnames, or | |||
111 | names of port numbers from /etc/services. | 110 | names of port numbers from /etc/services. |
112 | .It Fl o Ar filename | 111 | .It Fl o Ar filename |
113 | Create a hexadecimal log of data transferred in the specified file. | 112 | Create a hexadecimal log of data transferred in the specified file. |
114 | Each line begins with < or >. < means "from the net" and > means | 113 | Each line begins with ``<'' or ``>''. ``<'' means "from the net" and ``>'' |
115 | "to the net." | 114 | means "to the net". |
116 | .It Fl p Ar port | 115 | .It Fl p Ar port |
117 | Specifies the source port | 116 | Specifies the source port |
118 | .Nm nc | 117 | .Nm nc |
119 | should use, subject to privilege restrictions and availability. | 118 | should use, subject to privilege restrictions and availability. |
120 | .It Fl r | 119 | .It Fl r |
121 | Specified that source and/or destination ports should be chosen semi-randomly | 120 | Specifies that source and/or destination ports should be chosen semi-randomly |
122 | instead of sequentially within a range or in the order that the | 121 | instead of sequentially within a range or in the order that the |
123 | system assigns. | 122 | system assigns. |
124 | .It Fl s Ar hostname/ip-address | 123 | .It Fl s Ar hostname/ip-address |
125 | Specifies the ip of the interface which is used to send the packets. | 124 | Specifies the IP of the interface which is used to send the packets. |
126 | On some platforms, this can be used for udp spoofing by using ifconfig | 125 | On some platforms, this can be used for UDP spoofing by using |
127 | to bring up a dummy interface with the desired source ip address. | 126 | .Xr ifconfig 8 |
127 | to bring up a dummy interface with the desired source IP address. | ||
128 | .It Fl t | 128 | .It Fl t |
129 | Causes | 129 | Causes |
130 | .Nm nc | 130 | .Nm nc |
@@ -143,7 +143,8 @@ sends. | |||
143 | .It Fl v | 143 | .It Fl v |
144 | Verbose. Cause | 144 | Verbose. Cause |
145 | .Nm nc | 145 | .Nm nc |
146 | to display connection information. Using \-v | 146 | to display connection information. Using |
147 | .Fl v | ||
147 | more than once will cause | 148 | more than once will cause |
148 | .Nm nc | 149 | .Nm nc |
149 | to become even more verbose. | 150 | to become even more verbose. |
@@ -160,9 +161,10 @@ Specifies that | |||
160 | should just scan for listening | 161 | should just scan for listening |
161 | daemons, without sending any data to them. Diagnostic messages about refused | 162 | daemons, without sending any data to them. Diagnostic messages about refused |
162 | connections will not be | 163 | connections will not be |
163 | displayed unless \-v is specified twice. | 164 | displayed unless |
165 | .Fl v | ||
166 | is specified twice. | ||
164 | .Sh EXAMPLES | 167 | .Sh EXAMPLES |
165 | .Pp | ||
166 | .Bl -tag -width x | 168 | .Bl -tag -width x |
167 | .It Li "nc" | 169 | .It Li "nc" |
168 | Wait for the user to type what would normally be command-line | 170 | Wait for the user to type what would normally be command-line |
@@ -174,27 +176,27 @@ fails, do not display any error messages, but simply exit. | |||
174 | Open a TCP connection to port 42 of example.host, and use port 31337 | 176 | Open a TCP connection to port 42 of example.host, and use port 31337 |
175 | as the source port. | 177 | as the source port. |
176 | .It Li "nc -w 5 example.host 42" | 178 | .It Li "nc -w 5 example.host 42" |
177 | Open a tcp connection to port 42 of example.host, and time out after | 179 | Open a TCP connection to port 42 of example.host, and time out after |
178 | five seconds while attempting to connect. | 180 | five seconds while attempting to connect. |
179 | .It Li "nc -u example.host 53" | 181 | .It Li "nc -u example.host 53" |
180 | Send any data from stdin | 182 | Send any data from stdin |
181 | to UDP port 53 of example.host, and display any data returned. | 183 | to UDP port 53 of example.host, and display any data returned. |
182 | .It Li "nc -s 10.1.2.3 example.host 42" | 184 | .It Li "nc -s 10.1.2.3 example.host 42" |
183 | Open a tcp connection to port 42 of example.host using 10.1.2.3 as the | 185 | Open a TCP connection to port 42 of example.host using 10.1.2.3 as the |
184 | ip for the local end of the connection. | 186 | IP for the local end of the connection. |
185 | .It Li "nc -v example.host 42" | 187 | .It Li "nc -v example.host 42" |
186 | Open a tcp connection to port 42 of example.host, displaying some | 188 | Open a TCP connection to port 42 of example.host, displaying some |
187 | diagnostic messages on stderr. | 189 | diagnostic messages on stderr. |
188 | .It Li "nc -v -v example.host 42" | 190 | .It Li "nc -v -v example.host 42" |
189 | Open a tcp connection to port 42 of example.host, displaying all | 191 | Open a TCP connection to port 42 of example.host, displaying all |
190 | diagnostic messages on stderr. | 192 | diagnostic messages on stderr. |
191 | .It Li "nc -v -z example.host 20-30" | 193 | .It Li "nc -v -z example.host 20-30" |
192 | Attempt to open tcp connections to ports 20 through 30 of | 194 | Attempt to open TCP connections to ports 20 through 30 of |
193 | example.host, and report which ones | 195 | example.host, and report which ones |
194 | .Nm nc | 196 | .Nm nc |
195 | was able to connect to. | 197 | was able to connect to. |
196 | .It Li "nc -v -u -z -w 3 example.host 20-30" | 198 | .It Li "nc -v -u -z -w 3 example.host 20-30" |
197 | Send udp packets to ports 20-30 of example.host, and report which ones | 199 | Send UDP packets to ports 20-30 of example.host, and report which ones |
198 | did not respond with an ICMP packet after three seconds. | 200 | did not respond with an ICMP packet after three seconds. |
199 | .It Li "nc -l -p 3000" | 201 | .It Li "nc -l -p 3000" |
200 | Listen on TCP port 3000, and once there is a connection, send stdin to | 202 | Listen on TCP port 3000, and once there is a connection, send stdin to |
@@ -205,10 +207,11 @@ followed by a newline, and move data from port 1000 of example.host to | |||
205 | stdout until example.host closes the connection. | 207 | stdout until example.host closes the connection. |
206 | .El | 208 | .El |
207 | .Sh SEE ALSO | 209 | .Sh SEE ALSO |
208 | .Xr telnet 1 , | ||
209 | .Xr cat 1 , | 210 | .Xr cat 1 , |
210 | and the | 211 | .Xr telnet 1 |
212 | .Pp | ||
213 | The | ||
211 | .Nm netcat | 214 | .Nm netcat |
212 | .Pa README | 215 | .Pa README . |
213 | .Sh AUTHOR | 216 | .Sh AUTHOR |
214 | *Hobbit* [hobbit@avian.org] | 217 | *Hobbit* [hobbit@avian.org] |