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: <Dav...@CT...> - 2004-02-05 15:22:58
|
If it works fine from the cmd line and you dont' feel like 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 external pe= rl script, then open this external perl script as a read-only FileHandle f= rom CGI. This way, everybody wins. cgi script is happy because now it only= deals with standard FileHandle. Personally, I've not had much luck using Expect.pm within Perl CGI beca= use of forking issues and duplicate sessions (among other things), but rath= er than intellectually solving the problem, I just avoid it. Whatever th= e CGI script needs to get back for display could simply be engineered to = be STDOUT in the external perl Expect script. You can make STDOUT hot in = the CGI script (i.e., $|=3D1) if you want to force updates incrementally fr= om external script without making the user wait, but maybe that's not important = =20 = =20 To: Roland G= iersig <RGi...@cp...>, =20 expectpe= rl-...@li... =20 cc: = =20 "ROCHE,WILLY (HP-France,ex1)" Subject: R= E: [Expectperl-discuss] Issue with =20 <wil...@hp...> Expect.p= m ssh command through Apache web =20 Sent by: = =20 exp...@li...urc = =20 eforge.net = =20 = =20 = =20 02/05/2004 07:54 AM = =20 = =20 = =20 Hello Roland, 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. Therefore, as the only way for me to use Net::Telnet::Cisco even after = the rebound is to use the possibility to start Net::Telnet::Cisco passing = a open FileHandle, I have think of using expect->spwan function to connec= t 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? Nevertheless, this work fine when running the script from 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 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 My system is a PC with Linux RH8, Perl 5.8.3 / mod_perl 1.99_12 / Apach= e 2.0.48 Is there a better way to initiate a ssh to 1st system and then telnet t= o something else and then provide an open FileHandle to Net::Telnet::Cisc= o? Thanks in advance. Willy -- 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: 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 > ------------------------------------------------------- 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 ------------------------------------------------ NOTICE OF CONFIDENTIALITY ------------------------------------------------ This e-mail and any attachments thereto is intended only for use by the= addressee(s) named herein and may be proprietary and/or legally privile= ged. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this email,= and any attachments thereto, without the prior written permission of the se= nder 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. All documents, contracts or agreements referred or attached to this e-m= ail are SUBJECT TO CONTRACT. The contents of an attachment to this e-mail may contain software virus= es that could damage your own computer system. While CTC Communications = has taken every reasonable precaution to minimize this risk, we cannot acce= pt liability for any damage that you sustain as a result of software virus= es. You should carry out your own virus checks before opening any attachmen= t.= |
From: ROCHE,WILLY (HP-France,ex1) <wil...@hp...> - 2004-02-05 14:26:01
|
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 --=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: Chris [mailto:cas...@pe...] > Sent: jeudi 5 f=E9vrier 2004 09:56 > To: ROCHE,WILLY " "(HP-France,ex1) > Subject: RE: [Expectperl-discuss] Issue with Expect.pm ssh command > through Apache web >=20 >=20 > Can't you place a script on the secured system that would use > Net::Telnet::Cisco to do the work that needs done, and write=20 > the desired > results to stdout? The you could retrieve this information=20 > elsewhere by > issuing the command [ssh securedtargetmachinename > "/path/to/Net-Telnet-script --options"]. >=20 > The quotes may be necessary, and should not be incorrect. =20 > The brackets > are not part of the command. The stdout of the script on the secured > machine should be the result of the ssh command. >=20 > Forgive me if I've misunderstood your needs. >=20 > CA >=20 >=20 > On Thu, 2004-02-05 at 07:54, ROCHE,WILLY (HP-France,ex1) wrote: > > 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=20 > function 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=20 > accept to start > > properly and answers the error messages > > > Pseudo-terminal will not be allocated because stdin is=20 > not 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 |
From: ROCHE,WILLY (HP-France,ex1) <wil...@hp...> - 2004-02-05 12:55:29
|
Hello Roland, 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. Therefore, as the only way for me to use Net::Telnet::Cisco even after = the rebound is to use the possibility to start Net::Telnet::Cisco passing = a open FileHandle, I have think of using expect->spwan function 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? Nevertheless, this work fine when running the script from 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 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 My system is a PC with Linux RH8, Perl 5.8.3 / mod_perl 1.99_12 / = Apache 2.0.48 Is there a better way to initiate a ssh to 1st system and then telnet = to something else and then provide an open FileHandle to = Net::Telnet::Cisco? 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/ > -----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 >=20 >=20 > ROCHE,WILLY (HP-France,ex1) wrote: >=20 > > Hi Everyone, > >=20 > > I am trying to connect to some equipment through ssh and=20 > want to use Expect. >=20 > Are you sure you HAVE to use Expect? :o) > How about non-interactive ssh commands? >=20 > > It works fine from console, but when starting my perl=20 > script from Apache web > > server it fails. > >=20 > > I have Perl 5.8.3 / mod_perl 1.99_12 / Apache 2.0.48 > >=20 > > 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 > >=20 > > 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=20 > 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=20 > spawned program should get the pseudo-terminal as its controlling=20 > terminal... >=20 > > I also try ssh options "-t" and "-T" with no benefits. >=20 > Yes, ssh is very security-concerned and won't read a password from a=20 > non-terminal stdin. But if you set public-key-authentication=20 > so you can=20 > login without a password then it doesn't have to ask for a=20 > password and=20 > it should work. BTW, have you read the Expect FAQ about ssh? ;o) >=20 > Best regards, >=20 > Roland > -- > RGi...@cp... >=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 |
From: Roland G. <RGi...@cp...> - 2004-02-05 02:37:54
|
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 = 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... |
From: ROCHE,WILLY (HP-France,ex1) <wil...@hp...> - 2004-02-02 12:04:23
|
Hi Everyone, I am trying to connect to some equipment through ssh and want to use Expect. 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 = 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 I also try ssh options "-t" and "-T" with no benefits. Any idea? Willy |
From: Jim C. <jc...@di...> - 2004-01-14 21:22:44
|
Clarissa Cook wrote: >Hi, > >--- Jim Cromie <jc...@di...> wrote: > > >>Clarissa Cook wrote: >> >> >> >>>Well, that's how I read Pty.pm ... I mean "if (defined TIOCSCTTY)" >>>isn't even advanced Perl. >>> >>> >>> >>> >>just a wag - what happens if you hack it, and strip out 'defined' ? >> >> > >Ooo! Very good point. So, replacing with: >if (TIOCSCTTY) { >} elsif (TCSETCTTY) { >} >(note I had to delete the defined on the TCSETCTTY as well), then the >warning about TIOCSCTTY and TCSETCTTY go away (but are replaced with >"Useless use of a constant in void context at ...") > > Having looked at the code, I take it that ... is elsewhere, ie your user code. >Progress! (of sorts). > > good. now you have to decide what its telling you. Keep in mind that it was a WAG (wild ass guess), and was not intended to imply certainty about 'which way is west'. Id suggest focussing on what WIERD about this. In my limited use of Expect, Ive not encountered problems, except basic user ones. Roland is *highly* qualified in the edge cases of this package. ;-) >Thanks, >Clarissa > > > |
From: Clarissa C. <clc...@ya...> - 2004-01-14 20:25:24
|
Hi, --- Jim Cromie <jc...@di...> wrote: > Clarissa Cook wrote: > > > > >Well, that's how I read Pty.pm ... I mean "if (defined TIOCSCTTY)" > >isn't even advanced Perl. > > > > > > just a wag - what happens if you hack it, and strip out 'defined' ? Ooo! Very good point. So, replacing with: if (TIOCSCTTY) { } elsif (TCSETCTTY) { } (note I had to delete the defined on the TCSETCTTY as well), then the warning about TIOCSCTTY and TCSETCTTY go away (but are replaced with "Useless use of a constant in void context at ...") Progress! (of sorts). Thanks, Clarissa __________________________________ Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus |
From: Jim C. <jc...@di...> - 2004-01-14 19:26:17
|
Clarissa Cook wrote: > >Well, that's how I read Pty.pm ... I mean "if (defined TIOCSCTTY)" >isn't even advanced Perl. > > just a wag - what happens if you hack it, and strip out 'defined' ? >Clarissa > > > |
From: Clarissa C. <clc...@ya...> - 2004-01-14 00:41:50
|
Hi, Thanks for the response. --- Roland Giersig <RGi...@cp...> wrote: > Clarissa Cook wrote: > > I just installed Expect and IO::Tty, IO::Pty on Solaris 9. When I do > > the "make test" for IO-Tty, I am given the message "Passed 4 of 4 > > tests", however, test 2 gives a warning: > > > > Checking if child gets pty as controlling terminal... > > ... > > trying to I_PUSH ttcompat... > > Use of uninitalized value in ioctl at > > /path/to/build/IO-Tty-1.02/blib/lib/IO/Pty.pm line 119 > > warning: TIOCSCTTY failed, slave might not be set as controlling > > terminal: Invalid argument at > > /path/to/build/IO-Tty-1.02/blib/lib/IO/Pty.pm line 120. > > This is indeed very very strange, as the ioctl() is wrapped in a > if(defined TIOCSCTTY), so this shouldn't be happening. Did the > "perl > Makefile.PL" report something about TIOCSCTTY? I thought it strange too. perl Makefile.PL gives a "- TIOCSCTTY" in the "checking which symbols compile OK" section but that is the only mention of TIOCSCTTY (and - TIOCSCTTY makes perfect sense since it ISN'T defined in Solaris). perl Makefile.PL ends with a "Configuration looks good." > > I ignored this since it "Passed 4 of 4 tests", but when I wrote my > > first program: > > > > $command=Expect->spawn('/usr/bin/telnet', ('1.2.3.4')); > > > > I get the same exact error. > > It's actually more of a warning, depends on the application. If > you're > doing nothing too fancy, it might still work. Oops. Yes, I misspoke. Warning, not error. Actually, my last ditch effort to make things work without any warnings being printed out was to just comment out that section of code (lines 118 - 126). Things _seem_ to be working so far. > Ahem, and you DID read the FAQ about using Telnet with Expect?! I assume you are talking about the problem with telnet not necessarily dying. Yes, I read this. I'm converting a script written in 1997 and in hourly continuous use since then from Tcl/Tk Expect to Perl Expect. Since I already had Perl Expect installed, I figured I would try it and see if I see any problems. I'm assuming that since we have had very few errors since 1997, then I won't encounter any with Perl. I'm willing to accept that I am wrong though. > > I didn't think Solaris used the TIOCSCTTY ioctl (so no wonder > that it > > is unitialized). Am I doing something wrong? If not, is there a > > work-around? > > Very strange indeed... if TIOCSCTTY were not defined, then you > wouldn't > get that error message... Well, that's how I read Pty.pm ... I mean "if (defined TIOCSCTTY)" isn't even advanced Perl. Clarissa __________________________________ Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus |
From: Roland G. <RGi...@cp...> - 2004-01-13 09:43:32
|
Clarissa Cook wrote: > Hello, > > I just installed Expect and IO::Tty, IO::Pty on Solaris 9. When I do > the "make test" for IO-Tty, I am given the message "Passed 4 of 4 > tests", however, test 2 gives a warning: > > Checking if child gets pty as controlling terminal... > ... > trying to I_PUSH ttcompat... > Use of uninitalized value in ioctl at > /path/to/build/IO-Tty-1.02/blib/lib/IO/Pty.pm line 119 > warning: TIOCSCTTY failed, slave might not be set as controlling > terminal: Invalid argument at > /path/to/build/IO-Tty-1.02/blib/lib/IO/Pty.pm line 120. This is indeed very very strange, as the ioctl() is wrapped in a if(defined TIOCSCTTY), so this shouldn't be happening. Did the "perl Makefile.PL" report something about TIOCSCTTY? > I ignored this since it "Passed 4 of 4 tests", but when I wrote my > first program: > > $command=Expect->spawn('/usr/bin/telnet', ('1.2.3.4')); > > I get the same exact error. It's actually more of a warning, depends on the application. If you're doing nothing too fancy, it might still work. Ahem, and you DID read the FAQ about using Telnet with Expect?! > I didn't think Solaris used the TIOCSCTTY ioctl (so no wonder that it > is unitialized). Am I doing something wrong? If not, is there a > work-around? Very strange indeed... if TIOCSCTTY were not defined, then you wouldn't get that error message... Roland -- RGi...@cp... |
From: Clarissa C. <clc...@ya...> - 2004-01-12 23:08:34
|
Hello, I just installed Expect and IO::Tty, IO::Pty on Solaris 9. When I do the "make test" for IO-Tty, I am given the message "Passed 4 of 4 tests", however, test 2 gives a warning: Checking if child gets pty as controlling terminal... ... trying to I_PUSH ttcompat... Use of uninitalized value in ioctl at /path/to/build/IO-Tty-1.02/blib/lib/IO/Pty.pm line 119 warning: TIOCSCTTY failed, slave might not be set as controlling terminal: Invalid argument at /path/to/build/IO-Tty-1.02/blib/lib/IO/Pty.pm line 120. I ignored this since it "Passed 4 of 4 tests", but when I wrote my first program: $command=Expect->spawn('/usr/bin/telnet', ('1.2.3.4')); I get the same exact error. I didn't think Solaris used the TIOCSCTTY ioctl (so no wonder that it is unitialized). Am I doing something wrong? If not, is there a work-around? Thanks, Clarissa __________________________________ Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus |
From: <ra...@in...> - 2003-12-12 04:55:08
|
Hi Roland, Thnak you very much. Actually i was doing this with Expect.pm 1.14. But setting to raw_pty is available in latest version of Expect. So i downloaded Expect.pm 1.15 and started doing after setting the pty to raw ($exp->raw_pty(1)) This worked . Once again thank you verymuch. Regards G V Raju -----Original Message----- From: Roland Giersig [mailto:RGi...@cp...] Sent: Monday, December 08, 2003 3:41 PM To: exp...@li... Subject: Re: [Expectperl-discuss] Catch Control-G Character this might be a problem with tty settings, have you tried setting the pty to raw? ra...@in... wrote: > Here my script is expecting the Control-G character. > > the code is like this: > > ----------------------------------------------------------------------- > unless ($cmd->expect(100,"Press the Enter key to continue.\r^G")) { > print "Expected String Not Came\n"; > } > print $cmd "\r"; > ----------------------------------------------------------------------- > > The spawned program is getting terminated itself, when the expect receives > ^G. > So, i will not be having any control on the spawned programme more. > > Also please let me know any other mailing lists for perl where i can > become member. > > Regards > G V Raju > > > > > -----Original Message----- > From: Mark Devine [mailto:Mar...@Su...] > Sent: 08/Dec/2003 2:59 PM > To: ra...@in... > Cc: exp...@li... > Subject: Re: [Expectperl-discuss] Catch Control-G Character > > > I had this proble trying to catch ctrl+x. I overcame it by using the > keycode for ctrl+x (030) > Here is the section in question. The ctrl+x had to be sent when the word > Size appeared during the boot process: > unless($session->expect(20, "Size:")) { > &clean_up; > } > $session->send("\030"); > unless($session->expect(20, ">")) { > &clean_up; > } > the keycodes can be gotten from the man pages of ascii > > ra...@in... wrote: > >>Hai all, >> >>I am writing one perl expect script to expect a pattern having Control-G >>character >>like "Press Enter To Continue \r^G". >>Once I expect the above pattern, I should send "\r". >> >>But, Once the handler encounter the ^G the spawned programme is getting >>killed. >>How to come out of this problem? >> >>Please suggest me some solution. >> >>Thanks and Regards >>G V Raju >> >> >>------------------------------------------------------------------------ >> >> > > -----------------------------------DISCLAIMER------------------------------- > --------------------------------- > >>This Message and any attachments (the "message") is intended solely for > > the addressees and is confidential. If you receive this message in error, > >>please delete it and immediately notify the sender. Any use not in accord > > with its purpose, any dissemination or disclosure, either whole or partial, > >>is prohibited except formal approval. The internet cannot guarantee the > > integrity of this message. INGVysya Bank (and its subsidiaries) shall (will) > not > >>therefore be liable for the message if modified. > > > > ------------------------------------------------------------------------ > > -----------------------------------DISCLAIMER------------------------------- --------------------------------- > > This Message and any attachments (the "message") is intended solely for the addressees and is confidential. If you receive this message in error, > please delete it and immediately notify the sender. Any use not in accord with its purpose, any dissemination or disclosure, either whole or partial, > is prohibited except formal approval. The internet cannot guarantee the integrity of this message. INGVysya Bank (and its subsidiaries) shall (will) not > therefore be liable for the message if modified. ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ Expectperl-discuss mailing list Exp...@li... https://lists.sourceforge.net/lists/listinfo/expectperl-discuss |
From: <ra...@in...> - 2003-12-12 04:51:57
|
Hi Mark, Thank you very much. This had helped me lot, in getting the pattern being matched. Regards G V Raju -----Original Message----- From: Mark Devine [mailto:Mar...@Su...] Sent: Monday, December 08, 2003 4:14 PM To: ra...@in... Cc: exp...@li... Subject: Re: [Expectperl-discuss] Catch Control-G Character Also its a good idea to set trace before the expect statement and close the trace afterwards. They you can see what is being matched. $cmd->exp_internal(1) to open trace and $cmd->exp_internal(0) to close it ra...@in... wrote: > Here my script is expecting the Control-G character. > > the code is like this: > > ----------------------------------------------------------------------- > unless ($cmd->expect(100,"Press the Enter key to continue.\r^G")) { > print "Expected String Not Came\n"; > } > print $cmd "\r"; > ----------------------------------------------------------------------- > > The spawned program is getting terminated itself, when the expect receives > ^G. > So, i will not be having any control on the spawned programme more. > > Also please let me know any other mailing lists for perl where i can > become member. > > Regards > G V Raju > > > > > -----Original Message----- > From: Mark Devine [mailto:Mar...@Su...] > Sent: 08/Dec/2003 2:59 PM > To: ra...@in... > Cc: exp...@li... > Subject: Re: [Expectperl-discuss] Catch Control-G Character > > > I had this proble trying to catch ctrl+x. I overcame it by using the > keycode for ctrl+x (030) > Here is the section in question. The ctrl+x had to be sent when the word > Size appeared during the boot process: > unless($session->expect(20, "Size:")) { > &clean_up; > } > $session->send("\030"); > unless($session->expect(20, ">")) { > &clean_up; > } > the keycodes can be gotten from the man pages of ascii > > ra...@in... wrote: > >>Hai all, >> >>I am writing one perl expect script to expect a pattern having Control-G >>character >>like "Press Enter To Continue \r^G". >>Once I expect the above pattern, I should send "\r". >> >>But, Once the handler encounter the ^G the spawned programme is getting >>killed. >>How to come out of this problem? >> >>Please suggest me some solution. >> >>Thanks and Regards >>G V Raju >> >> >>------------------------------------------------------------------------ >> >> > > -----------------------------------DISCLAIMER------------------------------- > --------------------------------- > >>This Message and any attachments (the "message") is intended solely for > > the addressees and is confidential. If you receive this message in error, > >>please delete it and immediately notify the sender. Any use not in accord > > with its purpose, any dissemination or disclosure, either whole or partial, > >>is prohibited except formal approval. The internet cannot guarantee the > > integrity of this message. INGVysya Bank (and its subsidiaries) shall (will) > not > >>therefore be liable for the message if modified. > > > > ------------------------------------------------------------------------ > > -----------------------------------DISCLAIMER------------------------------- --------------------------------- > > This Message and any attachments (the "message") is intended solely for the addressees and is confidential. If you receive this message in error, > please delete it and immediately notify the sender. Any use not in accord with its purpose, any dissemination or disclosure, either whole or partial, > is prohibited except formal approval. The internet cannot guarantee the integrity of this message. INGVysya Bank (and its subsidiaries) shall (will) not > therefore be liable for the message if modified. |
From: <ra...@in...> - 2003-12-09 10:11:03
|
This did not work. I tried already. Regards G V Raju -----Original Message----- From: Mark Devine [mailto:Mar...@Su...] Sent: 08/Dec/2003 4:11 PM To: ra...@in... Subject: Re: [Expectperl-discuss] Catch Control-G Character Don't expect for the whole line (its not needed). Try: unless ($cmd->expect(100,"Press the Enter key")) { > print "Expected String Not Came\n"; > } > print $cmd "\r"; ra...@in... wrote: > Here my script is expecting the Control-G character. > > the code is like this: > > ----------------------------------------------------------------------- > unless ($cmd->expect(100,"Press the Enter key to continue.\r^G")) { > print "Expected String Not Came\n"; > } > print $cmd "\r"; > ----------------------------------------------------------------------- > > The spawned program is getting terminated itself, when the expect receives > ^G. > So, i will not be having any control on the spawned programme more. > > Also please let me know any other mailing lists for perl where i can > become member. > > Regards > G V Raju > > > > > -----Original Message----- > From: Mark Devine [mailto:Mar...@Su...] > Sent: 08/Dec/2003 2:59 PM > To: ra...@in... > Cc: exp...@li... > Subject: Re: [Expectperl-discuss] Catch Control-G Character > > > I had this proble trying to catch ctrl+x. I overcame it by using the > keycode for ctrl+x (030) > Here is the section in question. The ctrl+x had to be sent when the word > Size appeared during the boot process: > unless($session->expect(20, "Size:")) { > &clean_up; > } > $session->send("\030"); > unless($session->expect(20, ">")) { > &clean_up; > } > the keycodes can be gotten from the man pages of ascii > > ra...@in... wrote: > >>Hai all, >> >>I am writing one perl expect script to expect a pattern having Control-G >>character >>like "Press Enter To Continue \r^G". >>Once I expect the above pattern, I should send "\r". >> >>But, Once the handler encounter the ^G the spawned programme is getting >>killed. >>How to come out of this problem? >> >>Please suggest me some solution. >> >>Thanks and Regards >>G V Raju >> >> >>------------------------------------------------------------------------ >> >> > > -----------------------------------DISCLAIMER------------------------------- > --------------------------------- > >>This Message and any attachments (the "message") is intended solely for > > the addressees and is confidential. If you receive this message in error, > >>please delete it and immediately notify the sender. Any use not in accord > > with its purpose, any dissemination or disclosure, either whole or partial, > >>is prohibited except formal approval. The internet cannot guarantee the > > integrity of this message. INGVysya Bank (and its subsidiaries) shall (will) > not > >>therefore be liable for the message if modified. > > > > ------------------------------------------------------------------------ > > -----------------------------------DISCLAIMER------------------------------- --------------------------------- > > This Message and any attachments (the "message") is intended solely for the addressees and is confidential. If you receive this message in error, > please delete it and immediately notify the sender. Any use not in accord with its purpose, any dissemination or disclosure, either whole or partial, > is prohibited except formal approval. The internet cannot guarantee the integrity of this message. INGVysya Bank (and its subsidiaries) shall (will) not > therefore be liable for the message if modified. |
From: Roland G. <RGi...@cp...> - 2003-12-09 09:30:53
|
*sigh* Sita Tangirala wrote: > Hi, > > I have two linux accounts(say a1 and a2). My task is to > - ssh to a2 from a1 > - get a backup of a2 and dump it to a file > - ftp that file from a2 to a1 just to give you a different point of view... :o) no, your task is to produce a backup on a2 and to transfer it to a1. note the difference, you don't necessarily have to use ssh or ftp to do that. neither is it necessary to start the transfer from a1. > My perl script is present on a1. It calls the expect script.They are as > follows: > > #!/usr/bin/perl > $b=`date | cut -d':' -f3 | cut -d' ' -f1`; > $file="file"."".$b; > print $file; > print `./sample $file`; how about rewriting that (and the following script): #!/bin/sh file=`date +backup-a2-%Y%m%d-%H%M%S.dmp` ssh xxx.nebraska.edu mysqldump --user=xxx --password=yyy mydb > $file scp xxx.nebraska.edu:$file . voila! just set up proper public-key-authentication for ssh. or how about adding this script to crontab on a2: #!/bin/sh file=`date +backup-a2-%Y%m%d-%H%M%S.dmp` mysqldump --user=xxx --password=yyy mydb > $file scp $file a1:. remember: TIMTOWTDI > #! /usr/bin/expect -f > spawn ssh xxx.nebraska.edu > expect "xxx.nebraska.edu's password:" > send "yyy\n" > expect "#" > send "mysqldump --user=xxx --password=yyy mydb > $argv\n" > expect "#" > spawn ftp xxx.nebraska.edu > expect "Name:" > send "sita" > expect "Password:" > send "yyy" > expect "ftp>" > send "mput $argv\n" > expect "mput $argv? " > send "yes\r" > expect "ftp>" > send "bye" > expect "#" > > Everything works fine but for some reason it cannot locate the file on > a2 in which I have the dump and the one which I want to ftp back to a1. > > It says ....Local:cannot find such a file or directory > > I have no clue as to what's happening because I can see that file on a2. works as designed... *g* how about using "mget" to retrieve the file? ;o) > Is it the problem with the concatenation that I made in my perl script? > Please let me know. > > Thanks, > Sita. > |
From: Sita T. <tan...@ho...> - 2003-12-09 08:17:54
|
Hi, I have two linux accounts(say a1 and a2). My task is to - ssh to a2 from a1 - get a backup of a2 and dump it to a file - ftp that file from a2 to a1 My perl script is present on a1. It calls the expect script.They are as follows: #!/usr/bin/perl $b=`date | cut -d':' -f3 | cut -d' ' -f1`; $file="file"."".$b; print $file; print `./sample $file`; #! /usr/bin/expect -f spawn ssh xxx.nebraska.edu expect "xxx.nebraska.edu's password:" send "yyy\n" expect "#" send "mysqldump --user=xxx --password=yyy mydb > $argv\n" expect "#" spawn ftp xxx.nebraska.edu expect "Name:" send "sita" expect "Password:" send "yyy" expect "ftp>" send "mput $argv\n" expect "mput $argv? " send "yes\r" expect "ftp>" send "bye" expect "#" Everything works fine but for some reason it cannot locate the file on a2 in which I have the dump and the one which I want to ftp back to a1. It says ....Local:cannot find such a file or directory I have no clue as to what's happening because I can see that file on a2. Is it the problem with the concatenation that I made in my perl script? Please let me know. Thanks, Sita. _________________________________________________________________ Wonder if the latest virus has gotten to your computer? Find out. Run the FREE McAfee online computer scan! http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 |
From: Mark D. <Mar...@Su...> - 2003-12-08 10:44:11
|
Also its a good idea to set trace before the expect statement and close the trace afterwards. They you can see what is being matched. $cmd->exp_internal(1) to open trace and $cmd->exp_internal(0) to close it ra...@in... wrote: > Here my script is expecting the Control-G character. > > the code is like this: > > ----------------------------------------------------------------------- > unless ($cmd->expect(100,"Press the Enter key to continue.\r^G")) { > print "Expected String Not Came\n"; > } > print $cmd "\r"; > ----------------------------------------------------------------------- > > The spawned program is getting terminated itself, when the expect receives > ^G. > So, i will not be having any control on the spawned programme more. > > Also please let me know any other mailing lists for perl where i can > become member. > > Regards > G V Raju > > > > > -----Original Message----- > From: Mark Devine [mailto:Mar...@Su...] > Sent: 08/Dec/2003 2:59 PM > To: ra...@in... > Cc: exp...@li... > Subject: Re: [Expectperl-discuss] Catch Control-G Character > > > I had this proble trying to catch ctrl+x. I overcame it by using the > keycode for ctrl+x (030) > Here is the section in question. The ctrl+x had to be sent when the word > Size appeared during the boot process: > unless($session->expect(20, "Size:")) { > &clean_up; > } > $session->send("\030"); > unless($session->expect(20, ">")) { > &clean_up; > } > the keycodes can be gotten from the man pages of ascii > > ra...@in... wrote: > >>Hai all, >> >>I am writing one perl expect script to expect a pattern having Control-G >>character >>like "Press Enter To Continue \r^G". >>Once I expect the above pattern, I should send "\r". >> >>But, Once the handler encounter the ^G the spawned programme is getting >>killed. >>How to come out of this problem? >> >>Please suggest me some solution. >> >>Thanks and Regards >>G V Raju >> >> >>------------------------------------------------------------------------ >> >> > > -----------------------------------DISCLAIMER------------------------------- > --------------------------------- > >>This Message and any attachments (the "message") is intended solely for > > the addressees and is confidential. If you receive this message in error, > >>please delete it and immediately notify the sender. Any use not in accord > > with its purpose, any dissemination or disclosure, either whole or partial, > >>is prohibited except formal approval. The internet cannot guarantee the > > integrity of this message. INGVysya Bank (and its subsidiaries) shall (will) > not > >>therefore be liable for the message if modified. > > > > ------------------------------------------------------------------------ > > -----------------------------------DISCLAIMER---------------------------------------------------------------- > > This Message and any attachments (the "message") is intended solely for the addressees and is confidential. If you receive this message in error, > please delete it and immediately notify the sender. Any use not in accord with its purpose, any dissemination or disclosure, either whole or partial, > is prohibited except formal approval. The internet cannot guarantee the integrity of this message. INGVysya Bank (and its subsidiaries) shall (will) not > therefore be liable for the message if modified. |
From: Roland G. <RGi...@cp...> - 2003-12-08 10:10:43
|
this might be a problem with tty settings, have you tried setting the pty to raw? ra...@in... wrote: > Here my script is expecting the Control-G character. > > the code is like this: > > ----------------------------------------------------------------------- > unless ($cmd->expect(100,"Press the Enter key to continue.\r^G")) { > print "Expected String Not Came\n"; > } > print $cmd "\r"; > ----------------------------------------------------------------------- > > The spawned program is getting terminated itself, when the expect receives > ^G. > So, i will not be having any control on the spawned programme more. > > Also please let me know any other mailing lists for perl where i can > become member. > > Regards > G V Raju > > > > > -----Original Message----- > From: Mark Devine [mailto:Mar...@Su...] > Sent: 08/Dec/2003 2:59 PM > To: ra...@in... > Cc: exp...@li... > Subject: Re: [Expectperl-discuss] Catch Control-G Character > > > I had this proble trying to catch ctrl+x. I overcame it by using the > keycode for ctrl+x (030) > Here is the section in question. The ctrl+x had to be sent when the word > Size appeared during the boot process: > unless($session->expect(20, "Size:")) { > &clean_up; > } > $session->send("\030"); > unless($session->expect(20, ">")) { > &clean_up; > } > the keycodes can be gotten from the man pages of ascii > > ra...@in... wrote: > >>Hai all, >> >>I am writing one perl expect script to expect a pattern having Control-G >>character >>like "Press Enter To Continue \r^G". >>Once I expect the above pattern, I should send "\r". >> >>But, Once the handler encounter the ^G the spawned programme is getting >>killed. >>How to come out of this problem? >> >>Please suggest me some solution. >> >>Thanks and Regards >>G V Raju >> >> >>------------------------------------------------------------------------ >> >> > > -----------------------------------DISCLAIMER------------------------------- > --------------------------------- > >>This Message and any attachments (the "message") is intended solely for > > the addressees and is confidential. If you receive this message in error, > >>please delete it and immediately notify the sender. Any use not in accord > > with its purpose, any dissemination or disclosure, either whole or partial, > >>is prohibited except formal approval. The internet cannot guarantee the > > integrity of this message. INGVysya Bank (and its subsidiaries) shall (will) > not > >>therefore be liable for the message if modified. > > > > ------------------------------------------------------------------------ > > -----------------------------------DISCLAIMER---------------------------------------------------------------- > > This Message and any attachments (the "message") is intended solely for the addressees and is confidential. If you receive this message in error, > please delete it and immediately notify the sender. Any use not in accord with its purpose, any dissemination or disclosure, either whole or partial, > is prohibited except formal approval. The internet cannot guarantee the integrity of this message. INGVysya Bank (and its subsidiaries) shall (will) not > therefore be liable for the message if modified. |
From: <ra...@in...> - 2003-12-08 10:07:39
|
Here my script is expecting the Control-G character. the code is like this: ----------------------------------------------------------------------- unless ($cmd->expect(100,"Press the Enter key to continue.\r^G")) { print "Expected String Not Came\n"; } print $cmd "\r"; ----------------------------------------------------------------------- The spawned program is getting terminated itself, when the expect receives ^G. So, i will not be having any control on the spawned programme more. Also please let me know any other mailing lists for perl where i can become member. Regards G V Raju -----Original Message----- From: Mark Devine [mailto:Mar...@Su...] Sent: 08/Dec/2003 2:59 PM To: ra...@in... Cc: exp...@li... Subject: Re: [Expectperl-discuss] Catch Control-G Character I had this proble trying to catch ctrl+x. I overcame it by using the keycode for ctrl+x (030) Here is the section in question. The ctrl+x had to be sent when the word Size appeared during the boot process: unless($session->expect(20, "Size:")) { &clean_up; } $session->send("\030"); unless($session->expect(20, ">")) { &clean_up; } the keycodes can be gotten from the man pages of ascii ra...@in... wrote: > Hai all, > > I am writing one perl expect script to expect a pattern having Control-G > character > like "Press Enter To Continue \r^G". > Once I expect the above pattern, I should send "\r". > > But, Once the handler encounter the ^G the spawned programme is getting > killed. > How to come out of this problem? > > Please suggest me some solution. > > Thanks and Regards > G V Raju > > > ------------------------------------------------------------------------ > > -----------------------------------DISCLAIMER------------------------------- --------------------------------- > > This Message and any attachments (the "message") is intended solely for the addressees and is confidential. If you receive this message in error, > please delete it and immediately notify the sender. Any use not in accord with its purpose, any dissemination or disclosure, either whole or partial, > is prohibited except formal approval. The internet cannot guarantee the integrity of this message. INGVysya Bank (and its subsidiaries) shall (will) not > therefore be liable for the message if modified. |
From: Mark D. <Mar...@Su...> - 2003-12-08 09:28:59
|
I had this proble trying to catch ctrl+x. I overcame it by using the keycode for ctrl+x (030) Here is the section in question. The ctrl+x had to be sent when the word Size appeared during the boot process: unless($session->expect(20, "Size:")) { &clean_up; } $session->send("\030"); unless($session->expect(20, ">")) { &clean_up; } the keycodes can be gotten from the man pages of ascii ra...@in... wrote: > Hai all, > > I am writing one perl expect script to expect a pattern having Control-G > character > like "Press Enter To Continue \r^G". > Once I expect the above pattern, I should send "\r". > > But, Once the handler encounter the ^G the spawned programme is getting > killed. > How to come out of this problem? > > Please suggest me some solution. > > Thanks and Regards > G V Raju > > > ------------------------------------------------------------------------ > > -----------------------------------DISCLAIMER---------------------------------------------------------------- > > This Message and any attachments (the "message") is intended solely for the addressees and is confidential. If you receive this message in error, > please delete it and immediately notify the sender. Any use not in accord with its purpose, any dissemination or disclosure, either whole or partial, > is prohibited except formal approval. The internet cannot guarantee the integrity of this message. INGVysya Bank (and its subsidiaries) shall (will) not > therefore be liable for the message if modified. |
From: <ra...@in...> - 2003-12-08 07:43:05
|
Hai all, I am writing one perl expect script to expect a pattern having Control-G character like "Press Enter To Continue \r^G". Once I expect the above pattern, I should send "\r". But, Once the handler encounter the ^G the spawned programme is getting killed. How to come out of this problem? Please suggest me some solution. Thanks and Regards G V Raju |
From: Andrew C. <an...@xt...> - 2003-12-04 20:06:38
|
Try using the keycode for enter instead of "\r". I think it's 013. Cheers, Andrew On Thu, 2003-12-04 at 23:29, Mark Devine wrote: > In regular (tcl) expect the following code waits for the user to enter > a password followed by enter and then returns to the script: > > expect "Password:" > #ask user for password and then return to script > interact -nobuffer -re "(.*)\r" return > > I am having problems writing this in perl expect. I used the following: > $session->expect(60, -re, "Password:"); > $session->interact(\*STDIN, "\r"); > > .. but this does not seem to work. I just get another login request > like the inputted password is not going to the telnet login. Am I > missing something? Can anyone offer any suggestions? |
From: Mark D. <Mar...@Su...> - 2003-12-04 10:29:36
|
In regular (tcl) expect the following code waits for the user to enter a password followed by enter and then returns to the script: expect "Password:" #ask user for password and then return to script interact -nobuffer -re "(.*)\r" return I am having problems writing this in perl expect. I used the following: $session->expect(60, -re, "Password:"); $session->interact(\*STDIN, "\r"); .. but this does not seem to work. I just get another login request like the inputted password is not going to the telnet login. Am I missing something? Can anyone offer any suggestions? |
From: anthony <ac...@op...> - 2003-12-02 18:19:09
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Thanks.. I commented this line out ( #$obj->slave->stty(qw(raw - -echo)); ) and now it's working as expected for both the Fsecure boxes and the one Openssh/Aix jump_box. Also doesn't seem to bother the boxes that were working since I'm using $obj->raw_pty(0); as well. ~From snifs on the script side I see the push of the pw and ack back and then nothing else. Roland Giersig wrote: | This is probably some oddity due to switching the tty modes on the | remote side pty for password entry. I don't think it's on the machine | where the Expect script is running. But you could try to find that | out, just have a packet sniffer running in the background and check | if there is a return packet after sending the password or if the | loginprompt gets returned only after you sent the first command... | | Hope this helps, | | Roland | | anthony wrote: | |> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 |> |> Using pix to get configs for multiple types of devices ( pix, |> nokias, etc ). Many devices are behind jump boxes so I log on to |> those first and then ssh to the network/target device. For some |> jump boxes after I send the target password I get no data back. |> Expect sit at "Waiting for new data" |> |> Now if I expect on nothing ( .* ) and send the next command ( en ) |> I then see the data I would have expected to see in the previous |> send/expect routine. I've tried different sleep steps, clearing the |> accumulater etc..... |> |> This was only with a few particular FSecure ssh daemons but it just |> happened with an openssh jump_box that was working fine before. |> |> Any suggestions? The code work as expected for other jump_boxes |> and pix devices. I guess I should try using a working jump_box to |> the same "problematic" pix to rule out if it's the jump_box or the |> pix..... |> |> |> - -- |> |> acqant |> |> What's in your Sendmail queue? |> |> http://qparser.sourceforge.net |> |> |> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) |> |> iD8DBQE/zKb/eDVHAE9jNDwRAmyCAKC/AuI4jLV/uwKECiSgnA1JxcoJ3gCdHMkP |> 6rq1HmqvT7Uuf33Gre3ahhA= =8DTn -----END PGP SIGNATURE----- |> |> |> |> |> ------------------------------------------------------- This SF.net |> email is sponsored by: SF.net Giveback Program. Does |> SourceForge.net help you be more productive? Does it help you |> create better code? SHARE THE LOVE, and help us help YOU! Click |> Here: http://sourceforge.net/donate/ |> _______________________________________________ Expectperl-discuss |> mailing list Exp...@li... |> https://lists.sourceforge.net/lists/listinfo/expectperl-discuss |> | | | - -- acqant What's in your Sendmail queue? http://qparser.sourceforge.net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQE/zNdueDVHAE9jNDwRAie+AKCiZ817jq3xFzZBPpvVDlopSFiqxACfYiVn K2pXCHsskE1me2oYZMuKv1o= =tOy9 -----END PGP SIGNATURE----- |
From: Roland G. <RGi...@cp...> - 2003-12-02 16:24:28
|
This is probably some oddity due to switching the tty modes on the remote side pty for password entry. I don't think it's on the machine where the Expect script is running. But you could try to find that out, just have a packet sniffer running in the background and check if there is a return packet after sending the password or if the loginprompt gets returned only after you sent the first command... Hope this helps, Roland anthony wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Using pix to get configs for multiple types of devices ( pix, nokias, > etc ). Many devices are behind jump boxes so I log on to those first > and then ssh to the network/target device. For some jump boxes after I > send the target password I get no data back. Expect sit at > "Waiting for new data" > > Now if I expect on nothing ( .* ) and send the next command ( en ) I > then see the data I would have expected to see in the previous > send/expect routine. > I've tried different sleep steps, clearing the accumulater etc..... > > This was only with a few particular FSecure ssh daemons but it just > happened with an openssh jump_box that was working fine before. > > Any suggestions? The code work as expected for other jump_boxes and pix > devices. I guess I should try using a working jump_box to the same > "problematic" pix to rule out if it's the jump_box or the pix..... > > > - -- > > acqant > > What's in your Sendmail queue? > > http://qparser.sourceforge.net > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.3 (GNU/Linux) > > iD8DBQE/zKb/eDVHAE9jNDwRAmyCAKC/AuI4jLV/uwKECiSgnA1JxcoJ3gCdHMkP > 6rq1HmqvT7Uuf33Gre3ahhA= > =8DTn > -----END PGP SIGNATURE----- > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > |