Read more

Analyse TCP/UDP traffic with netcat

Kim Klotz
December 05, 2012Software engineer at makandra GmbH

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.

Illustration web development

Do you need DevOps-experts?

Your development team has a full backlog? No time for infrastructure architecture? Our DevOps team is ready to support you!

  • We build reliable cloud solutions with Infrastructure as code
  • We are experts in security, Linux and databases
  • We support your dev team to perform
Read more Show archive.org snapshot

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 17:57)