filmov
tv
Simple TCP server/client with netcat (nc command)
Показать описание
From the Wikipedia page: "netcat (often abbreviated to nc) is a computer networking utility for reading from and writing to network connections using TCP or UDP. "
In our example, we use netcat to send messages between a client and a server, both on the local machine (thus, the client is connecting to the localhost IP address 127.0.0.1).
This works for any machines that are in the same network and can ping each other and has many other use cases. For example, this can also be used for sending files (however, be aware that this connection is not secure in any way; any eavesdropper can see the content of the messages).
In our example, we use netcat to send messages between a client and a server, both on the local machine (thus, the client is connecting to the localhost IP address 127.0.0.1).
This works for any machines that are in the same network and can ping each other and has many other use cases. For example, this can also be used for sending files (however, be aware that this connection is not secure in any way; any eavesdropper can see the content of the messages).