[rescue] pushing text through a port?

Linc Fessenden linc at thelinuxlink.net
Mon Apr 22 13:03:52 CDT 2002


On Mon, 22 Apr 2002, Carl-Johan Schenstrom wrote:

> On Mon, 22 Apr 2002, Linc Fessenden wrote:
> 
> > I have a stupid question maybe one of you will help me with....
> > I have a program that logs some data into a text file.  I would like to
> > push that text through a port when you telnet to that port - just like the
> > starwars movie you can see at telnet://towel.blinkenlights.nl
> > How the heck do you do that?
> 
> Start cat from inetd?
> 
> telnet  stream  tcp6    nowait  nobody  /usr/bin/cat    cat /etc/motd
> 
> Don't forget to HUP inetd after changing /etc/inetd.conf. I don't think
> Solaris inetd allows port numbers in the leftmost column so you'll have to
> add something to /etc/services (or the appropriate directory service) and
> use that name instead if you wan't to listen to an arbitrary port.
> 
> //cjs

Thanks!  I was missing the second cat command - that did the trick!

-Linc Fessenden

In the Beginning there was nothing, which exploded - Yeah right...



More information about the rescue mailing list