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.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.