XP is just a number | |
PerlMonks |
Re: Perl as a telnet server?by osama (Scribe) |
on Dec 14, 2002 at 10:14 UTC ( [id://219851]=note: print w/replies, xml ) | Need Help?? |
why not use inetd or xinetd? they handle the sockets, sessions, concurrent connections, and host security parts pretty well...
They would listen to a specified port (23 or any other port, you could telnet hostname XXX to connect to port XXX) and run your script redirecting stdin/stdout to that connection..
Your script can be as simple as you want,dumb example:
How to use xinetd on linux/unix: remeber to disable output buffering $|=1 Simple: create a file /etc/xinetd.d/yourscriptname with
also add to your /etc/services:
There are inetd ports to windows...
In Section
Seekers of Perl Wisdom
|
|