Sometimes you want to see what data you get through a TCP or UDP connection.
For example, you want to know how a HTTP Request look like.
It's very easy with netcat Show archive.org snapshot .
Example to listen on port 80 and the output gets to stdout.
sudo nc -kl 80
It's also possible write it into a file:
sudo nc -kl 80 > output.txt
If you use Ports higher than 1000 you don't need to be root (sudo).
Posted by Kim Klotz to makandra dev (2012-12-05 16:57)