1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-10 23:15:42 +02:00

nc: update page (#10353)

This commit is contained in:
Lena 2023-06-10 17:02:36 +02:00 committed by GitHub
parent 7a9d9ddb48
commit fe721d893a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,6 @@
# nc # nc
> Netcat is a versatile utility for working with TCP or UDP data. > A versatile utility for working with TCP or UDP data.
> More information: <https://manned.org/man/nc.1>. > More information: <https://manned.org/man/nc.1>.
- Establish a TCP connection: - Establish a TCP connection:
@ -27,10 +27,10 @@
`nc -u -l {{port}}` `nc -u -l {{port}}`
- Act as proxy and forward data from a local TCP port to the given remote host: - Act as a proxy and forward data from a local TCP port to the given remote host:
`nc -l {{local_port}} | nc {{hostname}} {{remote_port}}` `nc -l {{local_port}} | nc {{hostname}} {{remote_port}}`
- Send a HTTP request: - Send an HTTP GET request:
`echo -e "GET / HTTP/1.1\nHost: {{hostname}}\n\n" | nc {{hostname}} 80` `echo -e "GET / HTTP/1.1\nHost: {{hostname}}\n\n" | nc {{hostname}} 80`