On Mon, 28 Feb 2005 10:05:32 -0500, Wiggins d'Anconia
<[EMAIL PROTECTED]> wrote:
> Joe Mecklin wrote:
> > ok, per the instructions, binmode only converts CR LF to \n, which is
> > not what i'm looking for.
> >
> 
> Out of curiousity isn't the escape character used for client side
> handling?  In this case why would you need to worry about the escape
> character, as you can drop to a subshell from within Perl, and since
> this is talking directly to a telnet session it doesn't really make
> since to drop to a subshell, as that subshell would be your Perl script???
> 

my apologies, apparently i'm leaving out too many details to be
clearly understood...

net::telnet is building a telnet session (with an escape character of
^])  to a solaris server.

the solaris server requires a login with SECURID, requiring a manual
(unprogrammable) login for every connection.

once connected, i am immediately entered into a menu script which
allows selection of multiple auxiliary systems; each of these systems
is a piece of Cisco hardware which also has auxiliary systems
connected to them.

each Cisco system has a restricted shell with a minimal telnet
command.  this telnet command only allows ip and port for arguments;
it does not allow the user to change its internal escape character,
which is also the default ^].

once i connect to each of these systems for testing and want to drop
connection, using the default ^] drops me all the way back to my local
prompt, requiring another manual connection to the frontend solaris
server.  not being able to maintain connection within the solaris
server negates the usefulness of the script completely.

the fact that ^] is the recognized escape character for every
connection i make in the sequence is why i need to redefine it in my
initial connection, since i am unable to redefine it in my subsequent
connections

.
.
.

> > sub login_system
> > {
> >       my ($prematch, $match) = $t->waitfor(String => "login:", Errmode => 
> > 'return');
> >       print "$prematch $match\n\n";
> >       print "\nchanging \"escape\" character";
> >       print "\n";
> >       $t->put("^]");
> 
> My first guess is that the above is sending '^' and then ']' instead of
> the control charactert that you want. So you should convert the above to
> the hex representation of the character so Perl knows what you are
> really talking about, or use the Ctrl+V Ctrl+] sequence.
> 

i do use Ctrl+V Ctrl+] in my code to enter the control sequence, but
that actual sequence doesn't display properly in the email so i
converted it to an ascii sequence for reading purposes.

this is a modified version of a script that works fine; the
differences are in the destination systems, which are radically
different in responses and connection sequences.  on the working
script i can modify ^] in the downstream telnet connections; as noted
above, on these systems that is not an option.

.
.
.


> > so escaping back to the normal telnet prompt to change the escape
> > character doesn't work.  a normal telnet "escape" character is ^] ...
> > i need to know how to change that from ^] to ^[ (or ^A or whatever)
> > within net::telnet
> >
> > again, tia for any help
> > joe
> >
> 
> Did you turn on the debugging switch?
> 
> http://danconia.org
> 

i did not use debugging; the script works as far as it goes.  i need
the proper external command or net::telnet function/sub call to modify
the default definition of the escape character so that the desired
character (^[ rather than ^]) is passed, and debug will not give me
that information.

thanks for the suggestions, though.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to