Help - Search - Member List - Calendar
Full Version: answering prompts using expect or perl
WorkTheWeb Forums > Webmaster Resources > Perl Beginner Help
Support our Sponsors!
Yo...what up.....

I have wrote this perl program to automatically download a block of strings
specifically a public key. I opted for cURL instead of lwp but may switch
as of yet.
My question is when I goto sign the new key I am prompted with as in red :


pub 1024D/886EC5AB created: 2005-03-28 expires: 2005-11-16 trust: -/-
sub 2048g/5973E214 created: 2005-03-28 expires: 2005-11-16
(1). talxcorp11162005 <[Email Removed]>


pub 1024D/886EC5AB created: 2005-03-28 expires: 2005-11-16 trust: -/-
Primary key fingerprint: 782B 62F1 34B7 FC44 62E0 9208 F454 A76C 886E
C5AB

talxcorp11162005 <[Email Removed]>

This key is due to expire on 2005-11-16.
Do you want your signature to expire at the same time? (Y/n) y

How carefully have you verified the key you are about to sign actually
belongs
to the person named above? If you don't know what to answer, enter "0".

(0) I will not answer. (default)
(1) I have not checked at all.
(2) I have done casual checking.
(3) I have done very careful checking.

Your selection? 3

Really sign? y

You need a passphrase to unlock the secret key for
user: "OhioHealth IS (OhioHealth IS Peoplesoft UNIX Support
psofthr@ohiohealth."
1024-bit DSA key, ID 30B6905A, created 2004-04-07

Enter passphrase: "password"


I am thinking expect could accomplish this, but can perl?
I tried using a HEREIS block and that did not work.

thank you,
derek


Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams

JupiterHost.Net
As people have recommended to you nearing close thousands of times :)
search.cpan.org for "Expect"

Zentara
On Fri, 8 Jul 2005 13:45:07 -0400, [Email Removed] wrote:

QUOTE
Yo...what up.....

I have wrote this perl program to automatically download a block of strings
specifically a public key.  I opted for cURL instead of lwp but may switch
as of yet.
My question is when I goto sign the new key I am prompted with as in red :

to the person named above?  If you don't know what to answer, enter "0".

(0) I will not answer. (default)
(1) I have not checked at all.
(2) I have done casual checking.
(3) I have done very careful checking.

Your selection?  3

Really sign? y


I am thinking expect could accomplish this, but can perl?
I tried using a HEREIS block and that did not work.


Use Expect, or if you want to try it with IPC::Open3, it was asked
and answered a few weeks ago.

Go to http://groups.google.com and search for

Re: using open3 to interact with external program--ANSWER FOUND



--
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html


PHP Help | Linux Help | Web Hosting | Reseller Hosting | SSL Hosting
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2005 Invision Power Services, Inc.