Net Cat
Net Cat
nc -v -z remote_host <port>-<port>
Use the -i flag to set a delay interval:
nc -i <seconds> -v -z remote_host
<port>-<port>
Pipe command output
to a netcat request
<command> | nc remote_host <port>
For example:
echo "GET / HTTP/1.0
(enter)
(enter)
"| nc www.somecompanyasanexample.com 80
Use source-routing to
connect to a port on a
remote host
nc -g <gateway> remote_host <port>
Note: Up to eight hop points may be specified using the -g flag.
Use the -G flag to specify the source-routing pointer.
Spoof source IP
address
Use the -s flag to spoof the source IP address:
nc -s spoofed_ip remote_host port
This command will cause the remote host to respond back to the
spoofed IP address. The -s flag can be used along with most of
the commands presented in this table.
Transfer a file
On the server host:
nc -v -l -p <port> < <file>