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: Bryan B. <br...@bu...> - 2008-12-19 14:46:53
|
> Hi all, > > I want to install IO::Tty for Expect in solaris 5.8.But it needs > compilation and requires gcc compiler. > Here iam looking for a perl with inbuilt gcc compiler . > i dont want to go for seperate gcc installation as my user space is very > less for gcc installation.so is there any other way which can make this > installation successful. > Please let me know. > > Thanks in Advance. > > Regards, > :) > If you have access to a similar box with development tools on you can always relocate the module with something like this: perl -MFile::Find -e ' find(sub{ print $File::Find::name ."\n" if /Tty/}, @INC);' | \ tar cvf Tty.tar -T - Then extract the tar file Tty.tar on another box. I think thats all you need, but someone can probably chime in if its missing something. If you truly do not have any access to build this, you can use the pre-built ones I have from my project page: http://sourceforge.net/project/showfiles.php?group_id=118999 Get the Rover Binary Expect package, and in it I have pre-built IO::Tty v1.07. You can strip out the IO::Pty and Expect that is included because they are really old. I have two sun platforms in this package: i86pc-solaris-64int and sun4-solaris-64int. Hope that helps. Bryan Bueter http://sourceforge.net/projects/rover |
From: <so...@gm...> - 2008-12-19 12:09:56
|
Hi all, I want to install IO::Tty for Expect in solaris 5.8.But it needs compilation and requires gcc compiler. Here iam looking for a perl with inbuilt gcc compiler . i dont want to go for seperate gcc installation as my user space is very less for gcc installation.so is there any other way which can make this installation successful. Please let me know. Thanks in Advance. Regards, :) |
From: Robin L. P. <rlp...@di...> - 2008-12-12 20:07:33
|
On Fri, Dec 12, 2008 at 11:17:55AM -0500, Bryan Bueter wrote: > Ok i think i fixed your issue, which appears to be a termcap > problem. Try running any one of your scripts, but change your > TERM environment variable to one of vt220, linux, putty, sun, > cygwin, or asni (looks like crap but works) and you should be > fine. Well spank my ass and call me charlie! I tried TERM=vt100 and then pretty much gave up on that line of inquiry. That's *great*! Thank you so much! -Robin -- They say: "The first AIs will be built by the military as weapons." And I'm thinking: "Does it even occur to you to try for something other than the default outcome?" -- http://shorl.com/tydruhedufogre http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/ |
From: Bryan B. <br...@bu...> - 2008-12-12 16:18:08
|
> On Fri, Dec 12, 2008 at 08:46:45AM -0500, Bryan Bueter wrote: >> As for running mutt through expect, it seems to ignore everything >> i send, even if I just try and open it up quit. So I dont think >> there is actually anything wrong with what your sending, just how >> its being interpreted by mutt. > > Mutt works just fine seding "j" keys; you have to expect something > to see the updates though. > > How about this; I've got an example that uses "less", which pretty > much everybody should have. Run: > > seq 1 500 >/tmp/crap > > Then try this code: > > - ---------------------- > > #!/usr/bin/perl > > use warnings; > use strict; > > use Expect; > > my $timeout = 5; > > $Expect::Log_Stdout = 1; > #$Expect::Debug = 1; > #$Expect::Exp_Internal = 1; > > my $exp; > > $exp = new Expect (); > > $exp->raw_pty(1); > > $exp = Expect->spawn("/usr/bin/less", "/tmp/crap") or die "Cannot spawn > client: $!\n"; > > $exp->log_file( "/tmp/exp.out", "w" ); > > $exp->expect($timeout, "crap" ); > print "done expect.\n"; > > $exp->send("\c[[B"); > $exp->send("\c[[B"); > $exp->send("\e[B"); > > $exp->expect($timeout, "26" ); > > sleep 5; > > print "done arrows.\n"; > > $exp->send("j"); > $exp->send("j"); > $exp->send("j"); > sleep 5; > > $exp->expect($timeout, "26" ); > > $exp->send("q"); > sleep 5; > > $exp->expect($timeout, "crap" ); > > print "Done sending.\n"; > > - ---------------------- > > As you can see, the arrow keys do nothing, but the j keys work just > fine. > > -Robin Ok i think i fixed your issue, which appears to be a termcap problem. Try running any one of your scripts, but change your TERM environment variable to one of vt220, linux, putty, sun, cygwin, or asni (looks like crap but works) and you should be fine. There are probably more, but those are the ones i tested that worked. Hope that helps. Bryan Bueter http://sourceforge.net/projects/rover |
From: Robin L. P. <rlp...@di...> - 2008-12-12 14:20:59
|
On Fri, Dec 12, 2008 at 08:46:45AM -0500, Bryan Bueter wrote: > As for running mutt through expect, it seems to ignore everything > i send, even if I just try and open it up quit. So I dont think > there is actually anything wrong with what your sending, just how > its being interpreted by mutt. Mutt works just fine seding "j" keys; you have to expect something to see the updates though. How about this; I've got an example that uses "less", which pretty much everybody should have. Run: seq 1 500 >/tmp/crap Then try this code: - ---------------------- #!/usr/bin/perl use warnings; use strict; use Expect; my $timeout = 5; $Expect::Log_Stdout = 1; #$Expect::Debug = 1; #$Expect::Exp_Internal = 1; my $exp; $exp = new Expect (); $exp->raw_pty(1); $exp = Expect->spawn("/usr/bin/less", "/tmp/crap") or die "Cannot spawn client: $!\n"; $exp->log_file( "/tmp/exp.out", "w" ); $exp->expect($timeout, "crap" ); print "done expect.\n"; $exp->send("\c[[B"); $exp->send("\c[[B"); $exp->send("\e[B"); $exp->expect($timeout, "26" ); sleep 5; print "done arrows.\n"; $exp->send("j"); $exp->send("j"); $exp->send("j"); sleep 5; $exp->expect($timeout, "26" ); $exp->send("q"); sleep 5; $exp->expect($timeout, "crap" ); print "Done sending.\n"; - ---------------------- As you can see, the arrow keys do nothing, but the j keys work just fine. -Robin -- They say: "The first AIs will be built by the military as weapons." And I'm thinking: "Does it even occur to you to try for something other than the default outcome?" -- http://shorl.com/tydruhedufogre http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/ |
From: Bryan B. <br...@bu...> - 2008-12-12 13:46:58
|
> On Thu, Dec 11, 2008 at 03:53:11PM -0500, Bryan Bueter wrote: >> > On Fri, Dec 05, 2008 at 08:52:46PM -0800, Robin Lee Powell wrote: >> >> >> >> I'm trying to send arrow keys to a curses app of mine. Rather >> >> than distributing that app, here's an example using "mutt", which >> >> is fairly common: >> > >> > No-one knows how to send arrows to curses apps in Expect? >> > >> > -Robin >> > >> >> By my reckoning, you have your string incorrect. The following should >> be >> arrow keys: >> >> $up = "\c[[A"; >> $down = "\c[[B"; >> $left = "\c[[D"; >> $right = "\c[[C"; >> >> and not "\e[[B"; > > I wasn't sending \e[[B, I was sending \e[B. > > \e == \c[ (that is, ESC is the same as ^[; I actually use ctrl-[ at > the keyboard most of the time to send ESC). > > I did explicitely try $exp->send("\c[[B");, though. No change > (i.e., nothing happens). > > -Robin > Yes, i see that now. When i type: cat > test.txt Then hit the arrow key it gives me control+[[B, thats why i suggested that and not escape+[B. And i pulled \e[[B from my memory of your previous e-mail, not from the e-mail itself. So my apologies. As for running mutt through expect, it seems to ignore everything i send, even if I just try and open it up quit. So I dont think there is actually anything wrong with what your sending, just how its being interpreted by mutt. Bryan Bueter http://sourceforge.net/projects/rover |
From: John S. <joh...@ch...> - 2008-12-12 13:32:49
|
I have several PERL scripts which I use to connect Cisco routers via telnet but I ran into trouble developing one that connects via SSH. After doing extensive research, I was lead to Expect.pm and this forum. As I have never done anything with Expect, I was hoping that someone could possibly give me an example script to connect to a Cisco router via SSH so I could have a solid starting point? Thank you if you can. john |
From: Robin L. P. <rlp...@di...> - 2008-12-12 12:16:09
|
On Thu, Dec 11, 2008 at 03:53:11PM -0500, Bryan Bueter wrote: > > On Fri, Dec 05, 2008 at 08:52:46PM -0800, Robin Lee Powell wrote: > >> > >> I'm trying to send arrow keys to a curses app of mine. Rather > >> than distributing that app, here's an example using "mutt", which > >> is fairly common: > > > > No-one knows how to send arrows to curses apps in Expect? > > > > -Robin > > > > By my reckoning, you have your string incorrect. The following should be > arrow keys: > > $up = "\c[[A"; > $down = "\c[[B"; > $left = "\c[[D"; > $right = "\c[[C"; > > and not "\e[[B"; I wasn't sending \e[[B, I was sending \e[B. \e == \c[ (that is, ESC is the same as ^[; I actually use ctrl-[ at the keyboard most of the time to send ESC). I did explicitely try $exp->send("\c[[B");, though. No change (i.e., nothing happens). -Robin -- They say: "The first AIs will be built by the military as weapons." And I'm thinking: "Does it even occur to you to try for something other than the default outcome?" -- http://shorl.com/tydruhedufogre http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/ |
From: Bryan B. <br...@bu...> - 2008-12-12 09:06:50
|
> On Fri, Dec 05, 2008 at 08:52:46PM -0800, Robin Lee Powell wrote: >> >> I'm trying to send arrow keys to a curses app of mine. Rather >> than distributing that app, here's an example using "mutt", which >> is fairly common: > > No-one knows how to send arrows to curses apps in Expect? > > -Robin > By my reckoning, you have your string incorrect. The following should be arrow keys: $up = "\c[[A"; $down = "\c[[B"; $left = "\c[[D"; $right = "\c[[C"; and not "\e[[B"; Hope that helps. Bryan Bueter http://sourceforge.net/project/rover |
From: Robin L. P. <rlp...@di...> - 2008-12-11 18:55:52
|
On Fri, Dec 05, 2008 at 08:52:46PM -0800, Robin Lee Powell wrote: > > I'm trying to send arrow keys to a curses app of mine. Rather > than distributing that app, here's an example using "mutt", which > is fairly common: No-one knows how to send arrows to curses apps in Expect? -Robin -- They say: "The first AIs will be built by the military as weapons." And I'm thinking: "Does it even occur to you to try for something other than the default outcome?" -- http://shorl.com/tydruhedufogre http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/ |
From: Robin L. P. <rlp...@di...> - 2008-12-11 18:54:43
|
On Fri, Dec 05, 2008 at 06:51:00PM +0000, Shahzad wrote: > > > Hi. I seem to be trying to debug this seemingly simple problem for > a few days now...basically I seem to be running out of buffer > space in perl/expect. > > I connect to a machine using perl/expect. Then I keep sending > different messages without expecting anything, and then after some > period of time the perl/expect script is not able to send any more > messages as it seems to run out of some sort of buffer space. Why not expect something occasionally just to clear the buffer? -Robin -- They say: "The first AIs will be built by the military as weapons." And I'm thinking: "Does it even occur to you to try for something other than the default outcome?" -- http://shorl.com/tydruhedufogre http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/ |
From: Brandon C. <bra...@me...> - 2008-12-11 16:05:48
|
You just made my day! @output = `/mypath/expect_script x.x.x.x`; worked like a champ! Thanks so much! Brandon Carroll bra...@ma... http://www.brandonjcarroll.com http://www.globalconfig.net On Dec 11, 2008, at 3:49 AM, Bradford Ritchie wrote: > What happens when you try > $status = system("/my/path/expect_script x.x.x.x"); > or > @output = `/mypath/expect_script x.x.x.x`; > > > > On Thu, Dec 11, 2008 at 12:01 AM, Brandon Carroll <bra...@me... > > wrote: > I have an expect script as follows: > > spawn telnet X.X.X.X $podport > set timeout 15 > sleep 2 > send $controlZ > send "\r" > > > expect { > "no]:" exit > > ")#" exit > > "#" {send "\r"} > ">" {send "enable\r"} > } > expect { > "Password:" {send "sanfran\r"} > "#" {send "\r"} > } > expect { > "Password:" {send "cisco\r"} > "#" {send "\r"} > } > expect { > "Password" {send "sanjose\r"} > "#" {send "\r"} > } > expect { > "% Bad passwords" exit > "#" {send "wr\r"} > } > expect { > "#" {send "write erase\r"} > } > expect "confirm" > send "\r" > expect "#" > send "reload \r" > expect "Proceed with reload?" > send "\r" > puts "reset of $podport complete\n\n" > exit > > The expect script does exactly what I want it to do, however I cant > seem to figure out how to call it from a perl script. So I think I > may need to re-write it in Expect.pl and if thats the case how do I > express the section: > expect { > "no]:" exit > > ")#" exit > > "#" {send "\r"} > ">" {send "enable\r"} > } > in the Expect.pl? Or, is there an easy way to just tell perl to run > the script? > > Thanks for any help anyone can offer! > Brandon Carroll > bra...@ma... > http://www.brandonjcarroll.com > http://www.globalconfig.net > > > > > > > ------------------------------------------------------------------------------ > SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, > Nevada. > The future of the web can't happen without you. Join us at MIX09 to > help > pave the way to the Next Web now. Learn more and register at > http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > |
From: Bradford R. <bri...@po...> - 2008-12-11 12:18:11
|
What happens when you try $status = system("/my/path/expect_script x.x.x.x"); or @output = `/mypath/expect_script x.x.x.x`; On Thu, Dec 11, 2008 at 12:01 AM, Brandon Carroll <bra...@me...>wrote: > I have an expect script as follows: > > spawn telnet X.X.X.X $podport > set timeout 15 > sleep 2 > send $controlZ > send "\r" > > > expect { > "no]:" exit > > ")#" exit > > "#" {send "\r"} > ">" {send "enable\r"} > } > expect { > "Password:" {send "sanfran\r"} > "#" {send "\r"} > } > expect { > "Password:" {send "cisco\r"} > "#" {send "\r"} > } > expect { > "Password" {send "sanjose\r"} > "#" {send "\r"} > } > expect { > "% Bad passwords" exit > "#" {send "wr\r"} > } > expect { > "#" {send "write erase\r"} > } > expect "confirm" > send "\r" > expect "#" > send "reload \r" > expect "Proceed with reload?" > send "\r" > puts "reset of $podport complete\n\n" > exit > > The expect script does exactly what I want it to do, however I cant > seem to figure out how to call it from a perl script. So I think I > may need to re-write it in Expect.pl and if thats the case how do I > express the section: > expect { > "no]:" exit > > ")#" exit > > "#" {send "\r"} > ">" {send "enable\r"} > } > in the Expect.pl? Or, is there an easy way to just tell perl to run > the script? > > Thanks for any help anyone can offer! > Brandon Carroll > bra...@ma... > http://www.brandonjcarroll.com > http://www.globalconfig.net > > > > > > > > ------------------------------------------------------------------------------ > SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. > The future of the web can't happen without you. Join us at MIX09 to help > pave the way to the Next Web now. Learn more and register at > > http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > |
From: Ken I. <fn...@ua...> - 2008-12-11 05:29:43
|
On Wed, Dec 10, 2008 at 09:01:43PM -0800, Brandon Carroll wrote: > I have an expect script as follows: > > spawn telnet X.X.X.X $podport > set timeout 15 > sleep 2 > send $controlZ > send "\r" > > > expect { > "no]:" exit ... > puts "reset of $podport complete\n\n" > exit > > The expect script does exactly what I want it to do, however I cant > seem to figure out how to call it from a perl script. So I think I > may need to re-write it in Expect.pl and if thats the case how do I > express the section: > expect { > "no]:" exit > > ")#" exit > > "#" {send "\r"} > ">" {send "enable\r"} > } > in the Expect.pl? Or, is there an easy way to just tell perl to run > the script? The system function ought to be able to do that, it just executes a shell command, and I think returns exit status. Or use backticks if you want to grab output from the process. You may need to specify the path to your executable expect script or to expect itself. If you have a full perl distribution help/man pages should be available, e.g., perldoc -f system Ken > > Thanks for any help anyone can offer! > Brandon Carroll > bra...@ma... > http://www.brandonjcarroll.com > http://www.globalconfig.net -- Ken Irving, fn...@ua..., 907-474-6152 Water and Environmental Research Center Institute of Northern Engineering University of Alaska, Fairbanks |
From: Brandon C. <bra...@me...> - 2008-12-11 05:01:49
|
I have an expect script as follows: spawn telnet X.X.X.X $podport set timeout 15 sleep 2 send $controlZ send "\r" expect { "no]:" exit ")#" exit "#" {send "\r"} ">" {send "enable\r"} } expect { "Password:" {send "sanfran\r"} "#" {send "\r"} } expect { "Password:" {send "cisco\r"} "#" {send "\r"} } expect { "Password" {send "sanjose\r"} "#" {send "\r"} } expect { "% Bad passwords" exit "#" {send "wr\r"} } expect { "#" {send "write erase\r"} } expect "confirm" send "\r" expect "#" send "reload \r" expect "Proceed with reload?" send "\r" puts "reset of $podport complete\n\n" exit The expect script does exactly what I want it to do, however I cant seem to figure out how to call it from a perl script. So I think I may need to re-write it in Expect.pl and if thats the case how do I express the section: expect { "no]:" exit ")#" exit "#" {send "\r"} ">" {send "enable\r"} } in the Expect.pl? Or, is there an easy way to just tell perl to run the script? Thanks for any help anyone can offer! Brandon Carroll bra...@ma... http://www.brandonjcarroll.com http://www.globalconfig.net |
From: Robin L. P. <rlp...@di...> - 2008-12-06 04:52:53
|
I'm trying to send arrow keys to a curses app of mine. Rather than distributing that app, here's an example using "mutt", which is fairly common: - ----------- #!/usr/bin/perl use warnings; use strict; use Expect; my $timeout = 20; $Expect::Log_Stdout = 1; #$Expect::Debug = 1; #$Expect::Exp_Internal = 1; my $exp; $exp = new Expect (); $exp->raw_pty(1); $exp = Expect->spawn("/usr/bin/mutt") or die "Cannot spawn client: $!\n"; $exp->expect($timeout, "Mutt:" ); $exp->send("\e[B"); $exp->send("\e[B"); $exp->send("\e[B"); $exp->send("\e[B"); $exp->send("\e[B"); $exp->send("\e[B"); $exp->send("\e[B"); sleep 1; $exp->send("\cl"); sleep 20; print "Done sending.\n"; - ----------- To see it work, mutt will have to be pointing at a mail file/folder that has a few things in it so you can see it trying to scroll down; "-f [file]" may be useful there. \e[B is most definitely what my keyboard is sending, but the expect script causes exactly nothing to happen on the mutt screen. Curses' getch() says that the character's value is "258", but sending chr(258) doesn't help either. Suggestions? -Robin -- They say: "The first AIs will be built by the military as weapons." And I'm thinking: "Does it even occur to you to try for something other than the default outcome?" -- http://shorl.com/tydruhedufogre http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/ |
From: Shahzad <gl...@ho...> - 2008-12-05 18:51:06
|
Hi. I seem to be trying to debug this seemingly simple problem for a few days now...basically I seem to be running out of buffer space in perl/expect. I connect to a machine using perl/expect. Then I keep sending different messages without expecting anything, and then after some period of time the perl/expect script is not able to send any more messages as it seems to run out of some sort of buffer space. For instance if I am sending 1 message per second, I can send message for up to 14 minutes. If I am sending messages at the rate of 1 message every five seconds, the test can run for much longer (as it takes longer to fill up the buffer space). If the message length is longer, then I stop sending the messages much quicker (as the buffer size fills up quickly)....so it seems to be a buffer size related problem. I tried to extend the buffer size using: $ssh->max_accum(9000000000); and I tried to clear the buffer using: $ssh->clear_accum(); but it doesn't seem to help - as the script still stops sending commands after that fixed interval has passed away. I have been working on this problem for a few days now, so any help will be greatly appreciated. _________________________________________________________________ Send e-mail faster without improving your typing skills. http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_speed_122008 |
From: jaimini b. <jai...@gm...> - 2008-12-01 02:49:43
|
Just to add, I am running this script under cygwin. Does this need any special handling. Thanks Jaimin On Sun, Nov 30, 2008 at 8:01 PM, jaimini bhavsar <jai...@gm...>wrote: > Hi Everybody, > > I am trying to automate login/password, to a storage box, Manually I am > able to perform the operation successfully. Using my script I am able to > check that username is asked, and when I send username I do not get the > prompt for password, I tried sending username by succeeding it with "\r", > "\n", "\r\n" but nothing works. > > Highly appriciate if some body can give me some clue on where am I going > wrong. Please find below, debug output from the script. > > Thanks in advace. > Jaimin. > > ========================================== > INFO: Executing delete command > Sending 'delete\n' to spawn id(3) > at /usr/lib/perl5/site_perl/5.10/Expect.pm line 1264 > Expect::print('Expect=GLOB(0x102ce260)', 'delete\x{a}') called at > ./testpsm.pl line 912 > main::psm_delete('manage', '!manage', 'jaimin') called at > ./testpsm.pl line 885 > main::manage(16.83.140.45, 'manage', '!manage', 'delete', > 'jaimin') called at ./testpsm.pl line 985 > Starting EXPECT pattern matching... > at /usr/lib/perl5/site_perl/5.10/Expect.pm line 561 > Expect::expect('Expect=GLOB(0x102ce260)', 1, 'No user login details > available\x{d}\x{a}Enter username and password ...') called at ./testpsm.pl > line 921 > main::psm_delete('manage', '!manage', 'jaimin') called at > ./testpsm.pl line 885 > main::manage(16.83.140.45, 'manage', '!manage', 'delete', > 'jaimin') called at ./testpsm.pl line 985 > spawn id(3): list of patterns: > #1: -ex `No user login details available\r\nEnter username and password > of MSA device to proceed\r\n* Username: ' > > > spawn id(3): Does `' > match: > pattern #1: -ex `No user login details available\r\nEnter username and > password of MSA device to proceed\r\n* Username: '? No. > > No user login details available > Enter username and password of MSA device to proceed > * Username: > spawn id(3): Does `No user login details available\r\nEnter username and > password of MSA device to proceed\r\n* Username: ' > match: > pattern #1: -ex `No user login details available\r\nEnter username and > password of MSA device to proceed\r\n* Username: '? YES!! > Before match string: `' > Match string: `No user login details available\r\nEnter username and > password of MSA device to proceed\r\n* Username: ' > After match string: `' > Matchlist: () > Sending 'manage\r\n' to spawn id(3) > at /usr/lib/perl5/site_perl/5.10/Expect.pm line 1264 > Expect::print('Expect=GLOB(0x102ce260)', 'manage\x{d}\x{a}') called > at ./testpsm.pl line 942 > main::psm_delete('manage', '!manage', 'jaimin') called at > ./testpsm.pl line 885 > main::manage(16.83.140.45, 'manage', '!manage', 'delete', > 'jaimin') called at ./testpsm.pl line 985 > Starting EXPECT pattern matching... > at /usr/lib/perl5/site_perl/5.10/Expect.pm line 561 > Expect::expect('Expect=GLOB(0x102ce260)', 1, '* Password: ') called > at ./testpsm.pl line 952 > main::psm_delete('manage', '!manage', 'jaimin') called at > ./testpsm.pl line 885 > main::manage(16.83.140.45, 'manage', '!manage', 'delete', > 'jaimin') called at ./testpsm.pl line 985 > spawn id(3): list of patterns: > #1: -ex `* Password: ' > > > spawn id(3): Does `' > match: > pattern #1: -ex `* Password: '? No. > > ERROR: psm_delete: Did not prompt for password > debug : should have propmt for password. > Starting EXPECT pattern matching... > at /usr/lib/perl5/site_perl/5.10/Expect.pm line 561 > Expect::expect('Expect=GLOB(0x102ce260)', 0) called at ./testpsm.pl > line 254 > main::syncup() called at ./testpsm.pl line 51 > main::cleanup() called at ./testpsm.pl line 1040 > spawn id(3): list of patterns: > ============================================ > > |
From: jaimini b. <jai...@gm...> - 2008-12-01 02:01:29
|
Hi Everybody, I am trying to automate login/password, to a storage box, Manually I am able to perform the operation successfully. Using my script I am able to check that username is asked, and when I send username I do not get the prompt for password, I tried sending username by succeeding it with "\r", "\n", "\r\n" but nothing works. Highly appriciate if some body can give me some clue on where am I going wrong. Please find below, debug output from the script. Thanks in advace. Jaimin. ========================================== INFO: Executing delete command Sending 'delete\n' to spawn id(3) at /usr/lib/perl5/site_perl/5.10/Expect.pm line 1264 Expect::print('Expect=GLOB(0x102ce260)', 'delete\x{a}') called at ./testpsm.pl line 912 main::psm_delete('manage', '!manage', 'jaimin') called at ./testpsm.pl line 885 main::manage(16.83.140.45, 'manage', '!manage', 'delete', 'jaimin') called at ./testpsm.pl line 985 Starting EXPECT pattern matching... at /usr/lib/perl5/site_perl/5.10/Expect.pm line 561 Expect::expect('Expect=GLOB(0x102ce260)', 1, 'No user login details available\x{d}\x{a}Enter username and password ...') called at ./testpsm.pl line 921 main::psm_delete('manage', '!manage', 'jaimin') called at ./testpsm.pl line 885 main::manage(16.83.140.45, 'manage', '!manage', 'delete', 'jaimin') called at ./testpsm.pl line 985 spawn id(3): list of patterns: #1: -ex `No user login details available\r\nEnter username and password of MSA device to proceed\r\n* Username: ' spawn id(3): Does `' match: pattern #1: -ex `No user login details available\r\nEnter username and password of MSA device to proceed\r\n* Username: '? No. No user login details available Enter username and password of MSA device to proceed * Username: spawn id(3): Does `No user login details available\r\nEnter username and password of MSA device to proceed\r\n* Username: ' match: pattern #1: -ex `No user login details available\r\nEnter username and password of MSA device to proceed\r\n* Username: '? YES!! Before match string: `' Match string: `No user login details available\r\nEnter username and password of MSA device to proceed\r\n* Username: ' After match string: `' Matchlist: () Sending 'manage\r\n' to spawn id(3) at /usr/lib/perl5/site_perl/5.10/Expect.pm line 1264 Expect::print('Expect=GLOB(0x102ce260)', 'manage\x{d}\x{a}') called at ./testpsm.pl line 942 main::psm_delete('manage', '!manage', 'jaimin') called at ./testpsm.pl line 885 main::manage(16.83.140.45, 'manage', '!manage', 'delete', 'jaimin') called at ./testpsm.pl line 985 Starting EXPECT pattern matching... at /usr/lib/perl5/site_perl/5.10/Expect.pm line 561 Expect::expect('Expect=GLOB(0x102ce260)', 1, '* Password: ') called at ./testpsm.pl line 952 main::psm_delete('manage', '!manage', 'jaimin') called at ./testpsm.pl line 885 main::manage(16.83.140.45, 'manage', '!manage', 'delete', 'jaimin') called at ./testpsm.pl line 985 spawn id(3): list of patterns: #1: -ex `* Password: ' spawn id(3): Does `' match: pattern #1: -ex `* Password: '? No. ERROR: psm_delete: Did not prompt for password debug : should have propmt for password. Starting EXPECT pattern matching... at /usr/lib/perl5/site_perl/5.10/Expect.pm line 561 Expect::expect('Expect=GLOB(0x102ce260)', 0) called at ./testpsm.pl line 254 main::syncup() called at ./testpsm.pl line 51 main::cleanup() called at ./testpsm.pl line 1040 spawn id(3): list of patterns: ============================================ |
From: Sreekanth P. <S.P...@ft...> - 2008-10-29 18:48:56
|
Hi, I am not able to get the send() function working in my code. Here is the code: #!/usr/local/perl5/bin/perl -w #--------------------------------------------------------------------------- # $Id$ #--------------------------------------------------------------------------- use Expect; use IO::Stty; $Expect::Exp_Internal = 1; my $file = "temp.txt"; my $timeOut = 10; my $cmd = 'sftp'; my $params = (" $user\@$host"); my $exp = new Expect; $exp->spawn($cmd,$params) or die "cannot spawn expect \n"; $exp->debug(3); $exp->log_user(1); $Expect::Debug = 3; $exp->expect($timeOut, ["Password:"]); $exp->send("$pass\r\n") or die "send pass failed: $@ \n"; $exp->expect($timeOut, ["sftp>"]) or die "sftp prompt is expected \n"; $exp->send("get $file\n"); $exp->expect($timeOut, ["sftp>"]); $exp->send("bye\n"); $exp->soft_close(); And the output is: $perl system_expect_script.perl Spawned 'sftp user@host' spawn id(3) Pid: 32344 Tty: /dev/pts/16 at /usr/lib/perl5/site_perl/5.8.5/Expect.pm line 181 Expect::spawn('Expect=GLOB(0x997f168)', 'sftp', ' user@host') called at system_expect_script.perl line 20 expect(Expect=GLOB(0x997f168) 10 ARRAY(0x99d1604)) called... expect(): handling param 'ARRAY(0x99d1604)'... Starting EXPECT pattern matching... at /usr/lib/perl5/site_perl/5.8.5/Expect.pm line 561 Expect::expect('Expect=GLOB(0x997f168)', 10, 'ARRAY(0x99d1604)') called at system_expect_script.perl line 24 spawn id(3): beginning expect. Timeout: 10 seconds. Current time: Wed Oct 29 17:54:00 2008 spawn id(3): list of patterns: #1: -re `Password:' spawn id(3): Does `' match: pattern #1: -re `Password:'? No. Waiting for new data (10 seconds)... spawn id(3): new data. spawn id(3): read 31 byte(s). Connecting to host... spawn id(3): Does `Connecting to host...\r\n' match: pattern #1: -re `Password:'? No. Waiting for new data (9 seconds)... spawn id(3): new data. spawn id(3): read 10 byte(s). Password: spawn id(3): Does `Connecting to host...\r\nPassword: ' match: pattern #1: -re `Password:'? YES!! Before match string: `Connecting to host...\r\n' Match string: `Password:' After match string: ` ' Matchlist: () Returning from expect successfully. spawn id(3): accumulator: ` ' Sending 'password\r\n' to spawn id(3) at /usr/lib/perl5/site_perl/5.8.5/Expect.pm line 1264 Expect::print('Expect=GLOB(0x997f168)', 'password\x{d}\x{a}') called at system_expect_script.perl line 33 send pass failed: Closing spawn id(3). at /usr/lib/perl5/site_perl/5.8.5/Expect.pm line 1431 Expect::hard_close('Expect=GLOB(0x997f168)') called at /usr/lib/perl5/site_perl/5.8.5/Expect.pm line 1621 Expect::DESTROY('Expect=GLOB(0x997f168)') called at system_expect_script.perl line 0 eval {...} called at system_expect_script.perl line 0 spawn id(3) closed. Pid 32344 of spawn id(3) terminated, Status: 0x100 Please let me know if I am missing anything Thanks in advance - Sreekanth |
From: Roland G. <rgi...@cp...> - 2008-09-23 14:18:58
|
Hi Ivo, I am trying to discourage the use of Expect for automating password entry for ssh because it's bad practice. Using the public key authentication in ssh is the right way to do it. In most cases you won't need Expect at all, just use qx(ssh host cmd) or open("-|", "ssh host cmd"). To answer some of your questions: commands within one expect() statement are parallel, a match of a regexp triggers the associated subroutine. For the new calling style with callbacks '-re' is the default, so you can leave it off, for the old-style expect() '-ex'act matching is the default, so you have to specify '-re' there to use regexp matches. Hope this helps, Roland ivo welch wrote: > Dear Roland: > > Thanks a lot for taking care of this module. It seems incredibly > useful, so I am now trying to learn it. Alas, not easy to figure out. > > One of the most common uses of Expect is probably use of "ssh" under > linux with a password that sits in my program. So, I am trying to > figure out from the docs what the recommended way to do this is. > Therefore, I think this could be a good candidate for an example. It is > probably obvious to the initiated, but not so to those of us that don't > even know the TCL Expect command. > > The logic of executing ssh would seem to suggest that I need to look > for: > > "Are you sure you want to continue connecting (yes/no)?" > to which I would answer "yes". This prompt may or may > not appear. > > "Password: " > to which I would give my password. This may or may not > appear the first time. > > "Password: " > a second time, which would lead me to die the program (I had the wrong > password). > > EOF > which should make me return happily. > > > It is not at all obvious to me how I would write a function > run_sshcommand( $remotecommand, $remotepassword ) > that automates this. From the docs, it is not easy to see if multiple > arguments to expect are sequential, or alternatives. Also, some > statements suggest I need "-re", other examples seem to suggest that I > can use qr//; > > Any help would be appreciated. > > Regards, > > /iaw > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > |
From: ivo w. <ivo...@br...> - 2008-09-23 00:57:59
|
Dear Roland: Thanks a lot for taking care of this module. It seems incredibly useful, so I am now trying to learn it. Alas, not easy to figure out. One of the most common uses of Expect is probably use of "ssh" under linux with a password that sits in my program. So, I am trying to figure out from the docs what the recommended way to do this is. Therefore, I think this could be a good candidate for an example. It is probably obvious to the initiated, but not so to those of us that don't even know the TCL Expect command. The logic of executing ssh would seem to suggest that I need to look for: "Are you sure you want to continue connecting (yes/no)?" to which I would answer "yes". This prompt may or may not appear. "Password: " to which I would give my password. This may or may not appear the first time. "Password: " a second time, which would lead me to die the program (I had the wrong password). EOF which should make me return happily. It is not at all obvious to me how I would write a function run_sshcommand( $remotecommand, $remotepassword ) that automates this. From the docs, it is not easy to see if multiple arguments to expect are sequential, or alternatives. Also, some statements suggest I need "-re", other examples seem to suggest that I can use qr//; Any help would be appreciated. Regards, /iaw |
From: Roland G. <rgi...@cp...> - 2008-08-28 10:16:49
|
From past experience I know that the solaris perl packages always create troubles. I would recommend to build perl by yourself, using gcc and the latest v5.8 source as the earlier 5.8 versions have problems regarding 64bit. I'm pretty sure that IO::Tty then just works... ;-) Regards, Roland Jason wrote: > Hello, > > I am trying to compile IO::Tty & IO::Pty so that I may compile the > Expect module. Unfortunately, I cannot seem to get past the perl > Makefile.PL for IO::Tty. > > I am running Solaris 10 with Perl 5.8.4 which was compiled using > suntools/cc. I'm using perlgcc to compile modules with gcc, because cc > is not available on the system. > > When I run perlgcc Makefile.PL I see: > > Now let's see what we can find out about your system > (logfiles of failing tests are available in the conf/ dir)... > > but then it hangs right there. I've let it sit for up to an hour so far, > then when I kill the process (control-C) I get the following: > > ERROR: cannot run the configured compiler 'gcc' > (see conf/compilerok.log). Suggestions: > 1) The complier 'gcc' is not in your PATH. Add it > to the PATH and try again. OR > 2) The compiler isn't installed on your system. Install it. OR > 3) You only have a different compiler installed (e.g. 'gcc'). > Either fix the compiler config in the perl Config.pm > or install a perl that was built with the right compiler > (you could build perl yourself with the available compiler). > > > gcc is in my PATH, I have permissions (attempting this compile as root), > and it can create binaries. (I've used it numerous times prior to this). > > /conf/compilerok.log is an empty file. > > Are there any special requirements needed to get this compiled on > Solaris 10, or does it just not work? > > Thanks in advance, > > ~Jason > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss |
From: Austin S. <te...@of...> - 2008-08-28 05:50:00
|
On Wed, Aug 27, 2008 at 04:27:09PM -0700, Jason wrote: > I am running Solaris 10 with Perl 5.8.4 which was compiled using > suntools/cc. I'm using perlgcc to compile modules with gcc, because cc is > not available on the system. > > When I run perlgcc Makefile.PL I see: > > Now let's see what we can find out about your system > (logfiles of failing tests are available in the conf/ dir)... > > but then it hangs right there. I would truss -f perlgcc Makefile.PL and see what it's up to. Sounds pretty strange otherwise. you may want the -o outfile flag to truss if it spews too crap much before getting to the interesting bits. Here's a little thought. Maybe it's doing something like gcc -E - but not getting input for some reason. That would explain the hanging and messages w/ lack of error. Of course it doesn't explain why it would be doing that in the first place. Austin > I've let it sit for up to an hour so far, > then when I kill the process (control-C) I get the following: > > ERROR: cannot run the configured compiler 'gcc' > (see conf/compilerok.log). Suggestions: > 1) The complier 'gcc' is not in your PATH. Add it > to the PATH and try again. OR > 2) The compiler isn't installed on your system. Install it. OR > 3) You only have a different compiler installed (e.g. 'gcc'). > Either fix the compiler config in the perl Config.pm > or install a perl that was built with the right compiler > (you could build perl yourself with the available compiler). > > > gcc is in my PATH, I have permissions (attempting this compile as root), and > it can create binaries. (I've used it numerous times prior to this). > > /conf/compilerok.log is an empty file. > > Are there any special requirements needed to get this compiled on Solaris > 10, or does it just not work? > > Thanks in advance, > > ~Jason > > > !DSPAM:48b5e2d2105561410093335! > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > !DSPAM:48b5e2d2105561410093335! > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > > > !DSPAM:48b5e2d2105561410093335! |
From: Jason <da...@gm...> - 2008-08-27 23:27:11
|
Hello, I am trying to compile IO::Tty & IO::Pty so that I may compile the Expect module. Unfortunately, I cannot seem to get past the perl Makefile.PL for IO::Tty. I am running Solaris 10 with Perl 5.8.4 which was compiled using suntools/cc. I'm using perlgcc to compile modules with gcc, because cc is not available on the system. When I run perlgcc Makefile.PL I see: Now let's see what we can find out about your system (logfiles of failing tests are available in the conf/ dir)... but then it hangs right there. I've let it sit for up to an hour so far, then when I kill the process (control-C) I get the following: ERROR: cannot run the configured compiler 'gcc' (see conf/compilerok.log). Suggestions: 1) The complier 'gcc' is not in your PATH. Add it to the PATH and try again. OR 2) The compiler isn't installed on your system. Install it. OR 3) You only have a different compiler installed (e.g. 'gcc'). Either fix the compiler config in the perl Config.pm or install a perl that was built with the right compiler (you could build perl yourself with the available compiler). gcc is in my PATH, I have permissions (attempting this compile as root), and it can create binaries. (I've used it numerous times prior to this). /conf/compilerok.log is an empty file. Are there any special requirements needed to get this compiled on Solaris 10, or does it just not work? Thanks in advance, ~Jason |