netcat (nc) is a tool for sending/receiving raw data over the network (TCP/UDP).
TCP/IP: IP routes packets (where to send); TCP gives a reliable, ordered byte stream.
❯ nc example.com 80 -w 10000
GET / HTTP/1.1
Host: example.com
Opens a TCP connection to port 80 (HTTP). Perform DNS lookup/ resolution automatically.
- Use
nslookup or ping example.com to get the IP address.