Looking for a decrypting script

Frank Tobin ftobin@uiuc.edu
Fri, 28 Jul 2000 02:04:29 -0500 (CDT)

Kelley Lingerfelt, at 23:11 -0400 on Thu, 27 Jul 2000, wrote:

> I would like some type of script where I could read this file in and
> output each record that was encrypted, the decryption will be in a
> secure place, but I don't know of anyway to accomplish this. I would
> like to write the output to a file or stdout for final processing.
Since you're dealing with successive encrypted messages, you could actually very likely process the file using pgpenvelope's (http://pgpenvelope.sourceforge.net/) pgpenvelope_decrypt program, even though you aren't using Pine or such things. pgpenvelope_decrypt is flexible and can correctly handle multiple OpenPGP blocks in messages; this is ideal for your task. It reads from stdin, and writes to stdout, and was designed for handling the bodies mail messages which contain OpenPGP blocks. The only modification that would be made would be to made off the top of my head would be to pass in the passphrase directly to GnuPG instead of having the user enter it. As sen_ml stated in a different reply, this entire thing is fairly trivial to accomplish with a Perl module, and this is exactly what pgpenvelope_decrypt does, using GnuPG::Interface. -- Frank Tobin http://www.uiuc.edu/~ftobin/