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 |