Analyse TCP/UDP traffic with netcat

Updated . Posted . Visible to the public.

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).

Last edit
License
Source code in this card is licensed under the MIT License.
Posted by Kim Klotz to makandra dev (2012-12-05 16:57)