Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Attempting to open and pass info to MS Telnet

by saintmike (Vicar)
on Aug 08, 2004 at 03:59 UTC ( [id://380991]=note: print w/replies, xml ) Need Help??


in reply to Attempting to open and pass info to MS Telnet

I guess what you're intending is this: first establish the connection and then you'd like telnet to hand over control to you in interactive mode.

The problem with your approach is that while you might be able to establish the session, you won't be able to jump into the open session interactively. At the end of your script, the session just gets dropped.

If you can't find the file controlling telnet's default settings, I'd probably use Expect for this task . Expect lets you call telnet, waits for its prompt, then lets you send the set localecho command, wait for the prompt again and finally take over the session via Expect's interactive command.

There's a Perl module (Expect) for it, but I'm not sure if it works on Windows. You might want to use the original, Tcl-(gack!)-based Expect version.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://380991]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2024-04-20 04:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found