CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Problem with Aruba device using plink through IPC::Run

 



diesel_den
Novice

Jun 7, 2009, 4:47 AM

Post #1 of 19 (3666 views)
Problem with Aruba device using plink through IPC::Run Can't Post

I have Aruba network device with ArubaOS.

I am using IPC::Run to use plink to work with my device.

plink is executed with following parameters:

Code
-v -a -x -l <username> -pw <password> -P 22 <ip_of_device>


Next commands should be executed after login:

Code
enable 
<password for enable>
configure term
enable
<new password for enable>
<re-type password for enable>
exit # exit from configuration mode
exit # exit from enable mode


If I am executing plink with these parameters manually then all works perfectly.
When I am executing plink with these parameters through IPC::Run, only next command are executed:

Code
enable 
<password for enable>
configure term
enable

Problem is that after typing <new password for enable> I am receiving response "*******" instead of "****** Re-type password:", so my "\n" is not parsed as end of line.
But for all previous commands "\n" is parsed correctly.

I have added additional commands and result is the same:

Code
enable 
<password for enable>
exit # exit from enable mode
enable
<password for enable>
exit # exit from enable mode
enable
<password for enable>
exit # exit from enable mode
enable
<password for enable>
configure term
enable
<new password for enable> # hung :(



FishMonger
Veteran / Moderator

Jun 7, 2009, 5:00 AM

Post #2 of 19 (3659 views)
Re: [diesel_den] Problem with Aruba device using plink through IPC::Run [In reply to] Can't Post

Sounds like you should be using Expect.

http://search.cpan.org/~rgiersig/Expect-1.21/Expect.pod


diesel_den
Novice

Jun 7, 2009, 5:27 AM

Post #3 of 19 (3657 views)
Re: [FishMonger] Problem with Aruba device using plink through IPC::Run [In reply to] Can't Post

