You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
(26) |
Dec
(7) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(5) |
Feb
(3) |
Mar
(11) |
Apr
(10) |
May
(2) |
Jun
(5) |
Jul
(13) |
Aug
(2) |
Sep
(3) |
Oct
(10) |
Nov
(18) |
Dec
(29) |
2002 |
Jan
(12) |
Feb
(14) |
Mar
(73) |
Apr
(28) |
May
(21) |
Jun
(39) |
Jul
(40) |
Aug
(42) |
Sep
(20) |
Oct
(4) |
Nov
(9) |
Dec
(18) |
2003 |
Jan
(2) |
Feb
(8) |
Mar
(6) |
Apr
(24) |
May
(24) |
Jun
(14) |
Jul
(16) |
Aug
(36) |
Sep
(34) |
Oct
(23) |
Nov
(4) |
Dec
(15) |
2004 |
Jan
(6) |
Feb
(13) |
Mar
(7) |
Apr
(5) |
May
(11) |
Jun
(5) |
Jul
(4) |
Aug
|
Sep
(2) |
Oct
(16) |
Nov
(4) |
Dec
(9) |
2005 |
Jan
(2) |
Feb
(1) |
Mar
(3) |
Apr
(10) |
May
(5) |
Jun
(13) |
Jul
(3) |
Aug
|
Sep
(7) |
Oct
(5) |
Nov
(1) |
Dec
(9) |
2006 |
Jan
|
Feb
(10) |
Mar
(22) |
Apr
(14) |
May
(5) |
Jun
(4) |
Jul
(19) |
Aug
(7) |
Sep
(16) |
Oct
(4) |
Nov
(1) |
Dec
(16) |
2007 |
Jan
(17) |
Feb
|
Mar
(35) |
Apr
(5) |
May
(20) |
Jun
(11) |
Jul
(33) |
Aug
(3) |
Sep
(2) |
Oct
(11) |
Nov
(23) |
Dec
(5) |
2008 |
Jan
(10) |
Feb
(9) |
Mar
|
Apr
(6) |
May
(8) |
Jun
(7) |
Jul
|
Aug
(3) |
Sep
(2) |
Oct
(1) |
Nov
|
Dec
(20) |
2009 |
Jan
(8) |
Feb
(8) |
Mar
(3) |
Apr
(8) |
May
(2) |
Jun
(11) |
Jul
(2) |
Aug
|
Sep
(3) |
Oct
(1) |
Nov
(7) |
Dec
(4) |
2010 |
Jan
(2) |
Feb
(1) |
Mar
(3) |
Apr
|
May
(2) |
Jun
(2) |
Jul
(7) |
Aug
(3) |
Sep
(7) |
Oct
(2) |
Nov
(1) |
Dec
(4) |
2011 |
Jan
(4) |
Feb
(5) |
Mar
|
Apr
(3) |
May
(2) |
Jun
|
Jul
(6) |
Aug
|
Sep
|
Oct
(6) |
Nov
|
Dec
|
2012 |
Jan
|
Feb
(1) |
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(5) |
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(7) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
(30) |
Apr
(10) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(12) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: Austin S. <te...@of...> - 2004-05-26 19:35:29
|
On Wed, May 26, 2004 at 09:13:27AM -0400, John Wingenbach wrote: > > Note that the creation of the slave (assuming the if test fails), is > dependent upon retrieving the ttyname. However, Expect.pm "use"s both > POSIX and IO::Pty. The problem with the default 'use POSIX;' is that > POSIX also has a ttyname declaration and thus once an Expect object is > blessed, the ttyname function used is NOT the IO::Pty one. The solution > is to limit what is being incorporated into Expect from the POSIX > module. From my limited tests, I have been able successfully change the > use line to: > Seems to me, after thinking about this for a bit, that IO::Pty::ttyname and POSIX::ttyname should do exactly the same thing. If POSIX::ttyname isn't returning correctly it seems like we should patch it. One of the issues is that it probably doesn't like filehandle refs, but that would probably be an easy fix. Austin |
From: Austin S. <te...@of...> - 2004-05-26 15:45:24
|
On Wed, May 26, 2004 at 03:40:50PM +0200, Roland Giersig wrote: > Thanks for the fix. I hope I will find the time to check what exactly is > needed from the POSIX module (can't remember offhand). > setsid(), specifically. IO::Stty also uses POSIX for the termio stuff. Austin |
From: Roland G. <RGi...@cp...> - 2004-05-26 13:41:22
|
Thanks for the fix. I hope I will find the time to check what exactly is needed from the POSIX module (can't remember offhand). Unfortunately my current working and personal situation does not leave time for much maintainance, but rest assured that Expect and IO::Pty are NOT orphaned. :o) I will try to create a new release in the next few days (there are several fixes waiting to be released). Roland John Wingenbach wrote: > After much fun, I have found the solution to a bug in Expect.pm. The > problem surfaces in the attempt to retrieve a slave (e.g. > clone_winsize_from): > > > from IO::Pty: > > sub slave { > @_ == 1 or croak 'usage: $pty->slave();'; > > my $master = shift; > > if (exists ${*$master}{'io_pty_slave'}) { > return ${*$master}{'io_pty_slave'}; > } > > my $tty = $master->ttyname(); > > my $slave = new IO::Tty; > > $slave->open($tty, O_RDWR | O_NOCTTY) || > croak "Cannot open slave $tty: $!"; > > return $slave; > } > > > Note that the creation of the slave (assuming the if test fails), is > dependent upon retrieving the ttyname. However, Expect.pm "use"s both > POSIX and IO::Pty. The problem with the default 'use POSIX;' is that > POSIX also has a ttyname declaration and thus once an Expect object is > blessed, the ttyname function used is NOT the IO::Pty one. The solution > is to limit what is being incorporated into Expect from the POSIX > module. From my limited tests, I have been able successfully change the > use line to: > > use POSIX qw (WNOHANG); > > With this change, the ttyname function can be called and the name > retrieved. Thus, window resizing: > > $e = new Expect; > $e->slave->clone_winsize_from(\*STDIN); > $SIG{WINCH} = \&winch; > > > sub winch { > $e->slave->clone_winsize_from(\*STDIN); > kill WINCH => $e->pid if $e->pid; > $SIG{WINCH} = \&winch; > } > > > works as well as any other call which needs to retrieve the ttyname from > the expect object. > > Cheers, > > John C. Wingenbach > > > PS... I am assuming that the authors/maintainers of Expect are no longer > active as I have not seen any kind of involvement from them on the lists > nor on CPAN. > > > Is Expect.pm a dead or orphaned module? > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > |
From: John W. <exp...@wi...> - 2004-05-26 13:13:44
|
After much fun, I have found the solution to a bug in Expect.pm. The problem surfaces in the attempt to retrieve a slave (e.g. clone_winsize_from): from IO::Pty: sub slave { @_ == 1 or croak 'usage: $pty->slave();'; my $master = shift; if (exists ${*$master}{'io_pty_slave'}) { return ${*$master}{'io_pty_slave'}; } my $tty = $master->ttyname(); my $slave = new IO::Tty; $slave->open($tty, O_RDWR | O_NOCTTY) || croak "Cannot open slave $tty: $!"; return $slave; } Note that the creation of the slave (assuming the if test fails), is dependent upon retrieving the ttyname. However, Expect.pm "use"s both POSIX and IO::Pty. The problem with the default 'use POSIX;' is that POSIX also has a ttyname declaration and thus once an Expect object is blessed, the ttyname function used is NOT the IO::Pty one. The solution is to limit what is being incorporated into Expect from the POSIX module. From my limited tests, I have been able successfully change the use line to: use POSIX qw (WNOHANG); With this change, the ttyname function can be called and the name retrieved. Thus, window resizing: $e = new Expect; $e->slave->clone_winsize_from(\*STDIN); $SIG{WINCH} = \&winch; sub winch { $e->slave->clone_winsize_from(\*STDIN); kill WINCH => $e->pid if $e->pid; $SIG{WINCH} = \&winch; } works as well as any other call which needs to retrieve the ttyname from the expect object. Cheers, John C. Wingenbach PS... I am assuming that the authors/maintainers of Expect are no longer active as I have not seen any kind of involvement from them on the lists nor on CPAN. Is Expect.pm a dead or orphaned module? |
From: Scott P. <sp...@ca...> - 2004-05-14 18:09:30
|
I'm currently writing a script that executes commands on a remote system, I noticed the log files and the output file I generate contain ctrl M chars. How do I disable this? $obj->raw_pty(0), doesn't seem to work for me. Thanks! |
From: Chandra R. <cha...@ya...> - 2004-04-24 03:49:34
|
Hi: I think Net::Telnet will work only for telnet.I suggest you look into Perl::Expect module which is pretty much similar to TCL Expect.. CHandra ===== Chandra Reddy Manubothu 2555 Homestead Road,Apt#9 Santa Clara,CA-95051 408-646-1755(cell) 1(512)681-7485(fax) __________________________________ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ http://photos.yahoo.com/ph/print_splash |
From: Zippy <spa...@ya...> - 2004-04-23 21:44:22
|
I'm not able to get the script below to work. It is trying to connect to a host via ssh. It is supposed to wait for the password prompt and then send a valid password, but for some reason it looks like the first line that I read in is "Permission denied, please try again." Since waiting for the password prompt kept failing, I did a getline() as soon as the ssh object was created and received "Permission denied, please try again." If I use RSA keys and remove the log in portion of the script, everything works fine. It is just the initial connection. It acts like, before I can send my password, it is automatically sending something and entering it. Does anyone know what is going on? Thanks for any help. #!/usr/bin/perl # Figure 6.6: Changing passwords over a Secure Shell connection # file: change_passwd_ssh.pl use strict; use Net::Telnet; use Getopt::Long; use IO::Pty; use POSIX 'setsid'; use constant PROMPT => '/[\$%#>] $/'; use constant DEBUG => 1; my $user = shift || $ENV{LOGNAME}; #my $old = get_password('old password'); #my $new = get_password('new password'); my $old = "*****"; my $new = "*****"; my $host = shift; change_passwd($host,$user,$old,$new); sub change_passwd { my ($host,$user,$oldpass,$newpass) = @_; my $ssh = do_cmd('ssh',$host) or die "couldn't launch ssh subprocess"; my $shell = Net::Telnet->new(Fhopen => $ssh); $shell->binmode(1); $shell->input_log('passwd.log') if DEBUG; $shell->dump_log('dump.log') if DEBUG; $shell->errmode('return'); my $line = $shell->getline(); print "line=$line\n"; $shell->waitfor('/password: $/') or return $shell->errmsg,"\n"; *******problem occurs here******* $shell->print($oldpass); $shell->waitfor(PROMPT) or return "host refused login: wrong password?\n"; $shell->print('passwd'); $shell->waitfor('/password:/') or return warn "$host: ",$shell->errmsg,"\n"; $shell->print($oldpass); my($pre,$match) = $shell->waitfor(Match => '/error/', Match => '/password:/'); $match =~ /password/ or return warn "$host: Incorrect password.\n"; $shell->print($newpass); ($pre,$match) = $shell->waitfor(Match => '/Bad password/', Match => '/Retype new password:/'); $match =~ /Retype/ or return warn "$host: New password rejected.\n"; $shell->print($newpass); $shell->waitfor('/successfully\./') or return warn "$host: ",$shell->errmsg,"\n"; print "Password changed for $user on $host.\n"; } sub do_cmd { my ($cmd,@args) = @_; my $pty = IO::Pty->new or die "can't make Pty: $!"; defined (my $child = fork) or die "Can't fork: $!"; return $pty if $child; setsid(); my $tty = $pty->slave; close $pty; STDIN->fdopen($tty,"r") or die "STDIN: $!"; STDOUT->fdopen($tty,"w") or die "STDOUT: $!"; STDERR->fdopen(\*STDOUT,"w") or die "STDERR: $!"; close $tty; $| = 1; exec $cmd, @args or die "Couldn't exec: $!"; } |
From: Chris M. <ch...@no...> - 2004-04-22 20:04:25
|
Hi, I recently came across Expect for Perl which I have opted to use as opposed to Net::Telnet. I was given the task to write a script which logs onto various nodes in our network and retrieves the configuration of them. I was using Net::Telnet but now the requirement to use SSH meant this was no longer possible. I have come across a minor little problem with terminal sizes, width in particular. It appears, by default to be setting the terminal width to 80 characters (or very close to this) unless I use clone_winsize_from. The clone_winsize_from appears to set the terminal settings to be the same as the calling terminal, but this is still not wider enough as the lines are still wrapping. I have looked on the web on Google, but cannot find any information on manually setting the width, is it possible to force the terminal width to some large number like 200 characters? I have included my code below (sorry if pasting is not permitted on this list). I have used the ps command as an example and piping towards more to make sure I can handle more prompts: #!/usr/bin/perl -w use strict; use Expect; $Expect::Exp_Internal = 0; $Expect::Log_Stdout = 0; my $ssh = "/usr/bin/ssh"; my $telnet = "/usr/bin/telnet"; (my $exp = Expect->spawn($ssh, "bob.test.sh")) || die "Couldn't spawn $ssh, $!"; $exp->exp_stty("raw -echo"); $exp->clone_winsize_from(\*STDIN); $exp->expect(10, [ qr/password:\s$/ ]) || die "Password prompt not found"; $exp->send("<password>\n"); $exp->expect(10, [ qr/bob.*[\]\$\>\#]\s$/ ]) || die "Prompt not found"; $exp->send("ps aux | more\n"); do { $exp->expect(10, [ qr/bob.*[\]\$\>\#]\s$/ ], [ qr/\e\[7m--More--\e\[27m/ ]) || die "Prompt not found"; print $exp->before(); if($exp->match =~ /\e\[7m--More--\e\[27m/) { $exp->send("\n"); } } while($exp->match =~ /\e\[7m--More--\e\[27m/); $exp->send("exit\n"); $exp->soft_close(); Thanks in advance, Chris |
From: <we...@sy...> - 2004-04-15 20:33:30
|
I couldn't find any archives to search, so I hope this isn't something rehashed a million times already... Expect works fine on RedHat 7.2 with Perl 5.6.1. However, when I try to run it on RedHat ES 3.0 with Perl 5.8.0, it hangs on the spawn if the perl debugger is in use. if (! ($pwd = Expect->spawn("/usr/bin/passwd '$user'")) ){ The hang only happens if I am using the perl debugger. If I disable the debugger, Expect works correctly. Of course, it's a bit tough to debug the rest of my program... Is there any way around this? Some of the trace after hitting CTRL C: 147: open(STDOUT,">&". $slv->fileno()) 148: or die "Couldn't reopen STDOUT for writing, $!\n"; IO::Handle::fileno(/opt/syntegra/lib/perl5/5.8.0/i686-linux/IO/Handle.pm:378 ): 378: @_ == 1 or croak 'usage: $io->fileno()'; IO::Handle::fileno(/opt/syntegra/lib/perl5/5.8.0/i686-linux/IO/Handle.pm:379 ): 379: fileno($_[0]); Expect::spawn(/opt/syntegra/lib/perl5/site_perl/5.8.0/Expect.pm:149): 149: close(STDERR); Expect::spawn(/opt/syntegra/lib/perl5/site_perl/5.8.0/Expect.pm:150): 150: open(STDERR,">&". $slv->fileno()) 151: or die "Couldn't reopen STDERR for writing, $!\n"; IO::Handle::fileno(/opt/syntegra/lib/perl5/5.8.0/i686-linux/IO/Handle.pm:378 ): 378: @_ == 1 or croak 'usage: $io->fileno()'; IO::Handle::fileno(/opt/syntegra/lib/perl5/5.8.0/i686-linux/IO/Handle.pm:379 ): 379: fileno($_[0]); Expect::spawn(/opt/syntegra/lib/perl5/site_perl/5.8.0/Expect.pm:153): 153: { exec(@cmd) }; Expect::spawn(/opt/syntegra/lib/perl5/site_perl/5.8.0/Expect.pm:153): 153: { exec(@cmd) }; Expect::spawn(/opt/syntegra/lib/perl5/site_perl/5.8.0/Expect.pm:125): 125: die "Cannot sync with child: $!" if not defined $errstatus; Wes |
From: Simon T. <se...@no...> - 2004-04-01 14:00:59
|
I have a script which spawns telnet expect handles. Works marvellously when run in the foreground - when I run the same script in the background it stops just after "AHEAD OF SPAWN". Doesn't even die gracefully - just stops. I don't understand enough about pty's to take this forward. What do I need to do/read to make this work when run in the background. Regards Simon $self->{_logger}->debug("AHEAD OF SPAWN"); eval { $Spawned = Expect->spawn("$args[0] $args[1]"); $msg = "Spawning to $args[0] $args[1]\n"; $self->{_logger}->info($msg); }; $self->{_logger}->debug("AFTER OF SPAWN"); Simon Taylor (Engineer) Service Tools Solutions (STS) Nortel Networks p - 01279 404289 (ESN 742 4289) m - 07740 533743 (ESN 748 3743) e - se...@no... "I code therefore I am" |
From: Roland G. <RGi...@cp...> - 2004-03-23 15:19:10
|
My standard sermon... ;o) As you mentioned FTP and Telnet, please be sure to read the FAQ section in the Expect docs about automating password entry. There are better ways to automate file transfer via FTP or SSH than providing passwords via Expect... Roland Mario Ohnewald wrote: > hello list! > > I dont know much perl, and i mainly want to use it for once special thing: > > I want to start a application, like ftp, or telnet, and redirect the stdin > and stdout. So that i could crontrol those programs remotely. I was told that > pty can do this in a nice way. > > http://search.cpan.org/dist/IO-Tty/Pty.pm > > I found it hard to understand that example they use there, and would be very > happy if someone could point me to a nicer/easier script or examples > regarding pty. > > If anyone has already such a script laying around, then just give it a paste > :p > > I dont mind reading though, but i was unlucky so far with google. > > > Thank you very much. > Mario > |
From: Austin S. <te...@of...> - 2004-03-23 06:36:49
|
On Tue, Mar 23, 2004 at 12:44:19AM +0100, Mario Ohnewald wrote: > hello list! > > I dont know much perl, and i mainly want to use it for once special thing: > > I want to start a application, like ftp, or telnet, and redirect the stdin > and stdout. So that i could crontrol those programs remotely. I was told that > pty can do this in a nice way. > > http://search.cpan.org/dist/IO-Tty/Pty.pm > > I found it hard to understand that example they use there, and would be very > happy if someone could point me to a nicer/easier script or examples > regarding pty. > Being that you are sending this to the expectperl list you've heard of Expect, and the Expect.pm module this list represents, no? If not, start there. Also noted that most of those programs have modules already, such as Net::Telnet, Net::FTP, etc. Austin |
From: Mario O. <mar...@gm...> - 2004-03-22 23:44:27
|
hello list! I dont know much perl, and i mainly want to use it for once special thing: I want to start a application, like ftp, or telnet, and redirect the stdin and stdout. So that i could crontrol those programs remotely. I was told that pty can do this in a nice way. http://search.cpan.org/dist/IO-Tty/Pty.pm I found it hard to understand that example they use there, and would be very happy if someone could point me to a nicer/easier script or examples regarding pty. If anyone has already such a script laying around, then just give it a paste :p I dont mind reading though, but i was unlucky so far with google. Thank you very much. Mario -- +++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter Virenschutz +++ 100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz |
From: Roland G. <RGi...@cp...> - 2004-03-08 10:38:12
|
Boyd Adamson wrote: > Hi, > > I'm interested in getting screen and Expect to work together in a > slightly less clunky way than I currently have. > > Currently I use something like: > > my $exp = Expect->spawn("screen -x -p $window_name"); > > which fires up a new instance of screen that shares the same session (in > a multi-user way) with my interactive one. This works fine, but I wonder > if there isn't a way to use screen's "exec" command to fire up my script. > > The "exec" command in screen allows a program to be run which is > connected in a customisable way to the session in the window. In > particular, I can connect STDOUT and STDIN of my spawned script to the > input and output of my window respectively. This would be wonderful if I > could get Expect to chat on STDIN/STDOUT, rather than a spawned process. > > So, is there a way to run a perl Expect script so that it chats on > STDIN/STDOUT? (I guess this could be useful for debugging too) Sorry for the belated reply... You could simply use exp_init(*STDIN) to do so. Send()ing of course must go to STDOUT, but just use print instead... Hope this helps, Roland -- RGi...@cp... |
From: Boyd A. <boy...@us...> - 2004-03-02 06:50:52
|
Hi, I'm interested in getting screen and Expect to work together in a slightly less clunky way than I currently have. Currently I use something like: my $exp = Expect->spawn("screen -x -p $window_name"); which fires up a new instance of screen that shares the same session (in a multi-user way) with my interactive one. This works fine, but I wonder if there isn't a way to use screen's "exec" command to fire up my script. The "exec" command in screen allows a program to be run which is connected in a customisable way to the session in the window. In particular, I can connect STDOUT and STDIN of my spawned script to the input and output of my window respectively. This would be wonderful if I could get Expect to chat on STDIN/STDOUT, rather than a spawned process. So, is there a way to run a perl Expect script so that it chats on STDIN/STDOUT? (I guess this could be useful for debugging too) Boyd |
From: Mark D. <Mar...@Su...> - 2004-03-01 09:32:02
|
The following code takes the output of the usershow command and puts it into an array. It then puts the output I want (in this output that does not match a list of patterns) into a separate array. Does this code help your cause? my @userarray3; print $session "usershow\r"; my @userarray1 =3D $session->expect(30, -re, "$SC_PROMPT"); my @userarray2 =3D split ('\n', $userarray1[3]); for (my $s =3D 0; $s <=3D $#userarray2; $s++) { if ($userarray2[$s] !~ /$SC_PROMPT|username\s+permissions\s+password\?|usershow|-{6,}/) { push (@userarray3, $userarray2[$s]); } } =B7=BD=EA=C9 wrote: > I am the beginner of Expect.I want to store the output of the process i= n my own array when use Expect. e.g. if I send a command to a ftp process= , and I want to store it's return value into my array, such as @filelist.= How can I? If I use expect(), the result is just printed on the STDOUT. = Thanks a lot.HS^=81=7F+,=A6=89=EC=A2=B7=9Do$=A9y=E7R=B5=AA=EDb=8B=AB.)=EE= =C4 > i=B0=DA0=06=E8=A5u=A9=DDu=EAe=81=7F&=A9=A6=C5=9En=C7=AB=81=7F'=1E=B1=FA= +.)=EE=C7=08=AD=85=A7=EBy=E0=D5=0E=81=7F=1F=81=7F=06=ABzH=AD~=81=7F& =13=02= =81=7F'$6=81=7F!=B6=DA?=FD=A7l=A2=C7gr=89=BFi=D8=9D=03]=E9=A9e=A1=C8=81=7F= =03~=F2=8ArX=9C=90Liy=CBiz=B9]=8A=C7.=B2=C9=9A=8AX=A7=82X=AC=B4Liy=CBiz=B9= ]=8A=C7.=B2=C9b=B2=DB,=A2=EA=DCy=81=7F+=81=E9=DE=B6=1Bm=A6=CF=81=7F=81=7F= +-=B2=CA.=AD=C7=9F=A2=81=7F=1E=9D=EB?=81=7F+-=B3=F9b=B2=D8=A7~=8F=DE=C6=97= =9C=B6=97=AB=95=D8=ACr=81=7F, |
From: <sea...@em...> - 2004-03-01 04:41:56
|
SSBhbSB0aGUgYmVnaW5uZXIgb2YgRXhwZWN0Lkkgd2FudCB0byBzdG9yZSB0aGUgb3V0cHV0IG9m IHRoZSBwcm9jZXNzIGluIG15IG93biBhcnJheSB3aGVuIHVzZSBFeHBlY3QuIGUuZy4gaWYgSSBz ZW5kIGEgY29tbWFuZCB0byBhIGZ0cCBwcm9jZXNzLCBhbmQgSSB3YW50IHRvIHN0b3JlIGl0J3Mg cmV0dXJuIHZhbHVlIGludG8gbXkgYXJyYXksIHN1Y2ggYXMgQGZpbGVsaXN0LiBIb3cgY2FuIEk/ IElmIEkgdXNlIGV4cGVjdCgpLCB0aGUgcmVzdWx0IGlzIGp1c3QgcHJpbnRlZCBvbiB0aGUgU1RE T1VULiBUaGFua3MgYSBsb3Qu |
From: Austin S. <te...@of...> - 2004-02-27 23:55:14
|
On Fri, Feb 27, 2004 at 01:25:27PM -0700, Dan Young wrote: > I'm trying to user Perl/Expect to spawn sqlplus and connect to a database via the Net8 vs. IPC. I'm running into problems with the @ character in the connect string, i.e connect scott/tiger@mydb, with $exp->send. I've tried to escape it with \@ but it doesn't work. Does anyone have any ideas or do I nned to stick to IPC connections???? IIRC you can put the the connect string on the command line, like 'sqlplus scott/tiger@mydb'. I'm not sure why send is giving you grief, but you can simply print to it: print $exp 'connect scott/tiger@mydb' . "\r"; If that doesn't work you're probably doing something wrong and should try using the documented debugging methods. Austin |
From: Dan Y. <dan...@sa...> - 2004-02-27 20:47:12
|
I'm trying to user Perl/Expect to spawn sqlplus and connect to a database via the Net8 vs. IPC. I'm running into problems with the @ character in the connect string, i.e connect scott/tiger@mydb, with $exp->send. I've tried to escape it with \@ but it doesn't work. Does anyone have any ideas or do I nned to stick to IPC connections???? Thank you, Dan |
From: Dan Y. <dan...@sa...> - 2004-02-27 20:03:12
|
I'm trying to user Perl/Expect to spawn sqlplus and connect to a daatbase via the Net8 vs. IPC. I'm running into problems with the @ character with $exp->send. I've tried to escape it with \@ but it doesn't work. Does anyone have any ideas or do I nned to stick to IPC connections???? |
From: Roland G. <RGi...@cp...> - 2004-02-22 23:04:20
|
John Wingenbach wrote: > I am trying to use perl/expect to handle the login to a host (supply > password upon request). Don't. Use public key authentication instead, see the ssh docs. Hope this helps. Roland |
From: John W. <exp...@wi...> - 2004-02-20 15:31:31
|
Hello, I am trying to use perl/expect to handle the login to a host (supply password upon request). After login, the script executes interact such that I can then use the session. The problem I run into is that an resize of the window fails. I'd really appreciate any help in figuring this out. This is the basis for enabling a long line of ssh sess TIA, John Here's the pertinent code: $e = new Expect; $e->slave->clone_winsize_from(\*STDIN); $SIG{WINCH} = \&winch; sub winch { $e->slave->clone_winsize_from(\*STDIN); kill WINCH => $e->pid if $e->pid; $SIG{WINCH} = \&winch; } $Expect::Do_Soft_Close =0; $e->spawn ("ssh myhost\r"); $match = $e->expect (60, "password:"); if (!defined $match) { die "Failed to find password prompt at login_dmz".$e->before(); } $e->send("$VALS{dmzpwd}\r"); $e->expect (30, "-re", "[\>\$\#%] *"); $e->interact(); And here is what I get when I run an stty -a and then later follow it up with a resizing: myhost$ stty -a speed 38400 baud; 24 rows; 80 columns; eucw 1:1:0:0, scrw 1:1:0:0: intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = ^@ eol2 = ^@; start = ^Q; stop = ^S; susp = ^Z; dsusp = ^Y; reprint = ^R discard = ^O; werase = ^W; lnext = ^V -parenb -parodd cs8 -cstopb -hupcl cread -clocal -parext -ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -iuclc ixon -ixany -ixoff -imaxbel isig icanon -xcase echo echoe echok -echonl -noflsh -tostop echoctl -echoprt echoke -flusho -pending iexten opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel tab3 myhost$ Use of uninitialized value in sysopen at /usr/lib/perl5/5.8.0/i586-linux-thread-multi/IO/File.pm line 159. Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi/IO/Pty.pm line 75. Cannot open slave : No such file or directory at /home/jwing/bin/e line 151 |
From: John W. <jo...@wi...> - 2004-02-20 15:15:49
|
Hello, I am trying to use perl/expect to handle the login to a host (supply password upon request). After login, the script executes interact such that I can then use the session. The problem I run into is that an resize of the window fails. I'd really appreciate any help in figuring this out. This is the basis for enabling a long line of ssh sess TIA, John Here's the pertinent code: $e = new Expect; $e->slave->clone_winsize_from(\*STDIN); $SIG{WINCH} = \&winch; sub winch { $e->slave->clone_winsize_from(\*STDIN); kill WINCH => $e->pid if $e->pid; $SIG{WINCH} = \&winch; } $Expect::Do_Soft_Close =0; $e->spawn ("ssh myhost\r"); $match = $e->expect (60, "password:"); if (!defined $match) { die "Failed to find password prompt at login_dmz".$e->before(); } $e->send("$VALS{dmzpwd}\r"); $e->expect (30, "-re", "[\>\$\#%] *"); $e->interact(); And here is what I get when I run an stty -a and then later follow it up with a resizing: myhost$ stty -a speed 38400 baud; 24 rows; 80 columns; eucw 1:1:0:0, scrw 1:1:0:0: intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = ^@ eol2 = ^@; start = ^Q; stop = ^S; susp = ^Z; dsusp = ^Y; reprint = ^R discard = ^O; werase = ^W; lnext = ^V -parenb -parodd cs8 -cstopb -hupcl cread -clocal -parext -ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -iuclc ixon -ixany -ixoff -imaxbel isig icanon -xcase echo echoe echok -echonl -noflsh -tostop echoctl -echoprt echoke -flusho -pending iexten opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel tab3 myhost$ Use of uninitialized value in sysopen at /usr/lib/perl5/5.8.0/i586-linux-thread-multi/IO/File.pm line 159. Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi/IO/Pty.pm line 75. Cannot open slave : No such file or directory at /home/jwing/bin/e line 151 |
From: ROCHE,WILLY (HP-France,ex1) <wil...@hp...> - 2004-02-06 08:49:34
|
Hi, This proposal was a good one. I have write a second script which start the first one with qx { first_script } and this works now. There should really be something = strange in the way Expect.pm handle stdin/stdout. I will still try to find a better solution, has I have large amout of = data to get from the web POST, it's not convenient to start the second = script with all those data on the cmd line and passing all this through a file require to ensure that concurrent access to the web page won't crash = each other, which is feasible but painfull to implement. Anyway, thanks for the idea. I now have a more precise idea of where in = the expect.pm code to look to try to fix the issue directly. Regards, Willy --=20 Willy ROCHE Network Support Problem Management HP Managed Services EMEA Networks ___________________________________ Tel: +33 4 7614 4768 Fax: +33 4 7614 1716 E-Mail: wil...@hp... Hewlett-Packard Grenoble 5, avenue Raymond Chanas 38053 GRENOBLE Cedex 9 http://www.hp.com/hps/network/ > -----Original Message----- > From: Dav...@CT... [mailto:Dav...@CT...] > Sent: jeudi 5 f=E9vrier 2004 16:17 > To: ROCHE,WILLY (HP-France,ex1) > Cc: exp...@li...; > exp...@li...; Roland Giersig > Subject: RE: [Expectperl-discuss] Issue with Expect.pm ssh command > through Apache web >=20 >=20 >=20 >=20 >=20 >=20 >=20 > If it works fine from the cmd line and you dont' feel like=20 > messing with it, > then pending what Roland says, you might want to consider avoiding = the > issue by moving your Expect.pm code out of CGI script to an=20 > external perl > script, then open this external perl script as a read-only=20 > FileHandle from > CGI. This way, everybody wins. cgi script is happy because=20 > now it only > deals with standard FileHandle. >=20 > Personally, I've not had much luck using Expect.pm within=20 > Perl CGI because > of forking issues and duplicate sessions (among other=20 > things), but rather > than intellectually solving the problem, I just avoid it. =20 > Whatever the > CGI script needs to get back for display could simply be=20 > engineered to be > STDOUT in the external perl Expect script. You can make=20 > STDOUT hot in the > CGI script (i.e., $|=3D1) if you want to force updates=20 > incrementally from > external script without making the user wait, but maybe that's not > important >=20 >=20 >=20 >=20 >=20 > =20 > =20 > =20 > =20 > To:=20 > Roland Giersig <RGi...@cp...>, =20 > =20 > exp...@li... =20 > cc:=20 > =20 > "ROCHE,WILLY (HP-France,ex1)" =20 > Subject: RE: [Expectperl-discuss] Issue with =20 > <wil...@hp...> =20 > Expect.pm ssh command through Apache web =20 > Sent by: =20 > =20 > exp...@li...urc =20 > =20 > eforge.net =20 > =20 > =20 > =20 > =20 > =20 > 02/05/2004 07:54 AM =20 > =20 > =20 > =20 > =20 > =20 >=20 >=20 >=20 >=20 > Hello Roland, >=20 > Thanks for your answer. > Let me explain the whole issue I am facing: > - I use Net::Telnet::Cisco to control some cisco equipments. > - Those equipements are accessible only from one "secured" system. > - This secured system can only be accessed through ssh. >=20 > Therefore, as the only way for me to use Net::Telnet::Cisco=20 > even after the > rebound is to use the possibility to start=20 > Net::Telnet::Cisco passing a > open FileHandle, I have think of using expect->spwan function=20 > to connect > via > SSH to the secure system and then pass the FileHandle to N::T::C. > Maybe it's not the best way to do it? Have you other suggestion? >=20 > Nevertheless, this work fine when running the script from=20 > console, but when > I run the script via Apache and Mod_Perl, ssh does not accept to = start > properly and answers the error messages > > Pseudo-terminal will not be allocated because stdin is not=20 > a terminal. # > when starting > > read: Bad file descriptor # when I do the first ->expect command > > ttytype: couldn't open /dev/tty for reading > > stty: : Not a typewriter >=20 > My system is a PC with Linux RH8, Perl 5.8.3 / mod_perl=20 > 1.99_12 / Apache > 2.0.48 >=20 > Is there a better way to initiate a ssh to 1st system and=20 > then telnet to > something else and then provide an open FileHandle to=20 > Net::Telnet::Cisco? >=20 > Thanks in advance. > Willy >=20 > -- > Willy ROCHE > Network Support Problem Management > HP Managed Services EMEA Networks > ___________________________________ > Tel: +33 4 7614 4768 > Fax: +33 4 7614 1716 > E-Mail: wil...@hp... > Hewlett-Packard Grenoble > 5, avenue Raymond Chanas > 38053 GRENOBLE Cedex 9 > http://www.hp.com/hps/network/ >=20 >=20 > > -----Original Message----- > > From: Roland Giersig [mailto:RGi...@cp...] > > Sent: mercredi 4 f=E9vrier 2004 11:05 > > To: exp...@li... > > Subject: Re: [Expectperl-discuss] Issue with Expect.pm ssh command > > through Apache web > > > > > > ROCHE,WILLY (HP-France,ex1) wrote: > > > > > Hi Everyone, > > > > > > I am trying to connect to some equipment through ssh and > > want to use Expect. > > > > Are you sure you HAVE to use Expect? :o) > > How about non-interactive ssh commands? > > > > > It works fine from console, but when starting my perl > > script from Apache web > > > server it fails. > > > > > > I have Perl 5.8.3 / mod_perl 1.99_12 / Apache 2.0.48 > > > > > > Code that works on console but not through the web: > > > $exp =3D new Expect; > > > $exp->raw_pty(1); > > > $exp->spawn ('ssh', '-1', '-A', 'me@otherhost'); > > > $exp->expect (10, "\$"); # waiting for the server prompt > > > $exp->send ("ls\n"); > > > $exp->expect (10, "toto"); # one of the file in ls output > > > > > > On console, it works fine and exit properly. > > > Through web, it does not and ouput following errors: > > > Pseudo-terminal will not be allocated because stdin is > > not a terminal. > > > read: Bad file descriptor > > > ttytype: couldn't open /dev/tty for reading > > > stty: : Not a typewriter > > This is rather strange. What system are you running on? Normally = the > > spawned program should get the pseudo-terminal as its controlling > > terminal... > > > > > I also try ssh options "-t" and "-T" with no benefits. > > > > Yes, ssh is very security-concerned and won't read a password from = a > > non-terminal stdin. But if you set public-key-authentication > > so you can > > login without a password then it doesn't have to ask for a > > password and > > it should work. BTW, have you read the Expect FAQ about ssh? ;o) > > > > Best regards, > > > > Roland > > -- > > RGi...@cp... > > > > > > ------------------------------------------------------- > > The SF.Net email is sponsored by EclipseCon 2004 > > Premiere Conference on Open Tools Development and Integration > > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > > http://www.eclipsecon.org/osdn > > _______________________________________________ > > Expectperl-discuss mailing list > > Exp...@li... > > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > > >=20 >=20 > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss >=20 >=20 >=20 >=20 > ------------------------------------------------ > NOTICE OF CONFIDENTIALITY > ------------------------------------------------ >=20 > This e-mail and any attachments thereto is intended only for=20 > use by the > addressee(s) named herein and may be proprietary and/or=20 > legally privileged. > If you are not the intended recipient of this e-mail, you are hereby > notified that any dissemination, distribution or copying of=20 > this email, and > any attachments thereto, without the prior written permission=20 > of the sender > is strictly prohibited. If you receive this e-mail in error, please > immediately telephone or e-mail the sender and permanently delete the > original copy and any copy of this e-mail, and any printout thereof. >=20 > All documents, contracts or agreements referred or attached=20 > to this e-mail > are SUBJECT TO CONTRACT. >=20 > The contents of an attachment to this e-mail may contain=20 > software viruses > that could damage your own computer system. While CTC=20 > Communications has > taken every reasonable precaution to minimize this risk, we=20 > cannot accept > liability for any damage that you sustain as a result of=20 > software viruses. > You should carry out your own virus checks before opening any=20 > attachment. >=20 |
From: Roland G. <RGi...@cp...> - 2004-02-06 07:31:55
|
ROCHE,WILLY (HP-France,ex1) wrote: > Hello Chris, > > Thanks for your answer. You have perfectly understand my needs, but I did > not provide one important remark: > I have no right to add a script on the secure system, moreover when I say > "A" secured system, it's in fact severals of them in different places, and I > want to avoid needing to deploy my script to 100 secured systems and main > then and manage the versions. > > If you have any other suggestions on how I can do it, please let me know. > > Willy > How about spawning perl as the remote ssh command? open2($from, $to, "ssh $securesystem /usr/bin/perl"); print $to $remotescript; close($to); sysread($from, $result); That way you can keep the script for the secure system on your side. I'm using this kind of RPC to gather system info from a couple of machines that need supervision. Hope this helps, Roland |