-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
James Sparenberg wrote on Wed, Jan 08, 2003 at 12:13:46AM -0800 :
> OK,,
> Been hit with a challenge... I've got to get cat to send a file out
> of a port... K sounds easy...
It is, but you're killing yourself with your own logic. Two corrections
are all that are needed.
> created new file called catnet....
> # default: on
> service catnet
> {
> type = INTERNAL
# type = INTERNAL
It needs to be commented because this is not a service that is built in
to xinetd.
> socket_type = stream
> wait = no
> user = root
> server = /usr/bin/catnet
> port = 8181
> log_on_failure += USERID
> disable = no
> }
>
>
> then /usr/bin/catnet is
>
> #!/bin/sh
> cat /home/james/testthis.html &>/dev/tcp/127.0.0.1/8181
cat /home/james/testthis.html
> I keep getting a
> Trying 127.0.0.1...
> telnet: Unable to connect to remote host: Connection refused
Because when you connect to port 8181, it runs a program that tries to
write to port 8181, which runs a programs that tries to write to port
8181, that runs a program which tries to write to port 8181, (you get
the picture).
xinetd does the redirecting of the program to port 8181, so get rid of
the redirect and it will start working.
I will admit that I had to play with it a bit before I could figure out
what was happening. 'tail -f /var/log/messages' was most illuminating.
That was how I figured out that the "type=INTERNAL" line was choking
xinetd and making it exclude that service with:
Jan 8 10:23:13 fiji xinetd[30944]: No such internal service: catnet/stream - DISABLING
Blue skies... Todd
- --
...and I will strike down upon thee with great vengeance and furious
anger, those who attempt to poison and destroy my binaries, and you
will know my name is root, when I lay my vengeance upon thee.
Cooker Version mandrake-release-9.1-0.1mdk Kernel 2.4.20-2mdk
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+HHBBlp7v05cW2woRArsLAKCr01okcL+87NILiSlXV8Jcbt2CxACgsmWR
ilVnqyJHOMg5cx9uqKu0z20=
=GOP2
-----END PGP SIGNATURE-----
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.com