mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-08-04 08:55:35 +02:00
netcat: refresh page (#9926)
This commit is contained in:
parent
e162894ac7
commit
62580eba10
1 changed files with 16 additions and 12 deletions
|
@ -1,13 +1,9 @@
|
||||||
# nc
|
# nc
|
||||||
|
|
||||||
> Netcat is a versatile utility for working with TCP or UDP data.
|
> Netcat is a versatile utility for working with TCP or UDP data.
|
||||||
> More information: <https://nmap.org/ncat>.
|
> More information: <https://manned.org/man/nc.1>.
|
||||||
|
|
||||||
- Listen on a specified port and print any data received:
|
- Establish a TCP connection:
|
||||||
|
|
||||||
`nc -l {{port}}`
|
|
||||||
|
|
||||||
- Connect to a certain port:
|
|
||||||
|
|
||||||
`nc {{ip_address}} {{port}}`
|
`nc {{ip_address}} {{port}}`
|
||||||
|
|
||||||
|
@ -15,18 +11,26 @@
|
||||||
|
|
||||||
`nc -w {{timeout_in_seconds}} {{ipaddress}} {{port}}`
|
`nc -w {{timeout_in_seconds}} {{ipaddress}} {{port}}`
|
||||||
|
|
||||||
|
- Scan the open TCP ports of a specified host:
|
||||||
|
|
||||||
|
`nc -v -z {{ip_address}} {{port}}`
|
||||||
|
|
||||||
|
- Listen on a specified TCP port and print any data received:
|
||||||
|
|
||||||
|
`nc -l {{port}}`
|
||||||
|
|
||||||
- Keep the server up after the client detaches:
|
- Keep the server up after the client detaches:
|
||||||
|
|
||||||
`nc -k -l {{port}}`
|
`nc -k -l {{port}}`
|
||||||
|
|
||||||
- Keep the client up even after EOF:
|
- Listen on a specified UDP port and print connection details and any data received:
|
||||||
|
|
||||||
`nc -q {{timeout}} {{ip_address}}`
|
`nc -u -l {{port}}`
|
||||||
|
|
||||||
- Scan the open ports of a specified host:
|
|
||||||
|
|
||||||
`nc -v -z {{ip_address}} {{port}}`
|
|
||||||
|
|
||||||
- Act as proxy and forward data from a local TCP port to the given remote host:
|
- Act as 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:
|
||||||
|
|
||||||
|
`echo -e "GET / HTTP/1.1\nHost: {{hostname}}\n\n" | nc {{hostname}} 80`
|
||||||
|
|
Loading…
Add table
Reference in a new issue