http://www.atstake.com/research/tools/index.html

" />
x
Loading
 Loading
Hello, Guest | Login | Register

Network Tricks with netcat

http://www.atstake.com/research/tools/index.html

http://www.dest-unreach.org/socat

The Unix tradition of “everything is a file” and using lots of small, specialized tools in a pipeline works quite well after you wrap your head around the philosophy and practice. The technique of combining utilities together in novel ways has withstood the test of time surprisingly well.

But today is different than the mid-70s –or even the mid-80s. More than ever before, we live in a networked world. And most of the tools in the standard Linux/Unix/Mac OS X toolbox are not network-aware. Sure, at a low level, a network socket acts a lot like a file descriptor for /etc/passwd, but in practice it’s not that easy.

Indeed, it’s hard to build “network pipelines” much of the time. Sometimes, you can get away with ssh and a pipe, such as ssh somehost cat /etc/foo | grep bar, but the ssh command often feels like it’s just getting in the way.

Swiss Army Plumbing

If Perl is the Swiss Army Chainsaw of scripting, then netcat and socat are the Swiss Army Plumbing of the Unix world. Both are incredibly powerful network utilities that try to make it easy to connect processes on various machines.

The Freshmeat project description for netcat says:

netcat is a simple Unix utility that reads and writes data across network connections. It’s a reliable backend tool that can be used directly or easily driven by other programs. It’s also a feature-rich network debugging and exploration tool, and has several…

Please log in to view this content.

Not Yet a Member?

Register with LinuxMagazine.com and get free access to the entire archive, including:

  • Hands-on Content
  • White Papers
  • Community Features
  • And more.
Already a Member?
Log in!
Username

Password

Remember me

Forgotten your password?
Forgotten your username?
Read More
  1. Load Balancing for Application Server Administrators
  2. T6 Broadband uses Linux Routers to Maximize Availability
  3. Linux Helps Telephone Co-op Expand
  4. Aardman Animations' Observer Adventure
  5. Virtualizing Service Provider Networks with Vyatta
Follow Linux Magazine
Rackspace