diff options
| author | aaron <> | 2000-03-10 19:07:22 +0000 |
|---|---|---|
| committer | aaron <> | 2000-03-10 19:07:22 +0000 |
| commit | 3e6562e2a770041c3b20bf8178470b6f81da3406 (patch) | |
| tree | b34e27ed9339c685ae791634d6bdbc5e23361f7a /src | |
| parent | 6f49f8750388016173fa606647ac032ab286f200 (diff) | |
| download | openbsd-3e6562e2a770041c3b20bf8178470b6f81da3406.tar.gz openbsd-3e6562e2a770041c3b20bf8178470b6f81da3406.tar.bz2 openbsd-3e6562e2a770041c3b20bf8178470b6f81da3406.zip | |
Various cleanups and standardization.
Diffstat (limited to 'src')
| -rw-r--r-- | src/usr.bin/nc/nc.1 | 63 |
1 files changed, 42 insertions, 21 deletions
diff --git a/src/usr.bin/nc/nc.1 b/src/usr.bin/nc/nc.1 index 1c0cd6fa48..c069c29c11 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.6 1999/06/05 01:21:34 aaron Exp $ | 1 | .\" $OpenBSD: nc.1,v 1.7 2000/03/10 19:07:22 aaron Exp $ |
| 2 | .\" | 2 | .\" |
| 3 | .\" Copyright (c) 1996 David Sacerdote | 3 | .\" Copyright (c) 1996 David Sacerdote |
| 4 | .\" All rights reserved. | 4 | .\" All rights reserved. |
| @@ -50,9 +50,11 @@ The | |||
| 50 | (or | 50 | (or |
| 51 | .Nm netcat ) | 51 | .Nm netcat ) |
| 52 | utility is used for just about anything under the sun | 52 | utility is used for just about anything under the sun |
| 53 | involving TCP or UDP. It can open TCP connections, send UDP packets, | 53 | involving TCP or UDP. |
| 54 | It can open TCP connections, send UDP packets, | ||
| 54 | listen on arbitrary TCP and UDP ports, do port scanning, and source | 55 | listen on arbitrary TCP and UDP ports, do port scanning, and source |
| 55 | routing. Unlike | 56 | routing. |
| 57 | Unlike | ||
| 56 | .Xr telnet 1 , | 58 | .Xr telnet 1 , |
| 57 | .Nm | 59 | .Nm |
| 58 | scripts nicely, and separates error messages onto standard error instead | 60 | scripts nicely, and separates error messages onto standard error instead |
| @@ -62,11 +64,13 @@ does with some. | |||
| 62 | .Pp | 64 | .Pp |
| 63 | Destination ports can be single integers, names as listed in | 65 | Destination ports can be single integers, names as listed in |
| 64 | .Xr services 5 , | 66 | .Xr services 5 , |
| 65 | or ranges. Ranges are in the form nn-mm, and several separate ports and/or | 67 | or ranges. |
| 68 | Ranges are in the form nn-mm, and several separate ports and/or | ||
| 66 | ranges may be specified on the command line. | 69 | ranges may be specified on the command line. |
| 67 | .Pp | 70 | .Pp |
| 68 | Common uses include: | 71 | Common uses include: |
| 69 | .Bl -bullet | 72 | .Pp |
| 73 | .Bl -bullet -offset indent -compact | ||
| 70 | .It | 74 | .It |
| 71 | simple TCP proxies | 75 | simple TCP proxies |
| 72 | .It | 76 | .It |
| @@ -83,16 +87,19 @@ The options are as follows: | |||
| 83 | .Bl -tag -width Ds | 87 | .Bl -tag -width Ds |
| 84 | .It Fl e Ar command | 88 | .It Fl e Ar command |
| 85 | Execute the specified command, using data from the network for stdin, | 89 | Execute the specified command, using data from the network for stdin, |
| 86 | and sending stdout and stderr to the network. This option is only present if | 90 | and sending stdout and stderr to the network. |
| 91 | This option is only present if | ||
| 87 | .Nm | 92 | .Nm |
| 88 | was compiled with the GAPING_SECURITY_HOLE compile time option, since it | 93 | was compiled with the GAPING_SECURITY_HOLE compile time option, since it |
| 89 | allows users to make arbitrary programs available to anyone on the network. | 94 | allows users to make arbitrary programs available to anyone on the network. |
| 90 | .It Fl g Ar intermediate-host | 95 | .It Fl g Ar intermediate-host |
| 91 | Specifies a hop along a loose source routed path. Can be used more than | 96 | Specifies a hop along a loose source routed path. |
| 92 | once to build a chain of hop points. | 97 | Can be used more than once to build a chain of hop points. |
| 93 | .It Fl G Ar pointer | 98 | .It Fl G Ar pointer |
| 94 | Positions the "hop counter" within the list of machines in the path of | 99 | Positions the |
| 95 | a source routed packet. Must be a multiple of 4. | 100 | .Dq hop counter |
| 101 | within the list of machines in the path of a source routed packet. | ||
| 102 | Must be a multiple of 4. | ||
| 96 | .It Fl i Ar seconds | 103 | .It Fl i Ar seconds |
| 97 | Specifies a delay time interval between lines of text sent and received. | 104 | Specifies a delay time interval between lines of text sent and received. |
| 98 | Also causes a delay time between connections to multiple ports. | 105 | Also causes a delay time between connections to multiple ports. |
| @@ -100,7 +107,8 @@ Also causes a delay time between connections to multiple ports. | |||
| 100 | Is used to specify that | 107 | Is used to specify that |
| 101 | .Nm | 108 | .Nm |
| 102 | should listen for an incoming connection, rather than initiate a | 109 | should listen for an incoming connection, rather than initiate a |
| 103 | connection to a remote host. Any hostname/IP address and port arguments | 110 | connection to a remote host. |
| 111 | Any hostname/IP address and port arguments | ||
| 104 | restrict the source of inbound connections to only that address and | 112 | restrict the source of inbound connections to only that address and |
| 105 | source port. | 113 | source port. |
| 106 | .It Fl n | 114 | .It Fl n |
| @@ -108,8 +116,17 @@ Do not do DNS lookups on any of the specified addresses or hostnames, or | |||
| 108 | names of port numbers from /etc/services. | 116 | names of port numbers from /etc/services. |
| 109 | .It Fl o Ar filename | 117 | .It Fl o Ar filename |
| 110 | Create a hexadecimal log of data transferred in the specified file. | 118 | Create a hexadecimal log of data transferred in the specified file. |
| 111 | Each line begins with ``<'' or ``>''. ``<'' means "from the net" and ``>'' | 119 | Each line begins with |
| 112 | means "to the net". | 120 | .Ql < |
| 121 | or | ||
| 122 | .Ql > . | ||
| 123 | .Ql < | ||
| 124 | means | ||
| 125 | .Dq from the net | ||
| 126 | and | ||
| 127 | .Ql > | ||
| 128 | means | ||
| 129 | .Dq to the net . | ||
| 113 | .It Fl p Ar port | 130 | .It Fl p Ar port |
| 114 | Specifies the source port | 131 | Specifies the source port |
| 115 | .Nm | 132 | .Nm |
| @@ -127,9 +144,11 @@ to bring up a dummy interface with the desired source IP address. | |||
| 127 | Causes | 144 | Causes |
| 128 | .Nm | 145 | .Nm |
| 129 | to send RFC854 DON'T and WON'T responses to RFC854 DO | 146 | to send RFC854 DON'T and WON'T responses to RFC854 DO |
| 130 | and WILL requests. This makes it possible to use | 147 | and WILL requests. |
| 148 | This makes it possible to use | ||
| 131 | .Nm | 149 | .Nm |
| 132 | to script telnet sessions. The presence of this option can be | 150 | to script telnet sessions. |
| 151 | The presence of this option can be | ||
| 133 | enabled or disabled as a compile-time option. | 152 | enabled or disabled as a compile-time option. |
| 134 | .It Fl u | 153 | .It Fl u |
| 135 | Use UDP instead of TCP. | 154 | Use UDP instead of TCP. |
| @@ -139,9 +158,11 @@ will behave as if a connection is established until it receives an | |||
| 139 | ICMP packet indicating that there is no program listening to what it | 158 | ICMP packet indicating that there is no program listening to what it |
| 140 | sends. | 159 | sends. |
| 141 | .It Fl v | 160 | .It Fl v |
| 142 | Verbose. Cause | 161 | Verbose. |
| 162 | Cause | ||
| 143 | .Nm | 163 | .Nm |
| 144 | to display connection information. Using | 164 | to display connection information. |
| 165 | Using | ||
| 145 | .Fl v | 166 | .Fl v |
| 146 | more than once will cause | 167 | more than once will cause |
| 147 | .Nm | 168 | .Nm |
| @@ -157,9 +178,8 @@ input closes. | |||
| 157 | Specifies that | 178 | Specifies that |
| 158 | .Nm | 179 | .Nm |
| 159 | should just scan for listening | 180 | should just scan for listening |
| 160 | daemons, without sending any data to them. Diagnostic messages about refused | 181 | daemons, without sending any data to them. |
| 161 | connections will not be | 182 | Diagnostic messages about refused connections with not be displayed unless |
| 162 | displayed unless | ||
| 163 | .Fl v | 183 | .Fl v |
| 164 | is specified twice. | 184 | is specified twice. |
| 165 | .Sh EXAMPLES | 185 | .Sh EXAMPLES |
| @@ -168,7 +188,8 @@ is specified twice. | |||
| 168 | Wait for the user to type what would normally be command-line | 188 | Wait for the user to type what would normally be command-line |
| 169 | arguments in at stdin. | 189 | arguments in at stdin. |
| 170 | .It Li "nc example.host 42" | 190 | .It Li "nc example.host 42" |
| 171 | Open a TCP connection to port 42 of example.host. If the connection | 191 | Open a TCP connection to port 42 of example.host. |
| 192 | If the connection | ||
| 172 | fails, do not display any error messages, but simply exit. | 193 | fails, do not display any error messages, but simply exit. |
| 173 | .It Li "nc -p 31337 example.host 42" | 194 | .It Li "nc -p 31337 example.host 42" |
| 174 | Open a TCP connection to port 42 of example.host, and use port 31337 | 195 | Open a TCP connection to port 42 of example.host, and use port 31337 |
