Looking for a decrypting script

Kelley Lingerfelt kelleyl@tellico.net
Sat, 29 Jul 2000 13:12:55 -0400


Thanks for the patch, it works great. Appreciate all the time you spent
helping me. I'm just decrypting away. :)

thanks
Kelley



Frank Tobin wrote:


> Kelley Lingerfelt, at 23:27 -0400 on Fri, 28 Jul 2000, wrote:
>
> > Thanks for the replies, I've got all the modules downloaded and
> > installed, the pgpenvelope_decrypt works great. But for the life of me
> > I can't figure out how to pass the passphrase in, I'm prompted for the
> > passphrase at every encrypted message.
>
> You have two solutions you could use.
>
> 1) Use a passphrase-caching wrapper for GnuPG, such as secret-agent,
> available at:
>
> http://www.vibe.at/tools/secret-agent/
>
> 2) To have pgpenvelope_decrypt remember and enter your passphrase for you,
> you could apply this patch to it:
>
> *** pgpenvelope_decrypt Sun Jul 23 22:19:49 2000
> --- pgpenvelope_decrypt.new Sat Jul 29 11:39:31 2000
> ***************
> *** 34,39 ****
> --- 34,40 ----
> use FindBin;
> use sigtrap 'handler' => 'die_signal_handler', 'normal-signals';
>
> + use Term::ReadKey;
> use GnuPG::Interface 0.10;
>
> use PGPEnvelope::Common;
> ***************
> *** 95,100 ****
> --- 96,107 ----
> my $gnupg = GnuPG::Interface->new();
> $gnupg->options->meta_interactive( not $is_filter );
> $gnupg->gnupg_call( $program_call );
> +
> + print "Please enter a passphrase: ";
> + ReadMode 'noecho', $terminal->input_handle();
> + my $passphrase = ReadLine 0, $terminal->input_handle();
> + ReadMode 'restore', $terminal->input_handle();
> + $gnupg->passphrase( $passphrase );
>
> PGP_MESSAGE: while ( <STDIN> )
> {