***** infoCopter.com/perl *****
My::PGPFindKeyFetch PGP public keysModul Usage:use My::PGPFindKey; FETCH A SPECIFIC PUBLIC KEY BY E-MAIL ADDRESS:
my $certserver = new My::PGPFindKey ();
my $result = $certserver->find( query => 'foo@bar.com' );
if ($result->{'rc'}) { print "ERR"; }
print $result->{$email}->{'comment'}, "\n";
print $result->{$email}->{'publickey'}, "\n\n";
PROCESS A LIST OF RESULTS
my $certserver = new My::PGPFindKey (
keyserver => 'pgp.mit.edu:11371' , # default server
maxresults => 10 ,
debug => 0
);
my $result = $certserver->find( query => $ARGV[0] );
if ($result->{'rc'}) { print "ERR"; }
delete $result->{'rc'};
delete $result->{'count'};
foreach my $email (keys %$result) {
print "$email\n";
print $result->{$email}->{'comment'}, "\n";
print $result->{$email}->{'publickey'}, "\n\n";
}
Download My::PGPFindKey |