You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
(26) |
Dec
(7) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(5) |
Feb
(3) |
Mar
(11) |
Apr
(10) |
May
(2) |
Jun
(5) |
Jul
(13) |
Aug
(2) |
Sep
(3) |
Oct
(10) |
Nov
(18) |
Dec
(29) |
2002 |
Jan
(12) |
Feb
(14) |
Mar
(73) |
Apr
(28) |
May
(21) |
Jun
(39) |
Jul
(40) |
Aug
(42) |
Sep
(20) |
Oct
(4) |
Nov
(9) |
Dec
(18) |
2003 |
Jan
(2) |
Feb
(8) |
Mar
(6) |
Apr
(24) |
May
(24) |
Jun
(14) |
Jul
(16) |
Aug
(36) |
Sep
(34) |
Oct
(23) |
Nov
(4) |
Dec
(15) |
2004 |
Jan
(6) |
Feb
(13) |
Mar
(7) |
Apr
(5) |
May
(11) |
Jun
(5) |
Jul
(4) |
Aug
|
Sep
(2) |
Oct
(16) |
Nov
(4) |
Dec
(9) |
2005 |
Jan
(2) |
Feb
(1) |
Mar
(3) |
Apr
(10) |
May
(5) |
Jun
(13) |
Jul
(3) |
Aug
|
Sep
(7) |
Oct
(5) |
Nov
(1) |
Dec
(9) |
2006 |
Jan
|
Feb
(10) |
Mar
(22) |
Apr
(14) |
May
(5) |
Jun
(4) |
Jul
(19) |
Aug
(7) |
Sep
(16) |
Oct
(4) |
Nov
(1) |
Dec
(16) |
2007 |
Jan
(17) |
Feb
|
Mar
(35) |
Apr
(5) |
May
(20) |
Jun
(11) |
Jul
(33) |
Aug
(3) |
Sep
(2) |
Oct
(11) |
Nov
(23) |
Dec
(5) |
2008 |
Jan
(10) |
Feb
(9) |
Mar
|
Apr
(6) |
May
(8) |
Jun
(7) |
Jul
|
Aug
(3) |
Sep
(2) |
Oct
(1) |
Nov
|
Dec
(20) |
2009 |
Jan
(8) |
Feb
(8) |
Mar
(3) |
Apr
(8) |
May
(2) |
Jun
(11) |
Jul
(2) |
Aug
|
Sep
(3) |
Oct
(1) |
Nov
(7) |
Dec
(4) |
2010 |
Jan
(2) |
Feb
(1) |
Mar
(3) |
Apr
|
May
(2) |
Jun
(2) |
Jul
(7) |
Aug
(3) |
Sep
(7) |
Oct
(2) |
Nov
(1) |
Dec
(4) |
2011 |
Jan
(4) |
Feb
(5) |
Mar
|
Apr
(3) |
May
(2) |
Jun
|
Jul
(6) |
Aug
|
Sep
|
Oct
(6) |
Nov
|
Dec
|
2012 |
Jan
|
Feb
(1) |
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(5) |
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(7) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
(30) |
Apr
(10) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(12) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: Austin S. <te...@of...> - 2002-03-02 07:58:04
|
> > My first try was to write a short Perl program that spawned a telnet, > > did an expect to get to the prompt, then did 'system("bash");' to get > > into the subshell. I then invoked program#2 which tried to interact > > with the telnet. I used the pty that the spawned telnet was using > > as fd's 0,1 and 2 (found via lsof) as the filename to re-open with > > exp_init(), but that didn't work. It did sent the data to the pty, > > but it was received by the parent program rather than the spawned telnet. > > I suspect I'probably running afoul of the pty master/slave business, > > which I'm not very familiar with. > > > > Any idea how to get what I want to happen? Is it even possible? > > > > It's possible, though it may not be what you want. You would do > something along the lines of close STDIN and STDOUT, then reopen them > with the filenumber of the tty, then exec() the program, e.g. bash. You > can look at the code for spawn() to see how this is done to open the initial > program. Also you will need to make sure you set raw mode on the pty, or > you will have processes echoing at themselves. Come to think of it, this might be something that would be worth adding as a routine in the module, though I'm not sure when someone would use it. Conceptually it sounds like something someone would want to do, but I've never had an occasion to. Austin |
From: Austin S. <te...@of...> - 2002-03-02 07:52:38
|
On Sat, Mar 02, 2002 at 12:40:25AM -0500, Ed Ravin wrote: > Here's what I'd like to do with Expect.pm: > > * Spawn a telnet to somewhere. > * Invoke a subshell > * From within that subshell, call another Perl program one or more > times to interact with the telnet process spawned by the parent process. > > My first try was to write a short Perl program that spawned a telnet, > did an expect to get to the prompt, then did 'system("bash");' to get > into the subshell. I then invoked program#2 which tried to interact > with the telnet. I used the pty that the spawned telnet was using > as fd's 0,1 and 2 (found via lsof) as the filename to re-open with > exp_init(), but that didn't work. It did sent the data to the pty, > but it was received by the parent program rather than the spawned telnet. > I suspect I'probably running afoul of the pty master/slave business, > which I'm not very familiar with. > > Any idea how to get what I want to happen? Is it even possible? > It's possible, though it may not be what you want. You would do something along the lines of close STDIN and STDOUT, then reopen them with the filenumber of the tty, then exec() the program, e.g. bash. You can look at the code for spawn() to see how this is done to open the initial program. Also you will need to make sure you set raw mode on the pty, or you will have processes echoing at themselves. Another way is to have an expect script that does interact() at some point and uses named pipes as i/o. I think that's how things like kibitz work. Performance-wise it's less efficient, but probably easier to code. Thirdly, you could have the called perl program call the telnet expect process and work with it as if it were any other process. It's hard to tell (for me anyway) what you're trying to accomplish. Austin |
From: Ed R. <er...@pa...> - 2002-03-02 05:40:27
|
Here's what I'd like to do with Expect.pm: * Spawn a telnet to somewhere. * Invoke a subshell * From within that subshell, call another Perl program one or more times to interact with the telnet process spawned by the parent process. My first try was to write a short Perl program that spawned a telnet, did an expect to get to the prompt, then did 'system("bash");' to get into the subshell. I then invoked program#2 which tried to interact with the telnet. I used the pty that the spawned telnet was using as fd's 0,1 and 2 (found via lsof) as the filename to re-open with exp_init(), but that didn't work. It did sent the data to the pty, but it was received by the parent program rather than the spawned telnet. I suspect I'probably running afoul of the pty master/slave business, which I'm not very familiar with. Any idea how to get what I want to happen? Is it even possible? Thanks, -- Ed |
From: <pat...@cc...> - 2002-03-01 21:17:03
|
> From: Bennett, Patrick > Subject: RE: [Expectperl-discuss] Need to get the very last > thing output by the program > > Those problems seem to have been alleviated, but a > new one is happening now: > > Can't locate object method "autoflush" via package > "Expect=GLOB(0x828bf70)" (perhaps you forgot to load > "Expect=GLOB(0x828bf70)"?) at > /usr/local/lib/perl5/site_perl/5.6.1/Expect.pm line 89. This error occured because of the way I was creating the $exp object. I wanted to create it before spawning the command so that I could do a $exp->log_user(0) before the process started spitting out stuff. What I discovered is that you can go it after just fine, as below: $exp = Expect->spawn ( $command, @params ); $exp->log_user(0); $exp->expect (..... So now things are working. Thought this might help others trying to do something similar. Patrick |
From: <RGi...@a1...> - 2002-03-01 11:36:10
|
> > But then the first expect call picks up "das", and the next gets > > "ARTDEF". I thought $pid->expect() was supposed to read the child's > > output, not its input. Am I mistaken? > > By default a terminal will echo its input. You may need to turn > echoing off via stty("raw") or "-echo". Right, that's the problem. Pseudo-terminals usually start off with echoning enabled (also CR->LF translation and a lot of other things). Best thing to do is to set the pty to 'raw', so no processing takes place. I have just added a new method raw_pty() to the latest beta version, so what you would do if you use that version is: my $tagger = new Expect; $tagger->raw_pty(1); $tagger->spawn("/path/to/tagger", ...) or die; foreach my $text (@text) { $tagger->send("$text\n"); my @tags; $tagger->expect($timeout, # grab a line [ ".*?\n" => sub { my $self = shift; my $tag = $self->match(); chomp $tag; push @tags, $tag; exp_continue; # go on } ], # finished with processing [ "$endtag" => sub { my $self = shift; my $endtag = $self->match(); chomp $endtag; push @tags, $endtag; 0; # stop expecting here } ], # error handling [ 'eof' => sub { die "Tagger exited" } ], [ 'timeout => sub { die "Tagger took too long" } ], ); # do something with the tags } This presumes that there is an endtag that gets sent when the tagger is done with the word or that there is some other way to recognize the end. Using a timeout isn't really reliable and can lead to spurious failures. Anyway, that's your problem. :-) Hope this helps, Roland -- RGi...@cp... |
From: Austin S. <te...@of...> - 2002-03-01 11:11:06
|
On Fri, Mar 01, 2002 at 08:15:54AM +0100, Kilian A. Foth wrote: > our $pid = > Expect->spawn("/opt/pkg/tagger/bin/tagger", > "-v0", "-z$args{z}", "$args{l}", "-") > or die "Couldn't spawn, $!"; > > The tagger reads words such as: > > das > > and answers with tags such as: > > ARTDEF > > Since I don't know what it's going to answer, I have to expect > everything: > > my @comm = $pid->expect(1,'-re',"^.*"); > > But then the first expect call picks up "das", and the next gets > "ARTDEF". I thought $pid->expect() was supposed to read the child's > output, not its input. Am I mistaken? > By default a terminal will echo its input. You may need to turn echoing off via stty("raw") or "-echo". Austin |
From: <RGi...@a1...> - 2002-03-01 11:08:18
|
> Has anybody experience with IO::Tty on Solaris 8. It says in the > documentation that Solaris 8 is supported, but I can't get it to run. Please try the latest beta version (IO-Tty 0.97_01, Expect 1.13_07), that's guaranteed to work on Solaris 8. If it hasn't propagated to CPAN mirror yet, try getting it from the central CPAN site at funet.fi. Hope this helps, Roland -- RGi...@cp... |
From: <RGi...@a1...> - 2002-03-01 10:58:16
|
> Can't locate object method "autoflush" via package > "Expect=GLOB(0x828bf70)" (perhaps you forgot to load > "Expect=GLOB(0x828bf70)"?) at > /usr/local/lib/perl5/site_perl/5.6.1/Expect.pm line 89. Which version of Expect are we talking about? Line 89 in the latest beta is "sub spawn {", that cannot be the location. Also, could you post your code that is doing the new/spawn/whatever call? > Is there a way to search the email list archives for > messages like this? Don't know. Even if there were, I don't remember that problem. The mailing list has been very quiet and is only now picking up speed. Roland -- RGi...@cp... |
From: Christian S. <chr...@gm...> - 2002-03-01 09:07:21
|
Has anybody experience with IO::Tty on Solaris 8. It says in the documentation that Solaris 8 is supported, but I can't get it to run. Here is the output I get: [27 root@bwnic1zhb]/opt/install/scripting/IO-Tty-0.92_02 :#perl Makefile.PL Looking for strlcpy()... found. Looking for grantpt()... found. Looking for openpty()... not found. Looking for ttyname()... found. Looking for _getpty()... not found. Looking for ptsname()... found. Looking for getpt()... not found. Looking for unlockpt()... found. Looking for sigaction()... found. Looking for libutil.h... not found. Looking for util.h... not found. Looking for pty.h... not found. Looking for sys/stropts.h... found. DEFINE = -DHAVE_DEV_PTMX -DHAVE_STRLCPY -DHAVE_GRANTPT -DHAVE_TTYNAME -DHAVE_PTSNAME -DHAVE_UNLOCKPT -DHAVE_SIGACTION -DHAVE_SYS_STROPTS_H Checking if your kit is complete... Looks good Writing Makefile for IO::Tty [28 root@bwnic1zhb]/opt/install/scripting/IO-Tty-0.92_02 :#make cp Pty.pm blib/lib/IO/Pty.pm cp Tty.pm blib/lib/IO/Tty.pm /usr/local/bin/perl -I/usr/local/lib/perl5/5.6.1/sun4-solaris -I/usr/local/lib/perl5/5.6.1 /usr/local/lib/perl5/5.6.1/ExtUtils/xsubpp -typemap /usr/local/lib/perl5/5.6.1/ExtUtils/t ypemap Tty.xs > Tty .xsc && mv Tty.xsc Tty.c gcc -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -DVERSION=\"0.92_02\" -DXS_VERSION=\"0.92_02\" -fPIC -I/usr/local/lib/perl5/5.6.1/sun4-solaris/CORE -DHAVE_DEV_PTMX -DHAVE_STRLCPY -DHAVE_GRANTPT -DHAVE_TTYNAME -DHAVE_PTSNAME -DHAVE_UNLOCKPT -DHAVE_SIGACTION -DHAVE_SYS_STROPTS_H Tty.c Running Mkbootstrap for IO::Tty () chmod 644 Tty.bs rm -f blib/arch/auto/IO/Tty/Tty.so LD_RUN_PATH="" gcc -G -L/usr/local/lib Tty.o -o blib/arch/auto/IO/Tty/Tty.so chmod 755 blib/arch/auto/IO/Tty/Tty.so cp Tty.bs blib/arch/auto/IO/Tty/Tty.bs chmod 644 blib/arch/auto/IO/Tty/Tty.bs Manifying blib/man3/IO::Pty.3 Manifying blib/man3/IO::Tty.3 [29 root@bwnic1zhb]/opt/install/scripting/IO-Tty-0.92_02 :#make test PERL_DL_NONLAZY=1 /usr/local/bin/perl -Iblib/arch -Iblib/lib -I/usr/local/lib/perl5/5.6.1/sun4-solar is -I/usr/local/lib/perl5/5.6.1 test.pl Using /opt/install/scripting/IO-Tty-0.92_02/blib 1..12 Checking for appropriate ioctls: Cannot exec(unknown_program_test_IGNORE_THIS_ERROR_ahat44535jtrbni43uh5): No such file or directory ok 1 ok 2 isatty($master): NO isatty($slave): YES Couldn't read anything: at test.pl line 82. make: *** [test_dynamic] Error 255 [30 root@bwnic1zhb]/opt/install/scripting/IO-Tty-0.92_02 :# Thanks Christian |
From: Kilian A. F. <fo...@in...> - 2002-03-01 07:16:15
|
Austin Schutz writes: > On Thu, Feb 28, 2002 at 06:04:04PM +0100, Kilian A. Foth wrote: > > > > I'm trying to fool a proprietary program into thinking it is talking > > to a terminal when it is really talking to another program. Here is a > > minimal version to show my problem: > > > > our $pid = Expect->spawn("cat") or die "Couldn't spawn, $!"; > > I guess I don't understand what you expect to accomplish by this. > By spawning cat you are.. well.. catenating from STDIN to STDOUT. If you want > to interact with a program then why not spawn the program? > OK, example too minimal... The actual program is a part of speech tagger that reads words from its STDIN and writes tags to its STDOUT. I want to handle it through Expect so it will think it's talking to a terminal and not buffer its output. (It's closed source, so I can't hack it.) The real spawn is this: our $pid = Expect->spawn("/opt/pkg/tagger/bin/tagger", "-v0", "-z$args{z}", "$args{l}", "-") or die "Couldn't spawn, $!"; The tagger reads words such as: das and answers with tags such as: ARTDEF Since I don't know what it's going to answer, I have to expect everything: my @comm = $pid->expect(1,'-re',"^.*"); But then the first expect call picks up "das", and the next gets "ARTDEF". I thought $pid->expect() was supposed to read the child's output, not its input. Am I mistaken? |
From: Austin S. <te...@of...> - 2002-02-28 21:44:33
|
On Thu, Feb 28, 2002 at 06:04:04PM +0100, Kilian A. Foth wrote: > > I'm trying to fool a proprietary program into thinking it is talking > to a terminal when it is really talking to another program. Here is a > minimal version to show my problem: > > our $pid = Expect->spawn("cat") or die "Couldn't spawn, $!"; I guess I don't understand what you expect to accomplish by this. By spawning cat you are.. well.. catenating from STDIN to STDOUT. If you want to interact with a program then why not spawn the program? Austin |
From: <pat...@cc...> - 2002-02-28 17:08:06
|
Those problems seem to have been alleviated, but a new one is happening now: Can't locate object method "autoflush" via package "Expect=GLOB(0x828bf70)" (perhaps you forgot to load "Expect=GLOB(0x828bf70)"?) at /usr/local/lib/perl5/site_perl/5.6.1/Expect.pm line 89. Is there a way to search the email list archives for messages like this? Patrick |
From: Kilian A. F. <fo...@in...> - 2002-02-28 17:04:28
|
I'm trying to fool a proprietary program into thinking it is talking to a terminal when it is really talking to another program. Here is a minimal version to show my problem: #!/usr/bin/env perl use warnings; use strict; use Expect; our $pid = Expect->spawn("cat") or die "Couldn't spawn, $!"; $pid->log_stdout(0); sub read_output($ ) { my $s = shift; my @comm = $pid->expect(1,'-re',"$s"); (print "Error.", return 0) if $comm[1]; (print "No answer.", return 0) unless defined $comm[2]; (my $answer = $comm[2]) =~ s/\r/<NL>/; print "received `$answer'!\n"; return 1; } $pid->send("Hi there.\n"); while(read_output("^.+")){ # do nothing }; I expect the output: received `Hi there.<NL>'! But I get: received `Hi there.<NL>'! received `Hi there.<NL>'! Why is ->expect reading my own STDOUT? How can I make it stop? |
From: <RGi...@a1...> - 2002-02-28 10:22:46
|
> Solaris 2.6 Expect 1.12 > In all the examples, when a timeout is encountered you simply die(); > In my case, a device can get into a state where what is returned is > unpredictable. There is a specific sequence that I can then send > to log out the previous action and get back to a known state. > However, the code below doesn't seem to work correctly > $exp->expect($timeout, > ['OVL111', sub { my $fh = shift; $fh->send("login\n"); }], > ['\.', sub { my $fh = shift; $fh- > >send("****\nlogo\n");exp_continue;}], Are you matching for a dot here? > [timeout => sub { my $fh = shift; > $fh->send("****\nlogo\n");exp_continue; }] > ); exp_continue for timeout only started working a few beta versions ago. > Using a regex of '.*' would be another way - but risky - > especially until I can get "raw" working. Any suggestions? I'm attaching the latest version, much improved and almost ready for release (I still need a few test results for IO-Tty, especially on HPUX, OSF and SCO). Please try it (be sure to browse the docs for all the new features) and tell me if it solves your problems. Thanks! Roland -- RGi...@cp... |
From: <RGi...@a1...> - 2002-02-28 09:38:02
|
> I am having two problems. The first is that I can't get it > to not echo the text - including the passphrase - in the > resulting output. Where? On stdout? Use $exp->log_user(0). In the text that gets expected upon? Set to raw. > The line: > > $exp->slave->stty ( qw(raw) ); > > produces the error: > > Can't locate object method "stty" via package "IO::Tty" > (perhaps you forgot to load "IO::Tty"?) at > /data/home/tuser/cgi-wrap/nbpExtract.cgw line 53. Which version of IO::Tty is installed? I only recently added IO::Stty to its @ISA. Is IO::Stty installed properly? I just uploaded a new beta version (IO-Tty 0.97_01, Expect 1.13_07) that has new methods dealing with setting the pty to 'raw'. Please download that and try $exp = new Expect; $exp->raw_pty(1); $exp->spawn(...) or die ... > Secondly, the information I need is literally the very > last thing gpg spits out. So there is no pattern to > match other than end of file. How do I grab everything > from after the passphrase was put in to where the > program quit? Just expect for the line that is spit out immediately before the interesting stuff, then do a my @lines $exp->expect($timeout, ['.*\n', sub { my $self = shift; push @lines, $self->match(); exp_continue; } ], ['eof', sub {}]); to gather the lines. Hope this helps, Roland -- RGi...@cp... |
From: Austin S. <te...@of...> - 2002-02-28 09:12:13
|
On Wed, Feb 27, 2002 at 03:05:25PM -0500, Sorrell, Al wrote: > Solaris 2.6 Expect 1.12 > In all the examples, when a timeout is encountered you simply die(); > In my case, a device can get into a state where what is returned is > unpredictable. There is a specific sequence that I can then send to log out > the previous action and get back to a known state. > However, the code below doesn't seem to work correctly > $exp->expect($timeout, > ['OVL111', sub { my $fh = shift; $fh->send("login\n"); }], > ['\.', sub { my $fh = shift; $fh->send("****\nlogo\n");exp_continue; > }], > [timeout => sub { my $fh = shift; > $fh->send("****\nlogo\n");exp_continue; }] > ); > Well first you have no guarantee that that you will get the whole string 'OVL111' all at once. It may be split up between two reads, which will break your code. Secondly, you may be expecting the literal '\.' rather than the regex, which may not be what you want. Perhaps you want something like '.{7,}' which would be a string longer than OVL111? It's rather difficult to tell from here what you are trying to accomplish. Have you tried setting $Expect::Exp_Internal to watch what your script is trying to find? Austin |
From: <pat...@cc...> - 2002-02-27 22:55:07
|
Greetings, I am trying to use the Expect module to run gpg from cgi-wrap to unencrypt some stuff and then send it over an SSL link to a user's browser. I am having two problems. The first is that I can't get it to not echo the text - including the passphrase - in the resulting output. The line: $exp->slave->stty ( qw(raw) ); produces the error: Can't locate object method "stty" via package "IO::Tty" (perhaps you forgot to load "IO::Tty"?) at /data/home/tuser/cgi-wrap/nbpExtract.cgw line 53. Since the email archives don't appear to have a search function, it's kind of hard to look this up. I didn't see anyone doing a uses on anything resembling IO::Tty, so I'm thinking I shouldn't need to. Secondly, the information I need is literally the very last thing gpg spits out. So there is no pattern to match other than end of file. How do I grab everything from after the passphrase was put in to where the program quit? A run of gpg program looks like this: gpg --decrypt gpg: Warning: using insecure memory! -----BEGIN PGP MESSAGE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org hQEOAwpAPpHGGz8cEAP/U4xA5w9Lw6RRz3voIRQOQe7gg1bfw6e8iHTPqxh3B+8I QjljdIes/P1AtL9FSPuHASOY9BOGZirUMq//x31Tn8+voY11DGUkPp5Jdf8ZYsBH yd+Dpjdlix2AEgCdQ0M2Yf6Va73039E8zT4VdmG2ZPb3LHYM1gteDE2cSC+gMZwD /13iPQTVCFGdfs28p3boTZmVe1yDM\p\zITi4f7qjAlyl4aRNbuxdu8EROhXepT3 w7N734S0PTDegppJh8bsYlmM7Qdwz0onyO14Kc0f6pNrQwMV+GAZfwuSZUMVJMY7 ffNlxMET5MOONTghsn5czmugUt5qmkj9uKtPj3fqBoYu0kABpXPzdhwVi1ODmhPP Es9jSbWanhG/xXR1Omzl26x+yDU6YDZt6XrgOe9PQapgAmDbn4IltCtVws30bQvP 7uzf =GW3b -----END PGP MESSAGE----- You need a passphrase to unlock the secret key for user: "some-user-string" 1024-bit ELG-E key, ID C6MFGF1C, created 2002-02-01 (main key ID DB99F848) lkj Where lkj is the text that was encrypted and it's the very last thing gpg spits out. Thanks Patrick |
From: Sorrell, A. <Al_...@tr...> - 2002-02-27 20:26:53
|
Solaris 2.6 Expect 1.12 In all the examples, when a timeout is encountered you simply die(); In my case, a device can get into a state where what is returned is unpredictable. There is a specific sequence that I can then send to log out the previous action and get back to a known state. However, the code below doesn't seem to work correctly $exp->expect($timeout, ['OVL111', sub { my $fh = shift; $fh->send("login\n"); }], ['\.', sub { my $fh = shift; $fh->send("****\nlogo\n");exp_continue; }], [timeout => sub { my $fh = shift; $fh->send("****\nlogo\n");exp_continue; }] ); Using a regex of '.*' would be another way - but risky - especially until I can get "raw" working. Any suggestions? Thanks, Al |
From: Sorrell, A. <Al_...@tr...> - 2002-02-27 14:55:44
|
Running Expect 1.12 on Solaris 2.6 In code fragment below, when I add the "$exp->log_file(undef)", I get an error the after the next command is sent: 6500NETRTA#exit print() on closed filehandle Symbol::GEN2 at /usr/local/lib/perl5/5.6.0/sun4-solaris/IO/Handle.pm line 379. Thanks, Al sub do_something { my ($exp,$timeout,$logfile)=@_; $exp->send("show ver\n"); $exp->log_file($logfile,'w'); #enable log, no-append (includes command above ) $exp->expect($timeout, ['-re', '[#>]'], ['\-\-More\-\-', sub {my $fh = shift; $fh->send(" ");exp_continue }], [' to continue', sub {my $fh = shift; $fh->send("y\n");exp_continue }], [timeout => sub {die "Timed out after sending command";}] ); $exp->log_file(undef); } |
From: <RGi...@a1...> - 2002-02-27 13:43:54
|
> ERROR: cannot find method `slave_pty' in class Expect at > test_perl_expect.pl line 23 Ugh, version mixup. The method is called just 'slave'. Please download the latest beta versions (IO-Tty v0.97_01 and Expect v1.13_06) that I will upload to CPAN tomorrow. No, forget that, I will send them via e-mail tomorrow. These latest versions contain enhancements that deal with setting the pty to raw and have corrected docs. Cheers! Roland -- RGi...@cp... |
From: Sorrell, A. <Al_...@tr...> - 2002-02-26 21:01:28
|
Just downloaded the Expect.pm 1.12 and got IO-Tty-0.95_01 from CPAN. Running under Perl 5.6, Solaris 2.6 I was trying to use the "raw" mode example to keep from having to deal with text I send. Code snippet: #!/usr/local/bin/perl -w # test the Expect.pm module for Perl use Expect; $host='thathost'; $user='me'; $TAC_pass='mypass'; $pass=''; $timeout=10; $port=''; $enable='enable'; # $Expect::Exp_Internal=1; #Debugging # #$login_ok=&login($host,$port,$timeout,$user,$pass,$TAC_PASS,$enable); &login2($host,$port,$timeout,$user,$pass,$TAC_pass,$enable); print "back from login\n"; sub login2 { my($host,$port,$timeout,$user,$pass,$TAC_pass,$enable)=@_; $port=23 if($port eq ''); $exp = Expect->spawn("telnet $host $port") or die "Cannot spawn telnet to $host: $!\n"; $exp->slave_pty->stty('raw'); sleep 1; I get the following error: Spawned 'telnet 6500netrta 23' spawn id(3) Pid: 22387 Tty: /dev/pts/0 Expect::spawn('Expect', 'telnet 6500netrta 23') called at test_perl_expect.pl line 21 main::login2('myhost', '', 10, 'me', '', 'mypass', 'enable') called at test_perl_expect.pl line 16 ERROR: cannot find method `slave_pty' in class Expect at test_perl_expect.pl line 23 What am I doing wrong?? Thanks, Al |
From: Blackstone, J. D. <jda...@ci...> - 2002-02-22 18:03:42
|
Did you install as root, or install in your home directory? If you installed into the default location (without specifying PREFIX) everything should work. If you gave it a prefix to install in, you'll need to set the PERL5LIB environment variable to be a colon-separated list of directories under the PREFIX that contain modules. If none of that rings a bell, it must be something else. :) jdb > -----Original Message----- > From: Hal Vaughan [mailto:ha...@th...] > Sent: Friday, February 22, 2002 11:20 AM > To: exp...@li... > Subject: [Expectperl-discuss] Install problem > > > I'm new to perl (actually, I haven't done substantial > programming in 10 > years, when I used to program in assembler on Apple //e's). > While I've been > studying quite a bit of perl, I'm still not familiar with all > the features > and needs of modules. > > I downloaded the Expect module from CPAN as well as the IO > module with PTY > and TTY. I had no problem with make and install for IO, but > when I've tried > to install Expect, I get the following error messages: > > From make test: > > PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib > -I/usr/lib/perl5/5. > 6.1/i386-linux -I/usr/lib/perl5/5.6.1 test.pl > 1..32 > Can't locate IO/Stty.pm in @INC (@INC contains: blib/arch > blib/lib /usr/li > b/perl5/5.6.1/i386-linux /usr/lib/perl5/5.6.1/i-386linux > /usr/lib/perl5/5. > 6.1 /usr/lib/perl5/5.6.1/i386-linux /usr/lib/perl5/5.6.1 > /usr/lib/perl5/si > te_perl/5.6.1/i386-linux /usr/lib/perl5/site_perl/5.6.1 > /usr/lib/perl5/sit > e_perl .) at blib/lib/Expect.pm line 23 > BEGIN failed--compilation aborted at blib/lib/Expect.pm line 23. > Compilation failed in require at test.pl line 11. > BEGIN failed --compilation aborted at test.pl line 11. > make: *** [test_dynamic] Error2 > > From make install: > > Writing > /usr/lib/perl5/site_perl/5.6.1/i386-linux/auto/Expect/.packlist > Appending installation info to > /usr/lib/perl5/5.6.1/i386-linux/perllocal.pod > > My asssumption is that @INC contains (or should contain) > information where > all library files are stored, and that it is missing info about where > IO/Stty.pm is. > > I don't know if it matters, but I installed Expect first, > found the problem, > and downloaded IO and installed it afterward. Then I > re-installed Expect, > hoping it would find what it needed. > > Do I need other packages? Or is there a simple change in a > config file I can > make to get this working? > > Thanks! > > Hal > > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > |
From: Rogaski, M. A. <ro...@at...> - 2002-02-22 18:02:58
|
: From: Hal Vaughan [mailto:ha...@th...] :=20 : My asssumption is that @INC contains (or should contain)=20 : information where=20 : all library files are stored, and that it is missing info about where=20 : IO/Stty.pm is. :=20 [snip] :=20 : Do I need other packages? Or is there a simple change in a=20 : config file I can=20 : make to get this working? :=20 Hal, Your assumption is correct. Expect depends upon IO::Stty, which you can = download at http://www.cpan.org/authors/id/AUSCHUTZ/IO-Stty-.02.tar.gz . Mark -- [] Mark Rogaski "Computers save time like=20 [] AT&T Frame Relay Service kudzu prevents soil erosion" [] email: ro...@at... -- Al Castanoli [] voice: 732-885-7534 fax: 732-885-7699 [] pager: 888-858-7243 pin 200853 or 20...@pa...=20 |
From: Hal V. <ha...@th...> - 2002-02-22 17:20:04
|
I'm new to perl (actually, I haven't done substantial programming in 10 years, when I used to program in assembler on Apple //e's). While I've been studying quite a bit of perl, I'm still not familiar with all the features and needs of modules. I downloaded the Expect module from CPAN as well as the IO module with PTY and TTY. I had no problem with make and install for IO, but when I've tried to install Expect, I get the following error messages: From make test: PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib -I/usr/lib/perl5/5. 6.1/i386-linux -I/usr/lib/perl5/5.6.1 test.pl 1..32 Can't locate IO/Stty.pm in @INC (@INC contains: blib/arch blib/lib /usr/li b/perl5/5.6.1/i386-linux /usr/lib/perl5/5.6.1/i-386linux /usr/lib/perl5/5. 6.1 /usr/lib/perl5/5.6.1/i386-linux /usr/lib/perl5/5.6.1 /usr/lib/perl5/si te_perl/5.6.1/i386-linux /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/sit e_perl .) at blib/lib/Expect.pm line 23 BEGIN failed--compilation aborted at blib/lib/Expect.pm line 23. Compilation failed in require at test.pl line 11. BEGIN failed --compilation aborted at test.pl line 11. make: *** [test_dynamic] Error2 From make install: Writing /usr/lib/perl5/site_perl/5.6.1/i386-linux/auto/Expect/.packlist Appending installation info to /usr/lib/perl5/5.6.1/i386-linux/perllocal.pod My asssumption is that @INC contains (or should contain) information where all library files are stored, and that it is missing info about where IO/Stty.pm is. I don't know if it matters, but I installed Expect first, found the problem, and downloaded IO and installed it afterward. Then I re-installed Expect, hoping it would find what it needed. Do I need other packages? Or is there a simple change in a config file I can make to get this working? Thanks! Hal |
From: <RGi...@a1...> - 2002-01-31 15:36:38
|
Hi all, I'm starting a test campaign for IO-Tty and Expect and could use some help. I have managed to test this versions under Linux 2.[24].x, AIX 4.3, FreeBSD 4.4 and Solaris 8, thanks to the Sourceforge compile farm. But what I'm missing is HPUX, Irix, SCO Unix, OpenBSD, Solaris 2. [456] and Cygwin. So please, if you have access to a system from the missing list (and I know you do ;-) and can spare the time, do a quick 'perl Makefile.PL; make; make test; uname -a' and send me the output. Note that Expect builds upon IO-Tty (and IO::Stty), so you have to install that first or tweak the include path via PERL5LIB (if you don't know how to do that, just ask). I'll be on skiing vacation next week, so no need to hurry. Thanks a lot in advance! Roland -- RGi...@cp... |