using nc to simulate a service

Top Pagina
Bijlagen:
Bericht als e-mail
+ (text/plain)
Delete this message
Reply to this message
Auteur: Jeremy C. Reed
Datum:  
Onderwerp: using nc to simulate a service
On Tue, 12 Aug 2003, Mike Starke wrote:

> What I want to do is execute a program on the server at my ISP which
> passes the phone number-document number to a perl script on my home PC.
> My home PC runs Hylafax. I had not thought this whole process
> completely thru.
>
> Couldn't I execute something like this on my ISP:
>
> nc myhomePC:port_number < parameters


That should be fine (but the version of netcat I have uses a space instead
of a colon before the port).

You could also use the telnet client. I often do something like:

(echo "QUIT" ; sleep 3) | telnet host 110

You could easily write a shell script ran by inetd to save the data.

Jeremy C. Reed
http://www.reedmedia.net/