Scripts that talk across telnet?
brnstnd at stealth.acf.nyu.edu
brnstnd at stealth.acf.nyu.edu
Sat May 5 21:16:32 AEST 1990
In article <3593 at jato.Jpl.Nasa.Gov> lwall at jpl-devvax.JPL.NASA.GOV (Larry Wall) writes:
> In article <2782 at husc6.harvard.edu> bochner at speed.harvard.EDU (Harry Bochner) writes:
[ telnet wants to talk to a terminal ]
> You don't want to talk to telnet, you want to talk to the telnet socket
> on the other machine. You can just open up a socket in perl and connect
> directly to the other machine.
If you can't get perl to work or if you want security (i.e., knowing the
username on the other side of the connection) you could try my auth
package, which appeared a few days ago in comp.sources.unix.
> : The best scheme I've been able to think of is to write a C pgm that opens
> : a pseudo-terminal, and then starts perl on the master side, and telnet on
> : the slave side. Will this work? Any better ideas?
> You could do that too. Somebody posted the requisite perl routines to
> open a pty not long ago in comp.lang.perl. Someone could dredge those up for
> you if you like.
Or, again if you can't get perl to work or would like some of that
security that's so hard to achieve with BSD ptys, you could wait for my
pty program, to be submitted to comp.sources.unix next week. Then you
just type pty telnet rather than telnet.
> But there's little reason not to talk directly to a foreign socket.
True. But the pty solution gives you control in more general situations.
> The
> telnet daemon on the other end will put a little trash out at the beginning,
> but it's easily ignored.
You shouldn't ignore the trash; you should respond to it as specified in
RFC 854. It's a shame the TELNET protocol didn't make a clean break from
``standard'' ASCII.
---Dan
More information about the Comp.unix.wizards
mailing list