Network - netcat (nc)

> NetWork

1 - About

netcat is command line tool that reads and writes data across network connections, using TCP or UDP protocol.


3 - Syntax

To create a TCP connection:

  • Linux
nc host port
  • Windows
ncat host port

Then the standard input is then sent to the host, and anything that comes back across the connection is sent to your standard output.

4 - Why not telnet

  • Telnet has the “standard input EOF” problem
  • Telnet will not transfer arbitrary binary data, because certain characters are interpreted as telnet options
  • Telnet also emits some of its diagnostic messages to standard output, where netcat keeps such things separated from its *output*
  • Telnet is incapable of listening for inbound connections, or using UDP instead.

5 - Management

5.1 - Installation

  • install nmap on Windows
  • Linux
apt-get install -y netcat
network/netcat.txt · Last modified: 2019/02/10 12:52 by gerardnico