It can be useful for serving as a simple TCP proxy, writing simple client and server HTTP scripts, testing network server processes (daemons), and many other functions.
Here are some examples of using Netcat:
To connect to any host:port using netcat, you must provide the host address and port. It’s useful to see if a particular server is responding:
$ nc google.com 80
get../..
HTTP/1.0 400 Bad Request
Content-Type: text/html; charset=UTF-8
Content-Length: 1419
Date: Tue, 14 Apr 2015 02:11:11 GMT
Server: GFE/2.0
To use netcat as a process that listens on a certain port and sends the result to a file. It is useful to know what a client application is sending to a particular server:
$ nc —l —p 6565 > /tmp/arquivo.tmp
Netcat can even be used to listen to a certain port and play the result on the terminal:
$ nc -l -vv 4343
Netcat can be used to find out which ports are open on a given host. It is useful for verifying whether or not a particular service should be listening on the network:
$ nc -vv -w1 google.com 20-443
This tool can either behave as a server or client application, in order to test the services offered by a particular server or client.
The sudo command on Linux executes a given command as if it were another user.…
The ss command on Linux is extremely useful for investigating sockets, providing various information about…
Free Linux command shows the amount of total memory in use and available, as well…
The shell has structures for testing conditions and executing certain program sequences several times (loop),…
The /etc/fstab file stores the configuration of which devices should be mounted and what is…
The gdisk command in Linux is similar to fdisk and allows you to manipulate and…
This website uses cookies.