Thank you, but I should only fix bug. I should not change architecture of existing big project :(


(This post was edited by diesel_den on Jun 7, 2009, 5:45 AM)


FishMonger
Veteran / Moderator

Jun 7, 2009, 7:24 AM

Post #4 of 19 (3647 views)
Re: [diesel_den] Problem with Aruba device using plink through IPC::Run [In reply to] Can't Post

Can you post your code?


diesel_den
Novice

Jun 7, 2009, 8:53 AM

Post #5 of 19 (3643 views)
Re: [FishMonger] Problem with Aruba device using plink through IPC::Run [In reply to] Can't Post

I have created an example that works in the same way and have the same problem even using telnet.


Code
use IPC::Run qw( start pump finish timeout ); 

my $username = '<username, 7 characters>';
my $password = '<password, 6 characters>';
my $epassword = '<enable_password, 6 characters>';

my $vars = {};
$vars->{handle} = undef;
$vars->{in} = undef;
$vars->{out} = undef;
$vars->{err} = undef;

my @cmd = ();
push( @cmd, 'plink' );
push( @cmd, '-v', '-a', '-x' ); # Verbose output, disable agent forwarding, and disable X11 forwarding
push( @cmd, '-telnet' );
push( @cmd, '-l', $username );
#push( @cmd, ( '-pw', $password ) ) if $password;
#push( @cmd, '-' . $this->{version} ) if $this->{version} =~ /^[12]$/;
#push( @cmd, '-C' ) if $this->{compression};
#push( @cmd, ( '-P', $this->{port} ) );
push( @cmd, '<ip_of_device>' );

print "Connecting to the device...\n";
$vars->{handle} = start \@cmd, \$vars->{in}, \$vars->{out}, \$vars->{err}, timeout(100);
print "Connected\n";

my_wait_for('User:\s', $vars);
my_send($username, $vars);

my_wait_for('Password:\s', $vars);
my_send($password, $vars);

my_wait_for('\(Aruba\)\s>', $vars);
my_send('enable', $vars);

my_wait_for(':', $vars);
my_send($epassword, $vars);

my_wait_for('\(Aruba\)\s#', $vars);
my_send('config term', $vars);

my_wait_for('\(Aruba\)\s\(config\)\s#', $vars);
my_send('enable', $vars);

my_wait_for('Password:', $vars);
my_send($epassword, $vars);

my_wait_for('password:', $vars);
my_send($epassword, $vars);

my_wait_for('#', $vars);
my_send('exit', $vars);

my_wait_for('#', $vars);

sub my_wait_for
{
my $regex = shift;
my $vars = shift;

print "\n>>my_wait_for: $regex\n";
until ( $vars->{out} =~ /$regex$/ )
{
$vars->{handle}->pump();
print "\n out: $vars->{out}\n";
}
}

sub my_send
{
my $input = shift;
my $vars = shift;

print "\n>>my_send: $input\n";
$vars->{in} .= $input . "\n";
while ( $this->{in} )
{
print "\n in: $in";
$vars->{handle}->pump();
print "\n out: $vars->{out}\n";
}
}


Output of the program:

Code
Connecting to the device... 
Connected

>>my_wait_for: User:\s

out:

out:

out:
(Aruba)
User:

>>my_send: xxxxxxx

>>my_wait_for: Password:\s

out:
(Aruba)
User:

out:
(Aruba)
User: x

out:
(Aruba)
User: xxxxxxx
Password:

>>my_send: yyyyyy

>>my_wait_for: \(Aruba\)\s>

out:
(Aruba)
User: xxxxxxx
Password:

out:
(Aruba)
User: xxxxxxx
Password: ******
(Aruba) >

>>my_send: enable

>>my_wait_for: :

out:
(Aruba)
User: xxxxxxx
Password: ******
(Aruba) >e

out:
(Aruba)
User: xxxxxxx
Password: ******
(Aruba) >enable
Password:

>>my_send: zzzzzz

>>my_wait_for: \(Aruba\)\s#

out:
(Aruba)
User: xxxxxxx
Password: ******
(Aruba) >enable
Password:*

out:
(Aruba)
User: xxxxxxx
Password: ******
(Aruba) >enable
Password:******
(Aruba) #

>>my_send: config term

>>my_wait_for: \(Aruba\)\s\(config\)\s#

out:
(Aruba)
User: xxxxxxx
Password: ******
(Aruba) >enable
Password:******
(Aruba) #c

out:
(Aruba)
User: xxxxxxx
Password: ******
(Aruba) >enable
Password:******
(Aruba) #configure term
Enter Configuration commands, one per line. End with CNTL/Z

(Aruba) (config) #

>>my_send: enable

>>my_wait_for: Password:

out:
(Aruba)
User: xxxxxxx
Password: ******
(Aruba) >enable
Password:******
(Aruba) #configure term
Enter Configuration commands, one per line. End with CNTL/Z

(Aruba) (config) #e

out:
(Aruba)
User: xxxxxxx
Password: ******
(Aruba) >enable
Password:******
(Aruba) #configure term
Enter Configuration commands, one per line. End with CNTL/Z

(Aruba) (config) #enable
Password:

>>my_send: zzzzzz

>>my_wait_for: password:

out:
(Aruba)
User: xxxxxxx
Password: ******
(Aruba) >enable
Password:******
(Aruba) #configure term
Enter Configuration commands, one per line. End with CNTL/Z

(Aruba) (config) #enable
Password:*

out:
(Aruba)
User: xxxxxxx
Password: ******
(Aruba) >enable
Password:******
(Aruba) #configure term
Enter Configuration commands, one per line. End with CNTL/Z

(Aruba) (config) #enable
Password:*******


As you see, we have response "*******" instead of "****** Re-Type password:".


(This post was edited by diesel_den on Jun 7, 2009, 11:59 AM)


diesel_den
Novice

Jun 7, 2009, 8:58 AM

Post #6 of 19 (3642 views)
Re: [diesel_den] Problem with Aruba device using plink through IPC::Run [In reply to] Can't Post

So using both telnet and ssh protocols problem occurs, but if call plink manually then problem does not occur on both protocols.
So it is not a problem of protocol.


FishMonger
Veteran / Moderator

Jun 7, 2009, 10:07 AM

Post #7 of 19 (3636 views)
Re: [diesel_den] Problem with Aruba device using plink through IPC::Run [In reply to] Can't Post

Your output doesn't match the script.

Are you sure that this output was from this version of the script and not from a prior version?

I'd start by enabling debug to see exactly what is being sent/received.
(copied from IPC::Run documentation)

Code
Debugging Tip 

You may use the environment variable IPCRUNDEBUG to see what's going on under the hood:

$ IPCRUNDEBUG=basic myscript # prints minimal debugging
$ IPCRUNDEBUG=data myscript # prints all data reads/writes
$ IPCRUNDEBUG=details myscript # prints lots of low-level details
$ IPCRUNDEBUG=gory myscript # (Win32 only) prints data moving through
# the helper processes.



diesel_den
Novice

Jun 7, 2009, 11:26 AM

Post #8 of 19 (3630 views)
Re: [FishMonger] Problem with Aruba device using plink through IPC::Run [In reply to] Can't Post

> Are you sure that this output was from this version of the script > and not from a prior version?
>
Yes, I am very sure.
What is wrong?


diesel_den
Novice

Jun 7, 2009, 11:34 AM

Post #9 of 19 (3629 views)
Re: [FishMonger] Problem with Aruba device using plink through IPC::Run [In reply to] Can't Post

Here is output of the same script, but using SSH
(so login and password were provided as parameters of plink).


Code
I:\adapter_log>set IPCRUNDEBUG=gory 

I:\adapter_log>perl test.pl
Connecting to the device...
IPC::Run 0001 012--------- [(2968)]: timer #1 interval set to 100
IPC::Run 0001 012--------- [(2968)]: timer #1 constructed
IPC::Run 0001 012--------- [(2968)]: timer #1 exception set to IPC::Run: timeout on timer #1
IPC::Run 0001 0123-------- [#1(2968)]: debugging fd is 3
IPC::Run 0001 0123-------- [#1(2968)]: ****** harnessing *****
IPC::Run 0001 0123-------- [#1(2968)]: parsing [ 'plink', '-v', '-a', '-x', '-l', 'xxxxxxx', '-pw', 'yyyyyy', '10.100.26
.3' ]
IPC::Run 0001 0123-------- [#1(2968)]: parsing SCALAR
IPC::Run 0001 0123-------- [#1(2968)]: assuming '0<'
IPC::Run 0001 0123-------- [#1(2968)]: parsing SCALAR
IPC::Run 0001 0123-------- [#1(2968)]: assuming '1>'
IPC::Run 0001 0123-------- [#1(2968)]: parsing SCALAR
IPC::Run 0001 0123-------- [#1(2968)]: assuming '2>'
IPC::Run 0001 0123-------- [#1(2968)]: parsing IPC::Run::Timer
IPC::Run 0001 0123-------- [#1(2968)]: ** starting
IPC::Run 0001 0123-------- [#1(2968)]: timer #1 state set to 1
IPC::Run 0001 0123-------- [#1(2968)]: timer #1 start_time set to 1244399400
IPC::Run 0001 0123-------- [#1(2968)]: timer #1 end_time set to 1244399501
IPC::Run 0001 0123-------- [#1(2968)]: timer #1 started at 1244399400, with interval 100, end_time 1244399501
IPC::Run 0001 0123-------- [#1(2968)]: 'plink' added to cache: 'C:\Perl\bin\plink.EXE'
IPC::Run 0001 0123-------- [#1(2968)]: kid 1 to read 0 from SCALAR
IPC::Run 0001 01234------- [#1(2968)]: win32 port = 2048
IPC::Run 0001 012345------ [#1(2968)]: accept()ing on port 2048
IPC::Run 0001 0123456----- [#1(2968)]: win32 _socket = ( 6, 5 ) on port 2048
IPC::Run 0001 0123-56----- [#1(2968)]: PUMP_SOCKET_HANDLE = 5
IPC::Run 0001 01234567---- [#1(2968)]: CHILD_HANDLE = 4
IPC::Run 0001 01234567---- [#1(2968)]: PUMP_PIPE_HANDLE = 7
IPC::Run 0001 01234567---- [#1(2968)]: disabling inheritance of 6
IPC::Run 0001 01234567---- [#1(2968)]: disabling inheritance of 5
IPC::Run 0001 01234567---- [#1(2968)]: disabling inheritance of 7
IPC::Run 0001 01234567---- [#1(2968)]: disabling inheritance of 4
IPC::Run 0001 01234567---- [#1(2968)]: pumper stdin = 5
IPC::Run 0001 01234567---- [#1(2968)]: pumper stdout = 7
IPC::Run 0001 01234567---- [#1(2968)]: enabling inheritance of 5
IPC::Run 0001 01234567---- [#1(2968)]: enabling inheritance of 7
IPC::Run 0001 01234567---- [#1(2968)]: enabling inheritance of 3
IPC::Run 0001 01234567---- [#1(2968)]: pump cmd line: "C:\Perl\bin\perl.exe" "-II:\_AP\SVN\NA\HeadCore\Resources\Integra
tions\PerlAPI" "-IC:/Perl/site/lib" "-IC:/Perl/lib" "-I." -MIPC::Run::Win32Pump -e 1 1888 1976 15 0 2968 1244399399 4 "4<pump<6"
IPC::Run 0001 01234-6----- [#1(2968)]: _spawn_pumper pid = 2952
IPC::Run 0001 01234-6----- [#1(2968)]: win32_fake_pipe = ( 6, 4 )
IPC::Run 0001 01234-6----- [#1(2968)]: kid 1 to write 1 to SCALAR
IPC::Run 0001 0123456----- [#1(2968)]: win32 port = 2049
IPC::Run 0001 01234567---- [#1(2968)]: accept()ing on port 2049
IPC::Run 0001 012345678--- [#1(2968)]: win32 _socket = ( 8, 7 ) on port 2049
IPC::Run 0001 01234-678--- [#1(2968)]: PUMP_SOCKET_HANDLE = 7
IPC::Run 0001 0123456789-- [#1(2968)]: CHILD_HANDLE = 9
IPC::Run 0001 0123456789-- [#1(2968)]: PUMP_PIPE_HANDLE = 5
IPC::Run 0001 0123456789-- [#1(2968)]: disabling inheritance of 8
IPC::Run 0001 0123456789-- [#1(2968)]: disabling inheritance of 7
IPC::Run 0001 0123456789-- [#1(2968)]: disabling inheritance of 5
IPC::Run 0001 0123456789-- [#1(2968)]: disabling inheritance of 9
IPC::Run 0001 0123456789-- [#1(2968)]: pumper stdin = 5
IPC::Run 0001 0123456789-- [#1(2968)]: pumper stdout = 7
IPC::Run 0001 0123456789-- [#1(2968)]: enabling inheritance of 5
IPC::Run 0001 0123456789-- [#1(2968)]: enabling inheritance of 7
IPC::Run 0001 0123456789-- [#1(2968)]: enabling inheritance of 3
IPC::Run 0001 0123456789-- [#1(2968)]: pump cmd line: "C:\Perl\bin\perl.exe" "-II:\_AP\SVN\NA\HeadCore\Resources\Integra
tions\PerlAPI" "-IC:/Perl/site/lib" "-IC:/Perl/lib" "-I." -MIPC::Run::Win32Pump -e 1 1844 1976 15 0 2968 1244399399 4 "9>pump>8"
IPC::Run 0001 01234-6-89-- [#1(2968)]: _spawn_pumper pid = 2544
IPC::Run 0001 01234-6-89-- [#1(2968)]: win32_fake_pipe = ( 8, 9 )
IPC::Run 0001 01234-6-89-- [#1(2968)]: kid 1 to write 2 to SCALAR
IPC::Run 0001 0123456-89-- [#1(2968)]: win32 port = 2050
IPC::Run 0001 0123456789-- [#1(2968)]: accept()ing on port 2050
IPC::Run 0001 01234567890- [#1(2968)]: win32 _socket = ( 10, 7 ) on port 2050
IPC::Run 0001 01234-67890- [#1(2968)]: PUMP_SOCKET_HANDLE = 7
IPC::Run 0001 012345678901 [#1(2968)]: CHILD_HANDLE = 11
IPC::Run 0001 012345678901 [#1(2968)]: PUMP_PIPE_HANDLE = 5
IPC::Run 0001 012345678901 [#1(2968)]: disabling inheritance of 10
IPC::Run 0001 012345678901 [#1(2968)]: disabling inheritance of 7
IPC::Run 0001 012345678901 [#1(2968)]: disabling inheritance of 5
IPC::Run 0001 012345678901 [#1(2968)]: disabling inheritance of 11
IPC::Run 0001 012345678901 [#1(2968)]: pumper stdin = 5
IPC::Run 0001 012345678901 [#1(2968)]: pumper stdout = 7
IPC::Run 0001 012345678901 [#1(2968)]: enabling inheritance of 5
IPC::Run 0001 012345678901 [#1(2968)]: enabling inheritance of 7
IPC::Run 0001 012345678901 [#1(2968)]: enabling inheritance of 3
IPC::Run 0001 012345678901 [#1(2968)]: pump cmd line: "C:\Perl\bin\perl.exe" "-II:\_AP\SVN\NA\HeadCore\Resources\Integra
tions\PerlAPI" "-IC:/Perl/site/lib" "-IC:/Perl/lib" "-I." -MIPC::Run::Win32Pump -e 1 1832 1976 15 0 2968 1244399399 4 "11>pump>10"
IPC::Run 0001 01234-6-8901 [#1(2968)]: _spawn_pumper pid = 880
IPC::Run 0001 01234-6-8901 [#1(2968)]: win32_fake_pipe = ( 10, 11 )
IPC::Run 0001 01234-6-8901 [#1(2968)]: kid 1[]'s 0 is my 6
IPC::Run 0001 01234-6-8901 [#1(2968)]: kid 1[]'s 1 is my 8
IPC::Run 0001 01234-6-8901 [#1(2968)]: kid 1[]'s 2 is my 10
IPC::Run 0001 01234-6-8901 [#1(2968)]: child: `plink -v -a -x -l xxxxxxx -pw yyyyyy 10.100.26.3`
IPC::Run 0001 01234-6-8901 [#1(2968)]: spawning 'C:\Perl\bin\plink.EXE' '-v' '-a' '-x' '-l' 'xxxxxxx' '-pw' 'yyyyyy' 'xx.xxx.xx.x'
IPC::Run 0001 01234-6-8901 [#1(2968)]: disabling inheritance of 3
IPC::Run 0001 01234-6-8901 [#1(2968)]: disabling inheritance of 6
IPC::Run 0001 0123456-8901 [#1(2968)]: dup( 0 ) = 5
IPC::Run 0001 0123456-8901 [#1(2968)]: disabling inheritance of 5
IPC::Run 0001 0123456-8901 [#1(2968)]: disabling inheritance of 5
IPC::Run 0001 0123456-8901 [#1(2968)]: moving 4 to kid's 0
IPC::Run 0001 0123456-8901 [#1(2968)]: dup2( 4, 0 ) = 0
IPC::Run 0001 0123456-8901 [#1(2968)]: disabling inheritance of 4
IPC::Run 0001 0123456-8901 [#1(2968)]: disabling inheritance of 8
IPC::Run 0001 012345678901 [#1(2968)]: dup( 1 ) = 7
IPC::Run 0001 012345678901 [#1(2968)]: disabling inheritance of 7
IPC::Run 0001 012345678901 [#1(2968)]: disabling inheritance of 7
IPC::Run 0001 012345678901 [#1(2968)]: moving 9 to kid's 1
IPC::Run 0001 012345678901 [#1(2968)]: dup2( 9, 1 ) = 0
IPC::Run 0001 012345678901 [#1(2968)]: disabling inheritance of 9
IPC::Run 0001 012345678901 [#1(2968)]: disabling inheritance of 10
IPC::Run 0001 0123456789012 [#1(2968)]: dup( 2 ) = 12
IPC::Run 0001 0123456789012 [#1(2968)]: disabling inheritance of 12
IPC::Run 0001 0123456789012 [#1(2968)]: disabling inheritance of 12
IPC::Run 0001 0123456789012 [#1(2968)]: moving 11 to kid's 2
IPC::Run 0001 0123456789012 [#1(2968)]: dup2( 11, 2 ) = 0
IPC::Run 0001 0123456789012 [#1(2968)]: disabling inheritance of 11
IPC::Run 0001 0123456789012 [#1(2968)]: cmd line: C:\Perl\bin\plink.EXE -v -a -x -l xxxxxxx -pw yyyyyy 10.100.26.3
IPC::Run 0001 0123456789012 [#1(2968)]: dup2( 7, 1 ) = 0
IPC::Run 0001 0123456-89012 [#1(2968)]: close( 7 ) = 0
IPC::Run 0001 0123-------- [#(2952) 4<pump<6]: Entered
IPC::Run 0001 0123456-89012 [#1(2968)]: dup2( 5, 0 ) = 0
IPC::Run 0001 01234-6-89012 [#1(2968)]: close( 5 ) = 0
IPC::Run 0001 01234-6-89012 [#1(2968)]: dup2( 12, 2 ) = 0
IPC::Run 0001 01234-6-8901 [#1(2968)]: close( 12 ) = 0
IPC::Run 0001 01234-6-8901 [#1(2968)]: spawn() = 1576
IPC::Run 0001 0123--6-8901 [#1(2968)]: close( 4 ) = 0
IPC::Run 0001 0123--6-8-01 [#1(2968)]: close( 9 ) = 0
IPC::Run 0001 0123--6-8-0- [#1(2968)]: close( 11 ) = 0
Connected

>>my_wait_for: \(Aruba\)\s>
IPC::Run 0001 0123--6-8-0- [#1(2968)]: ** pumping
IPC::Run 0001 0123--6-8-0- [#1(2968)]: checking timer #1 (end time 1244399501) at 1244399400
IPC::Run 0001 0123--6-8-0- [#1(2968)]: fds for select: ------w-r-r-
IPC::Run 0001 0123--6-8-0- [#1(2968)]: timeout=101
IPC::Run 0001 0123--6-8-0- [#1(2968)]: selected ------w-----
IPC::Run 0001 0123--6-8-0- [#1(2968)]: filtering data to fd 6 (kid's stdin)
IPC::Run 0001 0123-------- [#(2544) 9>pump>8]: Entered
IPC::Run 0001 0123--6-8-0- [#1(2968)]: pausing fd 6 (kid's stdin)
IPC::Run 0001 0123--6-8-0- [#1(2968)]: checking timer #1 (end time 1244399501) at 1244399400
IPC::Run 0001 0123--6-8-0- [#1(2968)]: checking for more input fd 6 (kid's stdin)
IPC::Run 0001 0123-------- [#(880) 11>pump>10]: Entered
IPC::Run 0001 0123--6-8-0- [#1(2968)]: fds for select: ------p-r-r-
IPC::Run 0001 0123-------- [#(880) 11>pump>10]: 66 chars revc: 'Looking up host "10.100.26.3"\r\nConnecting to 10.100
.26.3 port 22\r\n'
IPC::Run 0001 0123--6-8-0- [#1(2968)]: timeout=101
IPC::Run 0001 0123-------- [#(880) 11>pump>10]: 66 chars sent: 'Looking up host "10.100.26.3"\nConnecting to 10.100.2
6.3 port 22\n'
IPC::Run 0001 0123--6-8-0- [#1(2968)]: selected ----------r-
IPC::Run 0001 0123--6-8-0- [#1(2968)]: filtering data from fd 10 (kid's stderr)
IPC::Run 0001 0123--6-8-0- [#1(2968)]: reading from fd 10 (kid's stderr)
IPC::Run 0001 0123--6-8-0- [#1(2968)]: read( 10 ) = 64 chars 'Looking up host "10.100.26.3"
IPC::Run 0001 0123--6-8-0- [#1(2968)]: Connecting to 10.100.26.3 port 22
IPC::Run 0001 0123--6-8-0- [#1(2968)]: '
IPC::Run 0001 0123--6-8-0- [#1(2968)]: exiting _select(): io occured and break_on_io set

out:
IPC::Run 0001 0123--6-8-0- [#1(2968)]: ** pumping
IPC::Run 0001 0123--6-8-0- [#1(2968)]: checking timer #1 (end time 1244399501) at 1244399400
IPC::Run 0001 0123--6-8-0- [#1(2968)]: checking for more input fd 6 (kid's stdin)
IPC::Run 0001 0123--6-8-0- [#1(2968)]: fds for select: ------p-r-r-
IPC::Run 0001 0123--6-8-0- [#1(2968)]: timeout=101
IPC::Run 0001 0123-------- [#(880) 11>pump>10]: 39 chars revc: 'Server version: SSH-2.0-OpenSSH_3.7.1\r\n'
IPC::Run 0001 0123-------- [#(880) 11>pump>10]: 39 chars sent: 'Server version: SSH-2.0-OpenSSH_3.7.1\n'
IPC::Run 0001 0123-------- [#(880) 11>pump>10]: 76 chars revc: 'We claim version: SSH-2.0-PuTTY_Release_0.60\r\nUsing
SSH protocol version 2\r\n'
IPC::Run 0001 0123-------- [#(880) 11>pump>10]: 76 chars sent: 'We claim version: SSH-2.0-PuTTY_Release_0.60\nUsing S
SH protocol version 2\n'
IPC::Run 0001 0123--6-8-0- [#1(2968)]: selected ----------r-
IPC::Run 0001 0123--6-8-0- [#1(2968)]: filtering data from fd 10 (kid's stderr)
IPC::Run 0001 0123--6-8-0- [#1(2968)]: reading from fd 10 (kid's stderr)
IPC::Run 0001 0123--6-8-0- [#1(2968)]: read( 10 ) = 112 chars 'Server version: SSH-2.0-OpenSSH_3.7.1
IPC::Run 0001 0123--6-8-0- [#1(2968)]: We claim version: SSH-2.0-PuTTY_Release_0.60
IPC::Run 0001 0123--6-8-0- [#1(2968)]: Using SSH protocol version 2
IPC::Run 0001 0123--6-8-0- [#1(2968)]: '
IPC::Run 0001 0123--6-8-0- [#1(2968)]: exiting _select(): io occured and break_on_io set

out:
IPC::Run 0001 0123--6-8-0- [#1(2968)]: ** pumping
IPC::Run 0001 0123--6-8-0- [#1(2968)]: checking timer #1 (end time 1244399501) at 1244399400
IPC::Run 0001 0123--6-8-0- [#1(2968)]: checking for more input fd 6 (kid's stdin)
IPC::Run 0001 0123--6-8-0- [#1(2968)]: fds for select: ------p-r-r-
IPC::Run 0001 0123--6-8-0- [#1(2968)]: timeout=101
IPC::Run 0001 0123-------- [#(880) 11>pump>10]: 37 chars revc: 'Doing Diffie-Hellman group exchange\r\n'
IPC::Run 0001 0123-------- [#(880) 11>pump>10]: 37 chars sent: 'Doing Diffie-Hellman group exchange\n'
IPC::Run 0001 0123--6-8-0- [#1(2968)]: selected ----------r-
IPC::Run 0001 0123--6-8-0- [#1(2968)]: filtering data from fd 10 (kid's stderr)
IPC::Run 0001 0123--6-8-0- [#1(2968)]: reading from fd 10 (kid's stderr)
IPC::Run 0001 0123--6-8-0- [#1(2968)]: read( 10 ) = 36 chars 'Doing Diffie-Hellman group exchange
IPC::Run 0001 0123--6-8-0- [#1(2968)]: '
IPC::Run 0001 0123--6-8-0- [#1(2968)]: exiting _select(): io occured and break_on_io set

out:
IPC::Run 0001 0123--6-8-0- [#1(2968)]: ** pumping
IPC::Run 0001 0123--6-8-0- [#1(2968)]: checking timer #1 (end time 1244399501) at 1244399400
IPC::Run 0001 0123--6-8-0- [#1(2968)]: checking for more input fd 6 (kid's stdin)
IPC::Run 0001 0123--6-8-0- [#1(2968)]: fds for select: ------p-r-r-
IPC::Run 0001 0123--6-8-0- [#1(2968)]: timeout=101
IPC::Run 0002 0123-------- [#(880) 11>pump>10]: 51 chars revc: 'Doing Diffie-Hellman key exchange with hash SHA-1\r\n
'
IPC::Run 0002 0123-------- [#(880) 11>pump>10]: 51 chars sent: 'Doing Diffie-Hellman key exchange with hash SHA-1\n'
IPC::Run 0002 0123--6-8-0- [#1(2968)]: selected ----------r-
IPC::Run 0002 0123--6-8-0- [#1(2968)]: filtering data from fd 10 (kid's stderr)
IPC::Run 0002 0123--6-8-0- [#1(2968)]: reading from fd 10 (kid's stderr)
IPC::Run 0002 0123--6-8-0- [#1(2968)]: read( 10 ) = 50 chars 'Doing Diffie-Hellman key exchange with hash SHA-1
IPC::Run 0002 0123--6-8-0- [#1(2968)]: '
IPC::Run 0002 0123--6-8-0- [#1(2968)]: exiting _select(): io occured and break_on_io set

out:
IPC::Run 0002 0123--6-8-0- [#1(2968)]: ** pumping
IPC::Run 0002 0123--6-8-0- [#1(2968)]: checking timer #1 (end time 1244399501) at 1244399401
IPC::Run 0002 0123--6-8-0- [#1(2968)]: checking for more input fd 6 (kid's stdin)
IPC::Run 0002 0123--6-8-0- [#1(2968)]: fds for select: ------p-r-r-
IPC::Run 0002 0123--6-8-0- [#1(2968)]: timeout=100
IPC::Run 0002 0123-------- [#(880) 11>pump>10]: 26 chars revc: 'Host key fingerprint is:\r\n'
IPC::Run 0002 0123-------- [#(880) 11>pump>10]: 26 chars sent: 'Host key fingerprint is:\n'
IPC::Run 0002 0123-------- [#(880) 11>pump>10]: 268 chars revc: 'ssh-rsa 1024 30:93:a9:c9:6b:11:70:01:08:9a:04:b4:25:6
9:89:b7\r\nInitialised AES-256 CBC client->serve...'
IPC::Run 0002 0123-------- [#(880) 11>pump>10]: 268 chars sent: 'ssh-rsa 1024 30:93:a9:c9:6b:11:70:01:08:9a:04:b4:25:6
9:89:b7\nInitialised AES-256 CBC client->server...'
IPC::Run 0002 0123--6-8-0- [#1(2968)]: selected ----------r-
IPC::Run 0002 0123--6-8-0- [#1(2968)]: filtering data from fd 10 (kid's stderr)
IPC::Run 0002 0123--6-8-0- [#1(2968)]: reading from fd 10 (kid's stderr)
IPC::Run 0002 0123--6-8-0- [#1(2968)]: read( 10 ) = 288 chars 'Host key fingerprint is:
IPC::Run 0002 0123--6-8-0- [#1(2968)]: ssh-rsa 1024 30:93:a9:c9:6b:11:70:01:08:9a:04:b4:25:69:89:b7
IPC::Run 0002 0123--6-8-0- [#1(2968)]: Initialised AES-256 CBC client->server encryption
IPC::Run 0002 0123--6-8-0- [#1(2968)]: Initialised HMAC-SHA1 client->server MAC algorithm
IPC::Run 0002 0123--6-8-0- [#1(2968)]: Initialised AES-256 CBC server->client encryption
IPC::Run 0002 0123--6-8-0- [#1(2968)]: Initialised HMAC-SHA1 server->client MAC algorithm
IPC::Run 0002 0123--6-8-0- [#1(2968)]: '
IPC::Run 0002 0123--6-8-0- [#1(2968)]: exiting _select(): io occured and break_on_io set

out:
IPC::Run 0002 0123--6-8-0- [#1(2968)]: ** pumping
IPC::Run 0002 0123--6-8-0- [#1(2968)]: checking timer #1 (end time 1244399501) at 1244399401
IPC::Run 0002 0123--6-8-0- [#1(2968)]: checking for more input fd 6 (kid's stdin)
IPC::Run 0002 0123--6-8-0- [#1(2968)]: fds for select: ------p-r-r-
IPC::Run 0002 0123--6-8-0- [#1(2968)]: timeout=100
IPC::Run 0003 0123-------- [#(880) 11>pump>10]: 72 chars revc: 'Using username "xxxxxxx".\r\nKeyboard-interactive aut
hentication refused\r\n'
IPC::Run 0003 0123-------- [#(880) 11>pump>10]: 72 chars sent: 'Using username "xxxxxxx".\nKeyboard-interactive authe
ntication refused\n'
IPC::Run 0003 0123-------- [#(880) 11>pump>10]: 15 chars revc: 'Sent password\r\n'
IPC::Run 0003 0123-------- [#(880) 11>pump>10]: 15 chars sent: 'Sent password\n'
IPC::Run 0003 0123--6-8-0- [#1(2968)]: selected ----------r-
IPC::Run 0003 0123--6-8-0- [#1(2968)]: filtering data from fd 10 (kid's stderr)
IPC::Run 0003 0123--6-8-0- [#1(2968)]: reading from fd 10 (kid's stderr)
IPC::Run 0003 0123--6-8-0- [#1(2968)]: read( 10 ) = 84 chars 'Using username "xxxxxxx".
IPC::Run 0003 0123--6-8-0- [#1(2968)]: Keyboard-interactive authentication refused
IPC::Run 0003 0123--6-8-0- [#1(2968)]: Sent password
IPC::Run 0003 0123--6-8-0- [#1(2968)]: '
IPC::Run 0003 0123--6-8-0- [#1(2968)]: exiting _select(): io occured and break_on_io set

out:
IPC::Run 0003 0123--6-8-0- [#1(2968)]: ** pumping
IPC::Run 0003 0123--6-8-0- [#1(2968)]: checking timer #1 (end time 1244399501) at 1244399402
IPC::Run 0003 0123--6-8-0- [#1(2968)]: checking for more input fd 6 (kid's stdin)
IPC::Run 0003 0123--6-8-0- [#1(2968)]: fds for select: ------p-r-r-
IPC::Run 0003 0123--6-8-0- [#1(2968)]: timeout=99
IPC::Run 0003 0123-------- [#(880) 11>pump>10]: 16 chars revc: 'Access granted\r\n'
IPC::Run 0003 0123-------- [#(880) 11>pump>10]: 16 chars sent: 'Access granted\n'
IPC::Run 0003 0123--6-8-0- [#1(2968)]: selected ----------r-
IPC::Run 0003 0123--6-8-0- [#1(2968)]: filtering data from fd 10 (kid's stderr)
IPC::Run 0003 0123--6-8-0- [#1(2968)]: reading from fd 10 (kid's stderr)
IPC::Run 0003 0123--6-8-0- [#1(2968)]: read( 10 ) = 15 chars 'Access granted
IPC::Run 0003 0123--6-8-0- [#1(2968)]: '
IPC::Run 0003 0123--6-8-0- [#1(2968)]: exiting _select(): io occured and break_on_io set

out:
IPC::Run 0003 0123--6-8-0- [#1(2968)]: ** pumping
IPC::Run 0003 0123--6-8-0- [#1(2968)]: checking timer #1 (end time 1244399501) at 1244399402
IPC::Run 0003 0123--6-8-0- [#1(2968)]: checking for more input fd 6 (kid's stdin)
IPC::Run 0003 0123--6-8-0- [#1(2968)]: fds for select: ------p-r-r-
IPC::Run 0003 0123--6-8-0- [#1(2968)]: timeout=99
IPC::Run 0003 0123-------- [#(880) 11>pump>10]: 28 chars revc: 'Opened channel for session\r\n'
IPC::Run 0003 0123-------- [#(880) 11>pump>10]: 28 chars sent: 'Opened channel for session\n'
IPC::Run 0003 0123--6-8-0- [#1(2968)]: selected ----------r-
IPC::Run 0003 0123--6-8-0- [#1(2968)]: filtering data from fd 10 (kid's stderr)
IPC::Run 0003 0123--6-8-0- [#1(2968)]: reading from fd 10 (kid's stderr)
IPC::Run 0003 0123--6-8-0- [#1(2968)]: read( 10 ) = 27 chars 'Opened channel for session
IPC::Run 0003 0123--6-8-0- [#1(2968)]: '
IPC::Run 0003 0123--6-8-0- [#1(2968)]: exiting _select(): io occured and break_on_io set

out:
IPC::Run 0003 0123--6-8-0- [#1(2968)]: ** pumping
IPC::Run 0003 0123--6-8-0- [#1(2968)]: checking timer #1 (end time 1244399501) at 1244399402
IPC::Run 0003 0123--6-8-0- [#1(2968)]: checking for more input fd 6 (kid's stdin)
IPC::Run 0003 0123--6-8-0- [#1(2968)]: fds for select: ------p-r-r-
IPC::Run 0003 0123--6-8-0- [#1(2968)]: timeout=99
IPC::Run 0003 0123-------- [#(880) 11>pump>10]: 50 chars revc: 'Allocated pty (ospeed 38400bps, ispeed 38400bps)\r\n'

IPC::Run 0003 0123-------- [#(880) 11>pump>10]: 50 chars sent: 'Allocated pty (ospeed 38400bps, ispeed 38400bps)\n'
IPC::Run 0003 0123--6-8-0- [#1(2968)]: selected ----------r-
IPC::Run 0003 0123--6-8-0- [#1(2968)]: filtering data from fd 10 (kid's stderr)
IPC::Run 0003 0123--6-8-0- [#1(2968)]: reading from fd 10 (kid's stderr)
IPC::Run 0003 0123--6-8-0- [#1(2968)]: read( 10 ) = 49 chars 'Allocated pty (ospeed 38400bps, ispeed 38400bps)
IPC::Run 0003 0123--6-8-0- [#1(2968)]: '
IPC::Run 0003 0123--6-8-0- [#1(2968)]: exiting _select(): io occured and break_on_io set

out:
IPC::Run 0003 0123--6-8-0- [#1(2968)]: ** pumping
IPC::Run 0003 0123--6-8-0- [#1(2968)]: checking timer #1 (end time 1244399501) at 1244399402
IPC::Run 0003 0123--6-8-0- [#1(2968)]: checking for more input fd 6 (kid's stdin)
IPC::Run 0004 0123--6-8-0- [#1(2968)]: fds for select: ------p-r-r-
IPC::Run 0004 0123--6-8-0- [#1(2968)]: timeout=99
IPC::Run 0004 0123-------- [#(880) 11>pump>10]: 25 chars revc: 'Started a shell/command\r\n'
IPC::Run 0004 0123-------- [#(880) 11>pump>10]: 25 chars sent: 'Started a shell/command\n'
IPC::Run 0004 0123--6-8-0- [#1(2968)]: selected ----------r-
IPC::Run 0004 0123--6-8-0- [#1(2968)]: filtering data from fd 10 (kid's stderr)
IPC::Run 0004 0123--6-8-0- [#1(2968)]: reading from fd 10 (kid's stderr)
IPC::Run 0004 0123--6-8-0- [#1(2968)]: read( 10 ) = 24 chars 'Started a shell/command
IPC::Run 0004 0123--6-8-0- [#1(2968)]: '
IPC::Run 0004 0123--6-8-0- [#1(2968)]: exiting _select(): io occured and break_on_io set

out:
IPC::Run 0004 0123--6-8-0- [#1(2968)]: ** pumping
IPC::Run 0004 0123--6-8-0- [#1(2968)]: checking timer #1 (end time 1244399501) at 1244399403
IPC::Run 0004 0123--6-8-0- [#1(2968)]: checking for more input fd 6 (kid's stdin)
IPC::Run 0004 0123--6-8-0- [#1(2968)]: fds for select: ------p-r-r-
IPC::Run 0004 0123--6-8-0- [#1(2968)]: timeout=98
IPC::Run 0004 0123-------- [#(2544) 9>pump>8]: 2 chars revc: '\r\n'
IPC::Run 0004 0123-------- [#(2544) 9>pump>8]: 2 chars sent: '\n'
IPC::Run 0004 0123--6-8-0- [#1(2968)]: selected --------r---
IPC::Run 0004 0123--6-8-0- [#1(2968)]: filtering data from fd 8 (kid's stdout)
IPC::Run 0004 0123--6-8-0- [#1(2968)]: reading from fd 8 (kid's stdout)
IPC::Run 0004 0123--6-8-0- [#1(2968)]: read( 8 ) = 1 chars '
IPC::Run 0004 0123--6-8-0- [#1(2968)]: '
IPC::Run 0004 0123--6-8-0- [#1(2968)]: exiting _select(): io occured and break_on_io set

out:

IPC::Run 0004 0123--6-8-0- [#1(2968)]: ** pumping
IPC::Run 0004 0123--6-8-0- [#1(2968)]: checking timer #1 (end time 1244399501) at 1244399403
IPC::Run 0004 0123--6-8-0- [#1(2968)]: checking for more input fd 6 (kid's stdin)
IPC::Run 0004 0123--6-8-0- [#1(2968)]: fds for select: ------p-r-r-
IPC::Run 0004 0123--6-8-0- [#1(2968)]: timeout=98
IPC::Run 0004 0123-------- [#(2544) 9>pump>8]: 11 chars revc: '\r\n(Aruba) >'
IPC::Run 0004 0123-------- [#(2544) 9>pump>8]: 11 chars sent: '\n(Aruba) >'
IPC::Run 0004 0123--6-8-0- [#1(2968)]: selected --------r---
IPC::Run 0004 0123--6-8-0- [#1(2968)]: filtering data from fd 8 (kid's stdout)
IPC::Run 0004 0123--6-8-0- [#1(2968)]: reading from fd 8 (kid's stdout)
IPC::Run 0004 0123--6-8-0- [#1(2968)]: read( 8 ) = 10 chars '
IPC::Run 0004 0123--6-8-0- [#1(2968)]: (Aruba) >'
IPC::Run 0004 0123--6-8-0- [#1(2968)]: exiting _select(): io occured and break_on_io set

out:

(Aruba) >

>>my_send: enable

>>my_wait_for: :
IPC::Run 0004 0123--6-8-0- [#1(2968)]: ** pumping
IPC::Run 0004 0123--6-8-0- [#1(2968)]: checking timer #1 (end time 1244399501) at 1244399403
IPC::Run 0004 0123--6-8-0- [#1(2968)]: checking for more input fd 6 (kid's stdin)
IPC::Run 0004 0123--6-8-0- [#1(2968)]: writing to fd 6 (kid's stdin)
IPC::Run 0004 0123-------- [#(2952) 4<pump<6]: 7 chars revc: 'enable\n'
IPC::Run 0004 0123-------- [#(2952) 4<pump<6]: 7 chars sent: 'enable\n'
IPC::Run 0004 0123--6-8-0- [#1(2968)]: write( 6, 'enable
IPC::Run 0004 0123--6-8-0- [#1(2968)]: ' ) = 7
IPC::Run 0004 0123--6-8-0- [#1(2968)]: fds for select: ------p-r-r-
IPC::Run 0004 0123--6-8-0- [#1(2968)]: timeout=98
IPC::Run 0005 0123-------- [#(2544) 9>pump>8]: 17 chars revc: 'enable\r\nPassword:'
IPC::Run 0005 0123-------- [#(2544) 9>pump>8]: 17 chars sent: 'enable\nPassword:'
IPC::Run 0005 0123--6-8-0- [#1(2968)]: selected --------r---
IPC::Run 0005 0123--6-8-0- [#1(2968)]: filtering data from fd 8 (kid's stdout)
IPC::Run 0005 0123--6-8-0- [#1(2968)]: reading from fd 8 (kid's stdout)
IPC::Run 0005 0123--6-8-0- [#1(2968)]: read( 8 ) = 16 chars 'enable
IPC::Run 0005 0123--6-8-0- [#1(2968)]: Password:'
IPC::Run 0005 0123--6-8-0- [#1(2968)]: exiting _select(): io occured and break_on_io set

out:

(Aruba) >enable
Password:

>>my_send: zzzzzz

>>my_wait_for: \(Aruba\)\s#
IPC::Run 0005 0123--6-8-0- [#1(2968)]: ** pumping
IPC::Run 0005 0123--6-8-0- [#1(2968)]: checking timer #1 (end time 1244399501) at 1244399404
IPC::Run 0005 0123--6-8-0- [#1(2968)]: checking for more input fd 6 (kid's stdin)
IPC::Run 0005 0123--6-8-0- [#1(2968)]: writing to fd 6 (kid's stdin)
IPC::Run 0005 0123-------- [#(2952) 4<pump<6]: 7 chars revc: 'zzzzzz\n'
IPC::Run 0005 0123--6-8-0- [#1(2968)]: write( 6, 'zzzzzz
IPC::Run 0005 0123--6-8-0- [#1(2968)]: ' ) = 7
IPC::Run 0005 0123-------- [#(2952) 4<pump<6]: 7 chars sent: 'zzzzzz\n'
IPC::Run 0005 0123--6-8-0- [#1(2968)]: fds for select: ------p-r-r-
IPC::Run 0005 0123--6-8-0- [#1(2968)]: timeout=97
IPC::Run 0005 0123-------- [#(2544) 9>pump>8]: 17 chars revc: '******\r\n(Aruba) #'
IPC::Run 0005 0123-------- [#(2544) 9>pump>8]: 17 chars sent: '******\n(Aruba) #'
IPC::Run 0005 0123--6-8-0- [#1(2968)]: selected --------r---
IPC::Run 0005 0123--6-8-0- [#1(2968)]: filtering data from fd 8 (kid's stdout)
IPC::Run 0005 0123--6-8-0- [#1(2968)]: reading from fd 8 (kid's stdout)
IPC::Run 0005 0123--6-8-0- [#1(2968)]: read( 8 ) = 16 chars '******
IPC::Run 0005 0123--6-8-0- [#1(2968)]: (Aruba) #'
IPC::Run 0005 0123--6-8-0- [#1(2968)]: exiting _select(): io occured and break_on_io set

out:

(Aruba) >enable
Password:******
(Aruba) #

>>my_send: config term

>>my_wait_for: \(Aruba\)\s\(config\)\s#
IPC::Run 0005 0123--6-8-0- [#1(2968)]: ** pumping
IPC::Run 0005 0123--6-8-0- [#1(2968)]: checking timer #1 (end time 1244399501) at 1244399404
IPC::Run 0005 0123--6-8-0- [#1(2968)]: checking for more input fd 6 (kid's stdin)
IPC::Run 0005 0123--6-8-0- [#1(2968)]: writing to fd 6 (kid's stdin)
IPC::Run 0005 0123-------- [#(2952) 4<pump<6]: 12 chars revc: 'config term\n'
IPC::Run 0005 0123-------- [#(2952) 4<pump<6]: 12 chars sent: 'config term\n'
IPC::Run 0005 0123--6-8-0- [#1(2968)]: write( 6, 'config term
IPC::Run 0005 0123--6-8-0- [#1(2968)]: ' ) = 12
IPC::Run 0005 0123--6-8-0- [#1(2968)]: fds for select: ------p-r-r-
IPC::Run 0005 0123--6-8-0- [#1(2968)]: timeout=97
IPC::Run 0005 0123-------- [#(2544) 9>pump>8]: 96 chars revc: 'configure term\r\nEnter Configuration commands, one pe
r line. End with CNTL/Z\n\r\n(Aruba) (config) #'
IPC::Run 0005 0123-------- [#(2544) 9>pump>8]: 96 chars sent: 'configure term\nEnter Configuration commands, one per
line. End with CNTL/Z\n\n(Aruba) (config) #'
IPC::Run 0005 0123--6-8-0- [#1(2968)]: selected --------r---
IPC::Run 0005 0123--6-8-0- [#1(2968)]: filtering data from fd 8 (kid's stdout)
IPC::Run 0005 0123--6-8-0- [#1(2968)]: reading from fd 8 (kid's stdout)
IPC::Run 0005 0123--6-8-0- [#1(2968)]: read( 8 ) = 94 chars 'configure term
IPC::Run 0005 0123--6-8-0- [#1(2968)]: Enter Configuration commands, one per line. End with CNTL/Z
IPC::Run 0005 0123--6-8-0- [#1(2968)]:
IPC::Run 0005 0123--6-8-0- [#1(2968)]: (Aruba) (config) #'
IPC::Run 0005 0123--6-8-0- [#1(2968)]: exiting _select(): io occured and break_on_io set

out:

(Aruba) >enable
Password:******
(Aruba) #configure term
Enter Configuration commands, one per line. End with CNTL/Z

(Aruba) (config) #

>>my_send: enable

>>my_wait_for: Password:
IPC::Run 0005 0123--6-8-0- [#1(2968)]: ** pumping
IPC::Run 0005 0123--6-8-0- [#1(2968)]: checking timer #1 (end time 1244399501) at 1244399404
IPC::Run 0005 0123--6-8-0- [#1(2968)]: checking for more input fd 6 (kid's stdin)
IPC::Run 0005 0123--6-8-0- [#1(2968)]: writing to fd 6 (kid's stdin)
IPC::Run 0005 0123-------- [#(2952) 4<pump<6]: 7 chars revc: 'enable\n'
IPC::Run 0005 0123--6-8-0- [#1(2968)]: write( 6, 'enable
IPC::Run 0005 0123--6-8-0- [#1(2968)]: ' ) = 7
IPC::Run 0005 0123-------- [#(2952) 4<pump<6]: 7 chars sent: 'enable\n'
IPC::Run 0005 0123--6-8-0- [#1(2968)]: fds for select: ------p-r-r-
IPC::Run 0005 0123--6-8-0- [#1(2968)]: timeout=97
IPC::Run 0005 0123-------- [#(2544) 9>pump>8]: 17 chars revc: 'enable\r\nPassword:'
IPC::Run 0005 0123-------- [#(2544) 9>pump>8]: 17 chars sent: 'enable\nPassword:'
IPC::Run 0005 0123--6-8-0- [#1(2968)]: selected --------r---
IPC::Run 0005 0123--6-8-0- [#1(2968)]: filtering data from fd 8 (kid's stdout)
IPC::Run 0005 0123--6-8-0- [#1(2968)]: reading from fd 8 (kid's stdout)
IPC::Run 0005 0123--6-8-0- [#1(2968)]: read( 8 ) = 16 chars 'enable
IPC::Run 0005 0123--6-8-0- [#1(2968)]: Password:'
IPC::Run 0005 0123--6-8-0- [#1(2968)]: exiting _select(): io occured and break_on_io set

out:

(Aruba) >enable
Password:******
(Aruba) #configure term
Enter Configuration commands, one per line. End with CNTL/Z

(Aruba) (config) #enable
Password:

>>my_send: zzzzzz

>>my_wait_for: password:
IPC::Run 0005 0123--6-8-0- [#1(2968)]: ** pumping
IPC::Run 0005 0123--6-8-0- [#1(2968)]: checking timer #1 (end time 1244399501) at 1244399404
IPC::Run 0005 0123--6-8-0- [#1(2968)]: checking for more input fd 6 (kid's stdin)
IPC::Run 0005 0123--6-8-0- [#1(2968)]: writing to fd 6 (kid's stdin)
IPC::Run 0005 0123-------- [#(2952) 4<pump<6]: 7 chars revc: 'zzzzzz\n'
IPC::Run 0005 0123--6-8-0- [#1(2968)]: write( 6, 'zzzzzz
IPC::Run 0005 0123--6-8-0- [#1(2968)]: ' ) = 7
IPC::Run 0005 0123-------- [#(2952) 4<pump<6]: 7 chars sent: 'zzzzzz\n'
IPC::Run 0005 0123--6-8-0- [#1(2968)]: fds for select: ------p-r-r-
IPC::Run 0005 0123--6-8-0- [#1(2968)]: timeout=97
IPC::Run 0005 0123-------- [#(2544) 9>pump>8]: 7 chars revc: '*******'
IPC::Run 0005 0123-------- [#(2544) 9>pump>8]: 7 chars sent: '*******'
IPC::Run 0005 0123--6-8-0- [#1(2968)]: selected --------r---
IPC::Run 0005 0123--6-8-0- [#1(2968)]: filtering data from fd 8 (kid's stdout)
IPC::Run 0005 0123--6-8-0- [#1(2968)]: reading from fd 8 (kid's stdout)
IPC::Run 0005 0123--6-8-0- [#1(2968)]: read( 8 ) = 7 chars '*******'
IPC::Run 0005 0123--6-8-0- [#1(2968)]: exiting _select(): io occured and break_on_io set

out:

(Aruba) >enable
Password:******
(Aruba) #configure term
Enter Configuration commands, one per line. End with CNTL/Z

(Aruba) (config) #enable
Password:*******
IPC::Run 0005 0123--6-8-0- [#1(2968)]: ** pumping
IPC::Run 0005 0123--6-8-0- [#1(2968)]: checking timer #1 (end time 1244399501) at 1244399404
IPC::Run 0005 0123--6-8-0- [#1(2968)]: checking for more input fd 6 (kid's stdin)
IPC::Run 0005 0123--6-8-0- [#1(2968)]: fds for select: ------p-r-r-
IPC::Run 0005 0123--6-8-0- [#1(2968)]: timeout=97
IPC::Run 0035 0123-------- [#(2544) 9>pump>8]: 46 chars revc: '\r\n Timed out, Try again \r\n\r\n(Aruba) (config) #'
IPC::Run 0035 0123-------- [#(2544) 9>pump>8]: 46 chars sent: '\n Timed out, Try again \n\n(Aruba) (config) #'
IPC::Run 0035 0123--6-8-0- [#1(2968)]: selected --------r---
IPC::Run 0035 0123--6-8-0- [#1(2968)]: filtering data from fd 8 (kid's stdout)
IPC::Run 0035 0123--6-8-0- [#1(2968)]: reading from fd 8 (kid's stdout)
IPC::Run 0035 0123--6-8-0- [#1(2968)]: read( 8 ) = 43 chars '
IPC::Run 0035 0123--6-8-0- [#1(2968)]: Timed out, Try again
IPC::Run 0035 0123--6-8-0- [#1(2968)]:
IPC::Run 0035 0123--6-8-0- [#1(2968)]: (Aruba) (config) #'
IPC::Run 0035 0123--6-8-0- [#1(2968)]: exiting _select(): io occured and break_on_io set

out:

(Aruba) >enable
Password:******
(Aruba) #configure term
Enter Configuration commands, one per line. End with CNTL/Z

(Aruba) (config) #enable
Password:*******
Timed out, Try again

(Aruba) (config) #
IPC::Run 0035 0123--6-8-0- [#1(2968)]: ** pumping
IPC::Run 0035 0123--6-8-0- [#1(2968)]: checking timer #1 (end time 1244399501) at 1244399434
IPC::Run 0035 0123--6-8-0- [#1(2968)]: checking for more input fd 6 (kid's stdin)
IPC::Run 0035 0123--6-8-0- [#1(2968)]: fds for select: ------p-r-r-
IPC::Run 0035 0123--6-8-0- [#1(2968)]: timeout=67
IPC::Run 0102 0123--6-8-0- [#1(2968)]: selected ------------
IPC::Run 0105 0123--6-8-0- [#1(2968)]: checking timer #1 (end time 1244399501) at 1244399504
IPC::Run 0105 0123--6-8-0- [#1(2968)]: timer #1 expired
IPC::Run 0105 0123--6-8-0- [#1(2968)]: timer #1 state set to <undef>
IPC::Run: timeout on timer #1 at C:/Perl/site/lib/IPC/Run.pm line 2932
IPC::Run 0105 0123-------- [#(2952) 4<pump<6]: Exiting, transferred 40 chars
IPC::Run 0105 0123-------- [#(880) 11>pump>10]: 18 chars revc: 'Sent EOF message\r\n'
IPC::Run 0105 0123-------- [#(880) 11>pump>10]: 18 chars sent: 'Sent EOF message\n'

I:\adapter_log>



(This post was edited by diesel_den on Jun 7, 2009, 11:57 AM)


diesel_den
Novice

Jun 7, 2009, 1:32 PM

Post #10 of 19 (3620 views)
Re: [diesel_den] Problem with Aruba device using plink through IPC::Run [In reply to] Can't Post

May be I just should put some other special symbol at the end of the line?
But how to understand what?
Or may be how can I find this character automatically, I mean some loop like send("0x00"); send("0x01"); send("0x02"); send("0x03"); ... send("0xFF");


diesel_den
Novice

Jun 8, 2009, 12:49 AM

Post #11 of 19 (3609 views)
Re: [diesel_den] Problem with Aruba device using plink through IPC::Run [In reply to] Can't Post

I was tried to send different characters using

Code
my_send(chr(<character_code>), $vars);

but any of them was parsed as <end of password> character.


diesel_den
Novice

Jun 8, 2009, 3:06 AM

Post #12 of 19 (3607 views)
Re: [diesel_den] Problem with Aruba device using plink through IPC::Run [In reply to] Can't Post

I have used sniffer and have found next thing.

While working with plink manually, every character is sent in separate packet and every line is finished by sending packet with "\x0D\x00".

While working with plink via IPC::Run, every chracter is not sent separately, but strings are sent. And every string is finished by "\x0A". It is because I am using "\n" after every string.

I have tried to use "\x0D\x00" after every string, but instead of "xxxxxx\x0D\x00" next string is sent: "xxxxxx\x00", so "\x0D" is not parsed by plink at all.

So sending chracters from keyboard and via IPC::Run - it is pretty different things!


(This post was edited by diesel_den on Jun 8, 2009, 3:17 AM)


diesel_den
Novice

Jun 8, 2009, 3:18 AM

Post #13 of 19 (3604 views)
Re: [diesel_den] Problem with Aruba device using plink through IPC::Run [In reply to] Can't Post

***********************************
SO, PLEASE, CAN ANYBODY SUGGEST HOW TO SEND "\x0D" FROM PLINK VIA IPC::RUN???
***********************************


diesel_den
Novice

Jun 8, 2009, 3:50 AM

Post #14 of 19 (3600 views)
Re: [diesel_den] Problem with Aruba device using plink through IPC::Run [In reply to] Can't Post

May be IPC::Run have something like BINMODE?


diesel_den
Novice

Jun 8, 2009, 8:34 AM

Post #15 of 19 (3587 views)
Re: [diesel_den] Problem with Aruba device using plink through IPC::Run [In reply to] Can't Post

http://search.cpan.org/~adamk/IPC-Run-0.82/lib/IPC/Run.pm#Win32_LIMITATIONS:

"binmode is not supported yet. The underpinnings are implemented, just ask if you need it."


diesel_den
Novice

Jun 8, 2009, 8:35 AM

Post #16 of 19 (3586 views)
Re: [diesel_den] Problem with Aruba device using plink through IPC::Run [In reply to] Can't Post

=item binmode

Sets/gets whether this pipe is in binmode or not. No effect off of Win32
OSs, of course, and on Win32, no effect after the harness is start()ed.


diesel_den
Novice

Jun 9, 2009, 9:34 AM

Post #17 of 19 (3575 views)
Re: [diesel_den] Problem with Aruba device using plink through IPC::Run [In reply to] Can't Post

I think I should try to find IPC::Run code which skips \x0D.
It will be bad news, if it is not a problem of this Perl module...


FishMonger
Veteran / Moderator

Jun 9, 2009, 10:22 AM

Post #18 of 19 (3573 views)
Re: [diesel_den] Problem with Aruba device using plink through IPC::Run [In reply to] Can't Post

If the problem is due to not being able to set binmode, then it sounds like it's time to look at one of the other modules that does allow setting binmode on Windows, such as Net::Telnet.

Another module option, which I think might be a better choice, is Net::SSH2 (or one of its relatives).


diesel_den
Novice

Jun 30, 2009, 2:11 AM

Post #19 of 19 (3491 views)
Re: [FishMonger] Problem with Aruba device using plink through IPC::Run [In reply to] Can't Post

I can not find other library that works good under Win32 and provides functionality similar to IPC::Run or which works with both SSH1 and SSH2.
Can anybody suggest some library that works for sure without problems under Win32?

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives