netcat is a program written by hobbit ( used to create raw udp/tcp connections, etc. .. making it a useful network debugging and exploration utility.

regarding tlf's writeup: Weld Pond, a member of the L0pht, simply ported netcat to NT .. he did not (nor did any member of the L0pht for that matter) originally write the program.


  • Outbound or inbound connections, TCP or UDP, to or from any ports
  • Full DNS forward/reverse checking, with appropriate warnings
  • Ability to use any local source port
  • Ability to use any locally-configured network source address
  • Built-in port-scanning capabilities, with randomizer
  • Built-in loose source-routing capability
  • Can read command line arguments from standard input
  • Slow-send mode, one line every N seconds
  • Hex dump of transmitted and received data
  • Optional ability to let another program service established connections
  • Optional telnet-options responder
list of features retrieved from hobbit's website:

One of netcat's simplest uses, and that which I find most useful, is to create quick and dirty pipes over a network. For example:

Transferring files between two computers, preserving everything:
Recieving box: nc -l -p 65189 | tar xvf -
Sending box: tar cvf - files | nc 65189

Capturing from a digital TV tuner on one box, encoding on another, and then sending to a third for storage:
TV box: cat /dev/dtv | nc 48172
Encode box: nc -l -p 48172 | mencoder -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=2000 -tsprog 2 -o outpipe - & cat outpipe | nc 27184
Storage box: nc -l -p 27184 > tv.avi

Showing resident PHB why switches are better than hubs:
Box 1: cat /dev/random | nc 81139
Box 2: nc -l -p 81139 > /dev/null
Box 3: wget http://intranet/index.html

I think you get the idea...

Log in or register to write something here or to contact authors.