Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Perl / Modules / August 2003



Tip: Looking for answers? Try searching our database.

send "Ctrl ]" to the remote system

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
SebMuller - 26 Aug 2003 16:00 GMT
Hi,

I am using the telnet module (Telnet.pm) in order to automate some
unix-sessions.
It works so far great, but during the telnet session I would like to
send the escape character ("Ctrl ]") to the remote system.
How shall I encode "Ctrl ]"?

Thanks, Sebastian
Brian McCauley - 26 Aug 2003 17:39 GMT
> I am using the telnet module (Telnet.pm) in order to automate some
> unix-sessions.
> It works so far great, but during the telnet session I would like to
> send the escape character ("Ctrl ]") to the remote system.
> How shall I encode "Ctrl ]"?

There is no need to encode it in any special way.

I suspect you are confused.  The Ctrl-] character is not special in
the telnet connection.  

The Ctrl-] character is special in the stream between a controlling
terminal and the Unix telent program.  But you are not using the Unix
telnet program.

Signature

    \\   ( )
 .  _\\__[oo
.__/  \\ /\@
.  l___\\
 # ll  l\\
###LL  LL\\

SebMuller - 27 Aug 2003 07:45 GMT
> > I am using the telnet module (Telnet.pm) in order to automate some
> > unix-sessions.
[quoted text clipped - 10 lines]
> terminal and the Unix telent program.  But you are not using the Unix
> telnet program.

You are absolutely right. Actually the question is: What has to be
send to make the remote system (Unix) execute the command Ctrl-A or
Ctrl-C etc.
Because $t->cmd("Ctrl-A") won't do it (see below).
Perhaps ASCII code?
----------------------------------------------------------------
use Net::Telnet();
$t = new Net::Telnet (-timeout => 10, -prompt => '/$prompt $/');
...
@lines = $t->cmd("Ctrl-A");
----------------------------------------------------------------
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.