<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

	<title>Comments on: Multiple gpg keyid search (script?)</title>
	<link>http://ask.metafilter.com/233045/Multiple-gpg-keyid-search-script/</link>
	<description>Comments on Ask MetaFilter post Multiple gpg keyid search (script?)</description>
	<pubDate>Sun, 13 Jan 2013 11:25:33 -0800</pubDate>
	<lastBuildDate>Sun, 13 Jan 2013 12:40:32 -0800</lastBuildDate>
	<language>en-us</language>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	<ttl>60</ttl>

	<item>
		<title>Question: Multiple gpg keyid search (script?)</title>
		<link>http://ask.metafilter.com/233045/Multiple-gpg-keyid-search-script</link>	
		<description> I have a file listing all my long keyID&apos;s for GPG and want to lookup the emails associated with these. &lt;br /&gt;&lt;br /&gt;  I know the URL to do this is:&lt;br&gt;
http://pool.sks-keyservers.net:11371/pks/lookup?op=vindex&amp;amp;search=&lt;longidhere&gt;&lt;br&gt;
&lt;br&gt;
 and the command is:&lt;br&gt;
gpg --keyserver subset.pool.sks-keyservers.net --search-keys &lt;longid&gt;&lt;br&gt;
&lt;br&gt;
 But while I can do it with bash scripting for the commndline that command doesn&apos;t seem to find any of the keys I&apos;m loking for. &lt;br&gt;
&lt;br&gt;
 Perhaps I can do it with a webscraper like scrapy? Or how can I just query that webpage repeatedly with curl and differeing keyID&apos;s and save it so I can grep for @ email addresses?&lt;br&gt;
&lt;br&gt;
Here&apos;s a sample of what I want to get the emails out of:&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
BFD626E9E7E33BEFAAE1773AAF65AE980C825691 &lt;br&gt;
&lt;br&gt;
4AD605094A71F58A288798E915781F58CDB2035C &lt;br&gt;
E2E704E21AE3B2982AEA67E755E2E5CAAA7B03D8 &lt;br&gt;
CB8C76F75031D397D3D43E25D8D37CDC80AD896A &lt;br&gt;
5DCE001705FD8BFD5393D0991016CEC635EEA426 &lt;br&gt;
777D20CC1A9195721C18483A73F0EAC9B665CEAE &lt;br&gt;
&lt;br&gt;
2AF53915AB21C06AB0DA40FB8BE390A001783095 &lt;br&gt;
ADCE8685F8A579AD7473F8F3359D80CC09FA3867 &lt;br&gt;
EC7588DC114335696EEA7A444375E8D0871AD5AA &lt;br&gt;
D7122D53735F8F86509071C7A6CF5DA9B76A9024&lt;/longid&gt;&lt;/longidhere&gt;</description>
		<guid isPermaLink="false">post:ask.metafilter.com,2013:site.233045</guid>
		<pubDate>Sun, 13 Jan 2013 11:25:33 -0800</pubDate>
		<dc:creator>jago25_98</dc:creator>
		
			<category>bash</category>
		
			<category>scripting</category>
		
			<category>webscraping</category>
		
	</item>
	<item>
		<title>By: James Scott-Brown</title>
		<link>http://ask.metafilter.com/233045/Multiple-gpg-keyid-search-script#3375018</link>	
		<description>Did you remember to prefix these keys with &apos;0x&apos;?&lt;br&gt;
&lt;br&gt;
Without this, the queries will all fail.&lt;br&gt;
&lt;br&gt;
eg.&lt;br&gt;
http://pool.sks-keyservers.net:11371/pks/lookup?op=vindex&amp;amp;search=BFD626E9E7E33BEFAAE1773AAF65AE980C825691  FAILS&lt;br&gt;
http://pool.sks-keyservers.net:11371/pks/lookup?op=vindex&amp;amp;search=0xBFD626E9E7E33BEFAAE1773AAF65AE980C825691 WORKS</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2013:site.233045-3375018</guid>
		<pubDate>Sun, 13 Jan 2013 12:40:32 -0800</pubDate>
		<dc:creator>James Scott-Brown</dc:creator>
	</item><item>
		<title>By: James Scott-Brown</title>
		<link>http://ask.metafilter.com/233045/Multiple-gpg-keyid-search-script#3375031</link>	
		<description>If you save the keyIDs to a file called keys.txt (without manually adding &apos;0x&apos;), you can then extract the email addresses with this:&lt;br&gt;
&lt;br&gt;
while read line; do curl -s &quot;http://pool.sks-keyservers.net:11371/pks/lookup?op=vindex&amp;amp;search=0x$line&quot; | perl -nle &apos;print &quot;$1&quot; if (/&amp;lt;(.*?)&amp;gt;/)&apos;; done &amp;lt; keys.txt</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2013:site.233045-3375031</guid>
		<pubDate>Sun, 13 Jan 2013 13:00:40 -0800</pubDate>
		<dc:creator>James Scott-Brown</dc:creator>
	</item><item>
		<title>By: jago25_98</title>
		<link>http://ask.metafilter.com/233045/Multiple-gpg-keyid-search-script#3378251</link>	
		<description>Thanks James, the curl loop was what I needed. &lt;br&gt;
All the best greppers seem to use perl. I had to switch to grep:&lt;br&gt;
&lt;br&gt;
while read line; do curl -s &quot;http://pool.sks-keyservers.net:11371/pks/lookup?op=vindex&amp;amp;search=0x$line&quot; |grep -Eio &apos;([[:alnum:]_.-]+@[[:alnum:]_.-]+?\.[[:alpha:].]{2,6})&apos; ; done &amp;lt; keys1-processed1.txt.csv&lt;br&gt;
&lt;br&gt;
This was strangley rewarding. &lt;br&gt;
&lt;br&gt;
This could be abused. There should be some way of protecting PGP users from spam harvesting this way&lt;strong&gt;&lt;/strong&gt;</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2013:site.233045-3378251</guid>
		<pubDate>Wed, 16 Jan 2013 05:37:17 -0800</pubDate>
		<dc:creator>jago25_98</dc:creator>
	</item>
	</channel>
</rss>
