<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Aaron Toponce &#187; Aaron Toponce</title>
	<atom:link href="http://pthree.org/author/administrator/feed/" rel="self" type="application/rss+xml" />
	<link>http://pthree.org</link>
	<description>Linux.  GNU.  Freedom.</description>
	<lastBuildDate>Sun, 05 Feb 2012 14:33:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-alpha</generator>
		<item>
		<title>DISCLAIMER</title>
		<link>http://pthree.org/2012/02/05/disclaimer/</link>
		<comments>http://pthree.org/2012/02/05/disclaimer/#comments</comments>
		<pubDate>Sun, 05 Feb 2012 14:33:06 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=2199</guid>
		<description><![CDATA[DISCLAIMER: By sending me email, you agree to the following: I am, by definition, &#8220;the intended recipient&#8221;. All information in the email is mine to do with as I see fit and make such financial profit, political mileage, or good joke as it lends itself to. In particular, I may quote it where I please. [...]]]></description>
			<content:encoded><![CDATA[<p>DISCLAIMER: By sending me email, you agree to the following:</p>
<ul>
<li>I am, by definition, &#8220;the intended recipient&#8221;.</li>
<li>All information in the email is mine to do with as I see fit and make such financial profit, political mileage, or good joke as it lends itself to. In particular, I may quote it where I please.</li>
<li>I may take the contents as representing the views of your company.</li>
<li>This disclaimer overrides any disclaimer or statement of confidentiality that may be included on your message.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2012/02/05/disclaimer/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Protesting SOPA/PIPA</title>
		<link>http://pthree.org/2012/01/17/protesting-sopa-pipa/</link>
		<comments>http://pthree.org/2012/01/17/protesting-sopa-pipa/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 21:50:50 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=2189</guid>
		<description><![CDATA[Starting Jan 18, 2011 at 00:00 UTC, this blog will be joining many others to protest SOPA and PIPA. I strongly oppose the views outlined in the bill, and with a Google Pagerank of 4/10, with almost 650 RSS readers, and about 1,500 hits to my site per day, I&#8217;ll be taking advantage of these [...]]]></description>
			<content:encoded><![CDATA[<p>Starting Jan 18, 2011 at 00:00 UTC, this blog will be joining many others to protest SOPA and PIPA. I strongly oppose the views outlined in the bill, and with a Google Pagerank of 4/10, with almost 650 RSS readers, and about 1,500 hits to my site per day, I&#8217;ll be taking advantage of these numbers, and showing my disgust for SOPA/PIPA. Join me, and many others, by joining the strike at <a href="http://americancensorship.org">http://americancensorship.org</a>. Now, a note to my (current and future) political representatives in Utah.</p>
<p>Dear Jim Matheson, Rob Bishop, Jason Chaffetz, Orrin Hatch and Mike Lee:</p>
<p>If you vote in favor of supporting SOPA and PIPA passing, not only will you not get a vote from me, I&#8217;ll launch an online campaign to make sure I take as many people with me this November in doing the same (I&#8217;ll tell you right now Mr. Hatch, that <a href="http://peteashdown.org">Pete Ashdown</a> already has my vote, but its not too late to withold the campaign). The ball is in your court.</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2012/01/17/protesting-sopa-pipa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Encrypted Mutt IMAP/SMTP Passwords</title>
		<link>http://pthree.org/2012/01/07/encrypted-mutt-imap-smtp-passwords/</link>
		<comments>http://pthree.org/2012/01/07/encrypted-mutt-imap-smtp-passwords/#comments</comments>
		<pubDate>Sat, 07 Jan 2012 15:16:56 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=2183</guid>
		<description><![CDATA[Rather than storing your IMAP and SMTP passwords in plain text on disk, you can store them encrypted using GnuPG, OpenSSL, the GNOME Keyring, or any other method of password storage encryption. It still requires a &#8220;master password&#8221; from you to decrypt the file(s) on the fly, and set the appropriate passwords, but then it [...]]]></description>
			<content:encoded><![CDATA[<p>Rather than storing your IMAP and SMTP passwords in plain text on disk, you can store them encrypted using GnuPG, OpenSSL, the GNOME Keyring, or any other method of password storage encryption. It still requires a &#8220;master password&#8221; from you to decrypt the file(s) on the fly, and set the appropriate passwords, but then it will remain in RAM in plain text for the duration Mutt is running, and no worries about the password in plain text going to disk.</p>
<p>Here&#8217;s how I set mine up using my GnuPG key. First, I created a ~/.mutt/passwords file. The file is in plain text. Before encrypting it, here are its contents:</p>
<pre>set imap_pass="password"
set smtp_pass="password"</pre>
<p>I then encrypt that file with the following command:</p>
<pre>% gpg -r your.email@example.com -e ~/.mutt/passwords
% ls ~/.mutt/passwords*
/home/user/.mutt/passwords /home/user/.mutt/passwords.gpg
% shred ~/.mutt/passwords
% rm ~/.mutt/passwords</pre>
<p>The last two commands are to ensure that the temporary file you created for encryption is securely wiped from the disk using the GNU Shred utility. Now, you should only have an encrypted binary data file that contains your passwords. All that is left is to configure Mutt to decrypt them when starting up. You can set that easily in your Muttrc:</p>
<pre>source "gpg -d ~/.mutt/passwords.gpg |"</pre>
<p>The string is just a standard string. Also, it&#8217;s important to have &#8220;|&#8221; at the end of the command, to pipe the output to Mutt, so it can be appropriately sourced.</p>
<p>At this point, you should be able to launch Mutt, be asked for the passphrase for your private GnuPG key, and it should log you in to your IMAP account. You should also be able to send mail as normal, logging automatically into your SMTP account. The only time you are asked for a password, is your GnuPG passphrase when starting Mutt. If your &#8220;gpg-agent&#8221; is already running, and you&#8217;ve configured GnuPG to use the agent and added your private key to it, then starting Mutt won&#8217;t ask you for your key passphrase, and will use the agent instead.</p>
<p>Other than temporarily creating the plain text file to encrypt, which stores your passwords, and which you promptly and securely shred later, your IMAP/SMTP passwords for your remote account are never on disk in plain text.</p>
<p>Happy encrypted hacking!</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2012/01/07/encrypted-mutt-imap-smtp-passwords/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>My Google Voice Rant</title>
		<link>http://pthree.org/2012/01/05/my-google-voice-rant/</link>
		<comments>http://pthree.org/2012/01/05/my-google-voice-rant/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 09:01:50 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=2172</guid>
		<description><![CDATA[So, I&#8217;ve been a Google Voice subscriber for about 2 years. I have one of the most awesome phone numbers you can get: 686-8086 (it has an inside geek reference to x86-based CPU architectures, and also to my PGP key ID of 0x8086060F. Awesome, eh?!). I&#8217;ve used it for SMS text messaging, receiving calls, and [...]]]></description>
			<content:encoded><![CDATA[<p>So, I&#8217;ve been a Google Voice subscriber for about 2 years. I have one of the most awesome phone numbers you can get: 686-8086 (it has an inside geek reference to x86-based CPU architectures, and also to my PGP key ID of 0x8086060F. Awesome, eh?!). I&#8217;ve used it for SMS text messaging, receiving calls, and placing calls (almost 4,000 total calls). I&#8217;ve used it for conference calls as well. I&#8217;ve blocked spammers, recorded calls, transferred calls, and pretty much have used it fully. After all this, I have some gripes.</p>
<ul>
<li>I get A LOT of missed calls when people call my Google Voice number.</li>
<li>I get A LOT of static on the line versus calling my cell directly (I honestly don&#8217;t understand why).</li>
<li>Managing the &#8220;other&#8221; numbers for contacts is messy.</li>
<li>Conference calls only support 4 people- you, and 3 other callers.</li>
<li>Conference calls can only be initiated when people call your Voice number (you cannot invite people to the call).</li>
<li>When using SMS on Android, the notifications are filled with the name presented twice- once for the Google Contact contact, and then again for the Voice Caller ID.</li>
<li>Unless you&#8217;re using Android (or maybe other OSes), calling from your phone will not show the Google Voice number on their caller ID, unless you call your Voice number first, then follow the phone tree to dial the number you wish to call (a PITA).</li>
<li>Some cell phone providers offer unlimited minutes when calling other cellular phones. Using Voice means calling a landline, which means using your minutes, regardless of who made the call.</li>
</ul>
<p>I like the spam options of the service. It has come in handy. And I&#8217;ve recorded a few phone calls for logging reasons. However, I&#8217;ve found that using Google Voice in totality is becoming more of a pain than a benefit. Losing calls is especially annoying, definitely when you&#8217;re waiting for a job offer (ugh). I&#8217;ll continue to hand out the number to companies and people that I don&#8217;t care much about, but I&#8217;ve been handing my cell phone number out more and more lately, because Voice is just getting in the way.</p>
<p>Anyway, just had to get this off my chest (missing a call this morning was REALLY upsetting, and sparked the post).</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2012/01/05/my-google-voice-rant/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Making Sense of Hashed Hosts in ~/.ssh/known_hosts</title>
		<link>http://pthree.org/2011/12/30/making-sense-of-hashed-hosts-in-sshknown_hosts/</link>
		<comments>http://pthree.org/2011/12/30/making-sense-of-hashed-hosts-in-sshknown_hosts/#comments</comments>
		<pubDate>Fri, 30 Dec 2011 21:19:57 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[Cryptology]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=2168</guid>
		<description><![CDATA[I don&#8217;t expect you to follow this post completely, but it&#8217;s so amazingly cool, I have to blog it. Consider the hashed sections of ~/.ssh/known_hosts file for (recent) OpenSSH clients, not including the public key parts: &#124;1&#124;kFJT5z0x3ndyutgZ4E5pRk+ORBA=&#124;hzXvdYUudo+qK9BGlFWtSAUXlXc= &#124;1&#124;8wo1+FO0hkATPgQZoeNHeIlvAjw=&#124;dt/a9jz9CnLKP72j+Jr8MKMjgEE= &#124;1&#124;pvBQEKEGLnH0RCJr+8Dmqqnvlrs=&#124;fJJvjyG/TmHFnuIX57nDThq/C4M= &#124;1&#124;HKV4DzgDkajXoUHf9B82JBu7J10=&#124;c/K+MdJvWaZeJFs/W7iqhqo0wvE= &#124;1&#124;rtvQhRVnNanQZYkLUMbjoBGNhn0=&#124;0U6a1LUQqLL6P1T2Wji3VWw69pw= &#124;1&#124;0ziSYi4c+xBXGEBZcNN1LMhYUc4=&#124;qRSN5GSPyQi+fmaVz2zNwkmKoy8= &#124;1&#124;6nv6Vpk3AYgICHxJGVgVdsYRuq0=&#124;fBNOIz1l3RW+N61jyDPunKX9n7E= &#124;1&#124;+b4uA+Mq7RHRAFW21qv8aO3rIRs=&#124;1eizMri01IxEKrXquBnwTYP61Ow= &#124;1&#124;BkB0PZu2qtsLID/Ibe/D68gANQU=&#124;qW6uAzcpecOOKNI4zEvngyfpGkI= &#124;1&#124;n+QrRn7QXeAJ5hRe2M8v8IspihE=&#124;EqUxXdSeIF1cl1fQjl5zILebkGY= &#124;1&#124;BOKuKnWojy028tJf9Y671lws0d0=&#124;SuBQJmJZp5JNVYG/rP9yb9ZhJcE= &#124;1&#124;WACsxtodOiM89kf4rNPLgF1CXZ4=&#124;UTccVeLDZJF3wlH8V05XJNlsOBw= &#124;1&#124;o6FFoirXYblM7wBMdeJDYGMPI58=&#124;5jJB7T7itY702ZHHByXtSpGk9SE= The column fields are similar to [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t expect you to follow this post completely, but it&#8217;s so amazingly cool, I have to blog it. Consider the hashed sections of ~/.ssh/known_hosts file for (recent) OpenSSH clients, not including the public key parts:</p>
<pre>|1|kFJT5z0x3ndyutgZ4E5pRk+ORBA=|hzXvdYUudo+qK9BGlFWtSAUXlXc=
|1|8wo1+FO0hkATPgQZoeNHeIlvAjw=|dt/a9jz9CnLKP72j+Jr8MKMjgEE=
|1|pvBQEKEGLnH0RCJr+8Dmqqnvlrs=|fJJvjyG/TmHFnuIX57nDThq/C4M=
|1|HKV4DzgDkajXoUHf9B82JBu7J10=|c/K+MdJvWaZeJFs/W7iqhqo0wvE=
|1|rtvQhRVnNanQZYkLUMbjoBGNhn0=|0U6a1LUQqLL6P1T2Wji3VWw69pw=
|1|0ziSYi4c+xBXGEBZcNN1LMhYUc4=|qRSN5GSPyQi+fmaVz2zNwkmKoy8=
|1|6nv6Vpk3AYgICHxJGVgVdsYRuq0=|fBNOIz1l3RW+N61jyDPunKX9n7E=
|1|+b4uA+Mq7RHRAFW21qv8aO3rIRs=|1eizMri01IxEKrXquBnwTYP61Ow=
|1|BkB0PZu2qtsLID/Ibe/D68gANQU=|qW6uAzcpecOOKNI4zEvngyfpGkI=
|1|n+QrRn7QXeAJ5hRe2M8v8IspihE=|EqUxXdSeIF1cl1fQjl5zILebkGY=
|1|BOKuKnWojy028tJf9Y671lws0d0=|SuBQJmJZp5JNVYG/rP9yb9ZhJcE=
|1|WACsxtodOiM89kf4rNPLgF1CXZ4=|UTccVeLDZJF3wlH8V05XJNlsOBw=
|1|o6FFoirXYblM7wBMdeJDYGMPI58=|5jJB7T7itY702ZHHByXtSpGk9SE=</pre>
<p>The column fields are similar to that of the /etc/shadow file on GNU systems, except where the &#8220;$&#8221; is the column delimiter, &#8220;|&#8221; is in this case. If the string was &#8220;|1|o6FFoirXYblM7wBMdeJDYGMPI58=|5jJB7T7itY702ZHHByXtSpGk9SE=&#8221;, then the breakdown is as follows:</p>
<ul>
<li><strong>|1</strong>- HASH_MAGIC. This tells the client that the host information has been salted and hashed with the SHA1 algorithm.</li>
<li><strong>|o6FFoirXYblM7wBMdeJDYGMPI58=</strong> This is the salt applied to the host- base 64 encoded 160-bit string.</li>
<li><strong>|5jJB7T7itY702ZHHByXtSpGk9SE=</strong> This is the base 64 encoded version of the hashed host</li>
</ul>
<p>Now, if you want to get at the actual strings, not base 64 encoded, you could run the following command (I admit, not elegant, and could probably be better solved without nesting, and a single awk(1) statement, but I&#8217;ll get to that later):</p>
<pre>% echo $(echo o6FFoirXYblM7wBMdeJDYGMPI58= | openssl base64 -d | xxd | cut -c 10-48) | sed 's/ //g'
a3a145a22ad761b94cef004c75e24360630f239f
% echo $(echo 5jJB7T7itY702ZHHByXtSpGk9SE= | openssl base64 -d | xxd | cut -c 10-48) | sed 's/ //g'
e63241ed3ee2b58ef4d991c70725ed4a91a4f521</pre>
<p>There you have it. Very cool. Now, the only question is how to apply the salt to the hostname, to get to the hash? I&#8217;m working that out, but I wasn&#8217;t motivated enough to get to it. Of course, there&#8217;s no application to this, that I can tell, unless you want to brute force the known_hosts file.</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2011/12/30/making-sense-of-hashed-hosts-in-sshknown_hosts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Boycott GoDaddy</title>
		<link>http://pthree.org/2011/12/23/boycott-godaddy/</link>
		<comments>http://pthree.org/2011/12/23/boycott-godaddy/#comments</comments>
		<pubDate>Fri, 23 Dec 2011 14:46:25 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=2161</guid>
		<description><![CDATA[I generally don&#8217;t jump on boycotting bandwagons, usually because they are severely misguided and misinformed, and they&#8217;re usually interested in spreading FUD more than just reporting the issue at hand. However, on December 29th, 2011, I will be transferring all of my 15 domains away from GoDaddy, because they support the SOPA and Protect IP [...]]]></description>
			<content:encoded><![CDATA[<p>I generally don&#8217;t jump on boycotting bandwagons, usually because they are severely misguided and misinformed, and they&#8217;re usually interested in spreading FUD more than just reporting the issue at hand. However, on December 29th, 2011, I will be transferring all of my 15 domains away from GoDaddy, because they support the SOPA and Protect IP bills. You can read more about this at <a href="http://www.reddit.com/r/politics/comments/nmnie/godaddy_supports_sopa_im_transferring_51_domains/">http://www.reddit.com/r/politics/comments/nmnie/godaddy_supports_sopa_im_transferring_51_domains/</a>. Further, there is a boycott site for boycotting GoDaddy, where you can pledge that you will be moving your domains. This site is found at <a href="http://godaddyboycott.org/">http://godaddyboycott.org/</a>.</p>
<p>December 29th is the day, if I don&#8217;t feel the itch to do it before then.</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2011/12/23/boycott-godaddy/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Expand URLs in Irssi</title>
		<link>http://pthree.org/2011/12/22/expand-urls-in-irssi/</link>
		<comments>http://pthree.org/2011/12/22/expand-urls-in-irssi/#comments</comments>
		<pubDate>Thu, 22 Dec 2011 18:36:46 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[irssi]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=2157</guid>
		<description><![CDATA[If you&#8217;re an IRC junkie, and spend hours a day in Irssi, then this post might be useful to you. It&#8217;s all the rage these days to shorten URLs with fancy URL shortening services. Heck, even I have one. They are certainly nice to have, when links are exceptionally long, such as search result URLs, [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re an IRC junkie, and spend hours a day in Irssi, then this post might be useful to you.</p>
<p>It&#8217;s all the rage these days to shorten URLs with fancy URL shortening services. Heck, even I have one. They are certainly nice to have, when links are exceptionally long, such as search result URLs, and just the mere wrapping from one line to the next breaks the URL (not to mention, any additional characters added in the line break, such as spaces, other characters, etc.). I&#8217;ve used, and still use, link shortening services for IM, IRC, email, Identi.ca, Twitter, etc., only when I suspect the link could break as a result of line wrapping. I use them sparingly, and only use them if they provide a preview feature, giving the link to the preview.</p>
<p>While they have their advantages, they certainly come with a cost. Link rot is a very real concern, should the link shortening service go offline. You can nest shortened links in each other, concealing JavaScript/CSS mouse hovers. They can contain all sorts of nasties, and you don&#8217;t know what you&#8217;re getting into, unless you use some sort of software to expand the URL for you, before you actually follow the link. I&#8217;ve already blogged about using a simple shell function to expand shortened URLs (post at <a href="http://pthree.org/2011/10/18/use-wget1-to-expand-shortened-urls/">http://pthree.org/2011/10/18/use-wget1-to-expand-shortened-urls</a>/). Well, now it&#8217;s time for Irssi to automatically provide the function for me.</p>
<p>Presenting <a href="https://github.com/jcande/Expand-URLs">https://github.com/jcande/Expand-URLs</a>. This is a simple Irssi script that will identify URLs in a given notice, whether in private or in public, and expand them using the <a href="http://longurl.org">http://longurl.org</a> service (I think a patch for doing the lookup without a 3rd party should probably be submitted, as any 3rd party expanding service might go offline).</p>
<p>For me, this script is exceptionally valuable, because I connect to a local Bitlbee instance with Irssi, and use Bitlbee to connect to Twitter. Unfortunately, Twitter wants to track your clicks with their http://t.co service. Every link longer than 19 characters (20 for HTTPS) submitted to Twitter is automatically shortened with this wrapper. They claim that the service is to identify malicious links, and prevent them from being posted, should one be identified. But certainly, a company the size of Twitter can do so much more with this new &#8220;service&#8221;. They could track what links are clicked and when. They can use this information to identify what stuff you&#8217;re interested in, and when you use the service. They can track who clicks the link by IP or ISP. Of course, it would be foolish to not sell this information to advertisers, to target additional advertising on Twitter or other sites, based on this info.</p>
<p>At any event, this is one of the few Irssi scripts that I find really, really useful for day-to-day. It makes the Twitter timeline a bit chatty, now that lengthy URLs are being shown, and a few break due to line wrapping. And that is a pain, no doubt. But, the vast majority of links don&#8217;t break, and it&#8217;s nice seeing where I&#8217;ll be taken when visiting the link. Keeping Twitter from tracking me, despite the occasional link breakage, is worth it.</p>
<p>P.S.: There is also a WeeChat script at <a href="http://www.weechat.org/files/scripts/expand_url.pl">http://www.weechat.org/files/scripts/expand_url.pl</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2011/12/22/expand-urls-in-irssi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Note About Removing Files With find(1)</title>
		<link>http://pthree.org/2011/12/20/a-note-about-removing-files-with-find1/</link>
		<comments>http://pthree.org/2011/12/20/a-note-about-removing-files-with-find1/#comments</comments>
		<pubDate>Wed, 21 Dec 2011 01:01:55 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=2149</guid>
		<description><![CDATA[I&#8217;ve seen on the internet, and elsewhere, that when there are too many arguments for rm(1) to handle, that the following command will suffice: % find /path -exec rm -rf {} \; While certainly functional, it&#8217;s not optimal. If there are thousands of files (as is often the case at my job), this command is [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve seen on the internet, and elsewhere, that when there are too many arguments for rm(1) to handle, that the following command will suffice:</p>
<pre>% find /path -exec rm -rf {} \;</pre>
<p>While certainly functional, it&#8217;s not optimal. If there are thousands of files (as is often the case at my job), this command is slow, slow, slow. The reason being are all the excessive fork() and exec() calls for each pass with rm(1). Instead, you could optimize find(1) by using &#8220;-delete&#8221;:</p>
<pre>% find /path -delete</pre>
<p>This is much more optimal, but it has one VERY nasty side effect. If you place &#8220;-delete&#8221; in the wrong spot in your find(1) command, you could delete all the files listed under &#8220;/path&#8221; before processing the necessary logic. From the find(1) manual:</p>
<blockquote><p><strong>Warnings:</strong> Don&#8217;t forget that the find command line is evaluated as an expression, so putting -delete first will make find try to delete everything below the starting points you specified. When testing a find line that you later intend to use with -delete, you should explicitly specify -depth in order to avoid later surprises. Because -delete implies -depth, you cannot usefully use -prune and -delete together.</p></blockquote>
<p>One nice benefit of &#8220;-delete&#8221;, however, is the proper handling of NUL characters in your filename, such as spaces, tabs or the newline character. Thankfully, there is another option, which is not only supported in GNU/Linux, but also in FreeBSD (and perhaps others):</p>
<pre>% find /path -print0 | xargs -0 rm -rf</pre>
<p>This avoids the excessive fork() and exec() system calls from our first command, and doesn&#8217;t have the nasty side effects of &#8220;-delete&#8221;. Further, because of &#8220;-print0&#8243; as a find(1) argument, and &#8220;-0&#8243; with xargs(1), we can handle files properly with NUL characters. Time the three commands above, and you&#8217;ll see that the last is most optimal.</p>
<p>We can squeeze some extra juice out of the command, though. All we need to do is cd(1) to the directory we wish to operate our find(1) command on:</p>
<pre>% cd /path &#038;&#038; find . -print0 | xargs -0 rm -rf</pre>
<p>Working with removing millions of files (yes, I do actually remove that many, often), I have found this latest find(1) command to be the most optimized in terms of sheer speed. It moves. You may find the same results as I.</p>
<p>FYI.</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2011/12/20/a-note-about-removing-files-with-find1/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Steganography</title>
		<link>http://pthree.org/2011/12/15/steganography/</link>
		<comments>http://pthree.org/2011/12/15/steganography/#comments</comments>
		<pubDate>Thu, 15 Dec 2011 23:58:05 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=2134</guid>
		<description><![CDATA[I have been familiar with steganography for a number of years. In fact, back when I was in middle school, I developed a fascination for encryption, and hiding messages, mostly so I could pass notes back and forth to classmates during class. It wasn&#8217;t long before I found &#8220;invisible ink&#8221;, which is a form of [...]]]></description>
			<content:encoded><![CDATA[<p>I have been familiar with steganography for a number of years. In fact, back when I was in middle school, I developed a fascination for encryption, and hiding messages, mostly so I could pass notes back and forth to classmates during class. It wasn&#8217;t long before I found &#8220;invisible ink&#8221;, which is a form of steganography. While I&#8217;m certainly no expert on the subject, I decided to have a bit of fun with my email.</p>
<p>I placed a hidden message in my email headers for a bit (I&#8217;ve since stopped, for various reasons). I considered it an &#8220;Easter Egg&#8221; of sorts, waiting for someone to notice. Here is what I placed in the headers:</p>
<pre>Crypto-Challenge: iVBORw0KGgoAAAANSUhEUgAAADwAAAA8AQMAAAAAMksxAAAABlBMVEX
       ///8AAABVwtN+AAAAtklEQVQokXXQMQ6CMBQG4McCiykXMPEKsuEiV2nCBdoLWNgN
       Xqld7MYZeoQSFgbisyZWER//9E1//vcAYhQOvkB0X3AQotBAoZ5lV9hpA63ZxCP5Q
       SiE5N28QpjRxT0rhFzi7BWUlx3LQvMH+x1jx7IEAoer8hVqR4Crhp1fhf9QI976tF
       oAIGlYWTkCCr3I7yTCpTkaDQTqWUhjtFtCNizNgEbbZxMFDnIYrHUEwjPRnywQiHk
       CI/3gDHrryF4AAAAASUVORK5CYII=
Crypto-Hint: image/png</pre>
<p>Quickly, you should identify the &#8220;Crypto-Challenge&#8221; header as base 64-encoded string. The hint says it&#8217;s an image, of type PNG. So, the following Python code should do the trick:</p>
<div class="codecolorer-container python twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="python codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;"># assuming the 'img_string' variable is the actual base64 string above</span><br />
f <span style="color: #66cc66;">=</span> <span style="color: #008000;">open</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'crypto-image.png'</span><span style="color: #66cc66;">,</span><span style="color: #483d8b;">'w'</span><span style="color: black;">&#41;</span><br />
f.<span style="color: black;">write</span><span style="color: black;">&#40;</span>img_string.<span style="color: black;">decode</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'base64'</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><br />
f.<span style="color: black;">close</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></div></td></tr></tbody></table></div>
<p>Running that code with the base 64-encoded string above gives the following image:</p>
<p><img src="http://pthree.org/wp-content/uploads/2011/12/crypto-image.png" alt="" title="crypto-image" width="60" height="60" class="aligncenter size-full wp-image-2135" /></p>
<p>Scanning the QR code reveals the text &#8220;42&#8243;, of which most geeks should recognize as &#8220;The Answer to the Ultimate Question of Life, the Universe, and Everything&#8221;.</p>
<p>Of course, steganography isn&#8217;t encryption. It&#8217;s security by obscurity, which isn&#8217;t security, where a message is hidden by obscuring it through some means. Wikipedia has a great article on it at <a href="https://en.wikipedia.org/wiki/Steganography">https://en.wikipedia.org/wiki/Steganography</a>.</p>
<p>What can you do with hidden messages in images (or vice versa, as in the case with my email &#8220;Easter Egg&#8221;)? Well, for one, you can easily get around email attachment restrictions. For example, take a ZIP archive. Perhaps some organization blocks email with .zip attachments. Why not convert the archive to base 64, then convert the result to an image. You might end up with something like this:</p>
<div class="codecolorer-container python twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br /></div></td><td><div class="python codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #ff7700;font-weight:bold;">from</span> PIL <span style="color: #ff7700;font-weight:bold;">import</span> Image<br />
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">base64</span><br />
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">math</span><br />
<br />
<span style="color: #808080; font-style: italic;"># function to return max image size</span><br />
<span style="color: #ff7700;font-weight:bold;">def</span> get_size<span style="color: black;">&#40;</span>size<span style="color: black;">&#41;</span>:<br />
&nbsp; &nbsp; width <span style="color: #66cc66;">=</span> height <span style="color: #66cc66;">=</span> <span style="color: #008000;">int</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">math</span>.<span style="color: black;">ceil</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">math</span>.<span style="color: black;">sqrt</span><span style="color: black;">&#40;</span>size/<span style="color: #ff4500;">3</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; diff <span style="color: #66cc66;">=</span> <span style="color: #008000;">int</span><span style="color: black;">&#40;</span><span style="color: black;">&#40;</span><span style="color: black;">&#40;</span>width * height<span style="color: black;">&#41;</span> * <span style="color: #ff4500;">3</span><span style="color: black;">&#41;</span> - size<span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: black;">&#40;</span>width<span style="color: #66cc66;">,</span> height<span style="color: #66cc66;">,</span> diff<span style="color: black;">&#41;</span><br />
<br />
<span style="color: #808080; font-style: italic;"># open our binary non-image file</span><br />
f <span style="color: #66cc66;">=</span> <span style="color: #008000;">open</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'archive.zip'</span><span style="color: #66cc66;">,</span><span style="color: #483d8b;">'rb'</span><span style="color: black;">&#41;</span><br />
<br />
<span style="color: #808080; font-style: italic;"># convert the binary to a base64-encoded string</span><br />
enc_bytes <span style="color: #66cc66;">=</span> <span style="color: #dc143c;">base64</span>.<span style="color: black;">b64encode</span><span style="color: black;">&#40;</span>f.<span style="color: black;">read</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><br />
f.<span style="color: black;">close</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><br />
<br />
<span style="color: #808080; font-style: italic;"># get file size to hold data (square)</span><br />
<span style="color: black;">&#40;</span>w<span style="color: #66cc66;">,</span>h<span style="color: #66cc66;">,</span>d<span style="color: black;">&#41;</span> <span style="color: #66cc66;">=</span> get_size<span style="color: black;">&#40;</span><span style="color: #008000;">len</span><span style="color: black;">&#40;</span>enc_bytes<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><br />
<br />
<span style="color: #808080; font-style: italic;"># pad with zeros, if necessary</span><br />
<span style="color: #ff7700;font-weight:bold;">if</span> d <span style="color: #66cc66;">&gt;</span> <span style="color: #ff4500;">0</span>:<br />
&nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">for</span> i <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">range</span><span style="color: black;">&#40;</span>d<span style="color: black;">&#41;</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; enc_bytes +<span style="color: #66cc66;">=</span> <span style="color: black;">&#40;</span><span style="color: #483d8b;">'<span style="color: #000099; font-weight: bold;">\0</span>'</span><span style="color: black;">&#41;</span><br />
<br />
<span style="color: #808080; font-style: italic;"># create our final image</span><br />
img <span style="color: #66cc66;">=</span> Image.<span style="color: black;">frombuffer</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'RGB'</span><span style="color: #66cc66;">,</span><span style="color: black;">&#40;</span>w<span style="color: #66cc66;">,</span>h<span style="color: black;">&#41;</span><span style="color: #66cc66;">,</span>enc_bytes<span style="color: #66cc66;">,</span><span style="color: #483d8b;">'raw'</span><span style="color: #66cc66;">,</span><span style="color: #483d8b;">'RGB'</span><span style="color: #66cc66;">,</span><span style="color: #ff4500;">0</span><span style="color: #66cc66;">,</span><span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span><br />
img.<span style="color: black;">save</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'image.png'</span><span style="color: black;">&#41;</span></div></td></tr></tbody></table></div>
<p>Your final image might end up like:</p>
<p><img src="http://pthree.org/wp-content/uploads/2011/12/image.png" alt="" title="image" width="427" height="427" class="aligncenter size-full wp-image-2138" /></p>
<p>In our case, I just created a file from /dev/urandom, zipped it up, and converted to an image. Thus, the reason the data in the image appears so random. More structured files will show actual structure in the final image. Also, notice the string of black at the bottom as a result of our padded zeros to adjust for a square image, without losing data.</p>
<p>Of course, to get back to the archive, you just need to reverse the process of converting the image to a base64 string, then back to the original file. Now, I&#8217;m no Python expert, and I realize there is much more to add to the code, such as &#8220;try/except&#8221; blocks for testing files, writable directories, etc. The point of the code was just to demonstrate an overall algorithm.</p>
<p>Hopefully, this is of some interest to some of my readers. I&#8217;m open to code improvements. Thanks to <a href="https://diablohorn.wordpress.com/2010/12/04/whats-in-a-picture">https://diablohorn.wordpress.com/2010/12/04/whats-in-a-picture</a> for use of the code above.</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2011/12/15/steganography/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Burgers As A Service</title>
		<link>http://pthree.org/2011/11/28/burgers-as-a-service/</link>
		<comments>http://pthree.org/2011/11/28/burgers-as-a-service/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 14:20:11 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[OSS]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=2125</guid>
		<description><![CDATA[There is this burger shop near my home that makes the most amazing burgers, fries and shakes. Bar none. The burgers, of which there is quite the variety, each have their own &#8220;secret sauce&#8221; that gives each burger its own unique flavor. The fries also have various dipping sauces you can order, each of which [...]]]></description>
			<content:encoded><![CDATA[<p>There is this burger shop near my home that makes the most amazing burgers, fries and shakes. Bar none. The burgers, of which there is quite the variety, each have their own &#8220;secret sauce&#8221; that gives each burger its own unique flavor. The fries also have various dipping sauces you can order, each of which are &#8220;secret sauces&#8221;. Lastly, the shakes, which seems to have a never ending array of flavors, each have their own &#8220;secret recipe&#8221; to the flavor. Because of these trade secrets, the burgers, fries and shakes are outstanding!</p>
<p>It&#8217;s more than just taste too. Portions are epic. They have the &#8220;Big Ben&#8221; burger, which cut in half would produce two Big Macs from McDonald&#8217;s. Then there&#8217;s the &#8220;Double Ben&#8221;, with two patties and the &#8220;Triple Ben&#8221; with three patties. Add on the amount of fries, and the size of the shake, and you could easily feed a family of four with one order of the Triple Ben.</p>
<p>Lastly, the service is amazing. Every time I&#8217;ve visited, I&#8217;ve gotten outstanding service from the employees, and the turn around time on preparing my meal is fast. Maybe not as fast as a &#8220;fast food&#8221; joint, but certainly not as long as your standard dine-in restaurant either. As a result, I recommend Burger Bar in Roy, Utah to anyone and everyone. If you&#8217;re a burger, fries and milkshake lover like I am, you&#8217;ll love this burger stand.</p>
<p>However, despite the amazing food, epic portions and fantastic service, Burger Bar operates on trade secrets. The recipes for their burger sauces, dipping sauces and shakes are all proprietary. Further, they aren&#8217;t free. I pay ~10-12 dollars for lunch whenever I want to pay them a visit. If I bring a party of 6 or 8, I don&#8217;t get a bulk discount either. So, aside from the food and the service, everything about the experience is proprietary and vendor-controlled.</p>
<p>I&#8217;m okay with that. So why is it that some people aren&#8217;t? Well, not with burgers, but with SaaS, or &#8220;software as a service&#8221;. Of course, I&#8217;m referring to Facebook, Google+, Gmail, Bit.ly, and other software vendors that provide an online service to their userbase.</p>
<p>It seems to be the latest &#8220;fad&#8221; (call it what you will) to oppose proprietary SaaS solutions, or sites with proprietary JavaScript licenses. Companies, such as Facebook, operate on trade secrets. Their server-side code certainly isn&#8217;t open to the public, and their JavaScript is obfuscated as much as possible to prevent prying eyes from making any sense out of it (as well as minimize bandwidth). Now, I no longer have a Facebook account, but I left Facebook for other reasons. Mostly, if Facebook was a burger joint, I&#8217;m confident that they are trying to poison me, without me catching on. But that&#8217;s beside the point. Facebook offers a service, entirely proprietary, much the same way Burger Bar offers a service, entirely proprietary.</p>
<p>Yet, it&#8217;s okay to eat the burger, but not okay to use Facebook. It&#8217;s okay to ignore the trade secrets of a restaurant, but not okay to ignore the trade secrets of a software vendor. Now, don&#8217;t get me wrong. I&#8217;m certainly not advocating, endorsing or condoning trade secrets, such as copyrights, patents, trademarks, etc., where the intent is to defend your intellectual property at all costs. All I&#8217;m saying is, when it comes to software, I view SaaS a bit differently than installed software.</p>
<p>Continuing the food analogy, when I prepare food in my home, I want to know what&#8217;s in it. The FDA in the United States feels the same, and as a result, ingredient lists are required to be printed on every packaged food source. So, when making my own burger, I have the right to know exactly how to prepare it, down to making my own &#8220;secret sauce&#8221;. I have the source code to my burger, so to speak, and I can make all sorts of fantastic burgers with that &#8220;source&#8221;. Yet, when I visit a restaurant, I don&#8217;t need to know the &#8220;source code&#8221;, so long as I feel confident the restaurant isn&#8217;t trying to poison me or make me sick.</p>
<p>I treat my computer much the same way. My laptop is my home, where I can make my own recipes to create my own software. I have full control over my data, and by having access to the source, make sure the software is respecting my data too (among other things). Google is my restaurant, where I can order software, perhaps pay a premium, and enjoy a good experience, with someone else&#8217;s trade secrets. I decide what data to give them, and what not to. I still have full control over my data. So, although I don&#8217;t have access to the source, I don&#8217;t have to give them my Social Security Number either. On my laptop, having access to the source code is key, and the foundation for a lot of my Free Software principles. On a web site, regardless of the site, I&#8217;m not interested in the source code so much, as I am having a positive experience that allows me to interact in a safe and productive manner.</p>
<p>I share this post, because I just finished reading <a href="http://ebb.org/bkuhn/blog/2011/11/24/google-plus.html">http://ebb.org/bkuhn/blog/2011/11/24/google-plus.html</a>. Bradley Kuhn argues that you won&#8217;t find him on these services, such as Twitter or Facebook, because of the trade secrets. I applaud him for sticking to his principles, and not compromising. However, does he eat at burger joints where trade secrets have been critical to their success? I&#8217;m curious where the line is drawn. Why is it okay to eat and physically digest trade secrets, but it&#8217;s not okay to execute them in your browser? As a result, I believe Bradley may be distancing himself from those that love him, and just want to interact with him online. In fact, I would say he&#8217;s distancing himself from the very people he wants to advocate to. How can more people use Free Software, if you are only hanging out with the people who already do, and you are not hanging out with the people who don&#8217;t?</p>
<p>Just my thoughts. I&#8217;m not interested in trolling, so don&#8217;t take this article as such. Only as discussing an angle to SaaS that I don&#8217;t think many have thought about. If you&#8217;re interested in arguing in the comments, please be civil. Thanks.</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2011/11/28/burgers-as-a-service/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Tab Completing Aliases For Multiple Accounts In Mutt</title>
		<link>http://pthree.org/2011/11/22/tab-completing-aliases-for-multiple-accounts-in-mutt/</link>
		<comments>http://pthree.org/2011/11/22/tab-completing-aliases-for-multiple-accounts-in-mutt/#comments</comments>
		<pubDate>Tue, 22 Nov 2011 09:24:42 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=2120</guid>
		<description><![CDATA[In mutt, you can setup multiple accounts, and use account hooks (complete with key bindings) to change to those accounts. I have a Gmail account and a work account. In my Gmail account, I use goobook to access my Google Contacts, and I can successfully tab-complete the addresses when composing mail. But, I have not [...]]]></description>
			<content:encoded><![CDATA[<p>In mutt, you can setup multiple accounts, and use account hooks (complete with key bindings) to change to those accounts. I have a Gmail account and a work account. In my Gmail account, I use goobook to access my Google Contacts, and I can successfully tab-complete the addresses when composing mail. But, I have not been able to tab-complete my aliases for my work account. Well, I figured it out, and if this is bothering you, here&#8217;s the solution:</p>
<p>In my ~/.muttrc:</p>
<pre>folder-hook "gmail.com" "source ~/.mutt/gmail.rc"
folder-hook "example.com" "source ~/.mutt/work.rc"
source ~/.mutt/gmail.rc # open gmail on startup</pre>
<p>In my ~/.mutt/gmail.rc:</p>
<pre>bind editor &lt;Tab&gt; complete-query
bind editor ^T complete
set query_command = "goobook query '%s'"</pre>
<p>In my ~/.mutt/work.rc:</p>
<pre>bind editor &lt;Tab&gt; complete        # default Mutt setting
bind editor ^T complete-query     # default Mutt setting
unset query_command               # default Mutt setting
source ~/.mutt/work_aliases</pre>
<p>Notice the differences between the key bindings for &#8220;complete&#8221; and &#8220;complete-query&#8221; in the different RC files. Also notice that I&#8217;m unsetting query_command in my work.rc config. This is necessary to tab-complete the aliases out of the ~/.mutt/work_aliases file (the account details for my Google Account reside in ~/.netrc).</p>
<p>Hope this is helpful to someone else. I&#8217;m sure this is only helpful for a very small subset of users, but I wouldn&#8217;t be doing my due diligence if I didn&#8217;t post it. <a href="https://www.xkcd.com/979/">https://www.xkcd.com/979/</a> is relevant.</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2011/11/22/tab-completing-aliases-for-multiple-accounts-in-mutt/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Unknown Scheduled Downtime</title>
		<link>http://pthree.org/2011/11/19/unknown-scheduled-downtime/</link>
		<comments>http://pthree.org/2011/11/19/unknown-scheduled-downtime/#comments</comments>
		<pubDate>Sat, 19 Nov 2011 16:27:07 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=2095</guid>
		<description><![CDATA[Someone is purchasing our house, and we have to be out by the 28th of November. We will not be in our new house until Dec 3rd, at the earliest. During that week, I don&#8217;t know where to host my server to maintain a constant connection. Hopefully, I can find a solution, but worst case [...]]]></description>
			<content:encoded><![CDATA[<p>Someone is purchasing our house, and we have to be out by the 28th of November. We will not be in our new house until Dec 3rd, at the earliest. During that week, I don&#8217;t know where to host my server to maintain a constant connection. Hopefully, I can find a solution, but worst case scenario, it will be down that entire week. I hope not, but heads up just in case.</p>
<p>Thanks, and sorry for any inconvenience.</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2011/11/19/unknown-scheduled-downtime/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Use QR Codes For Accessing Wireless Access Points</title>
		<link>http://pthree.org/2011/11/15/use-qr-codes-for-accessing-wireless-access-points/</link>
		<comments>http://pthree.org/2011/11/15/use-qr-codes-for-accessing-wireless-access-points/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 12:36:10 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=2105</guid>
		<description><![CDATA[If you have an Android device with a camera, you can install the ZXing Barcode scanner [1] which supports the following method. It is my understanding, however, that other barcode scanners do not support this, so as cool as this is, it may only serve a very limited audience. The ZXing app doesn&#8217;t even support [...]]]></description>
			<content:encoded><![CDATA[<p>If you have an Android device with a camera, you can install the <a href="https://code.google.com/p/zxing/">ZXing Barcode scanner [1]</a> which supports the following method. It is my understanding, however, that other barcode scanners do not support this, so as cool as this is, it may only serve a very limited audience. The ZXing app doesn&#8217;t even support this method on iOS, as far as I know.</p>
<p>The ZXing team has a proposal for scanning barcodes to access wireless access points <a href="https://code.google.com/p/zxing/wiki/BarcodeContents#Wifi_Network_config_%28Android%29">using a MECARD-like structure [2]</a>. The structure of the format is like this:</p>
<pre>WIFI:T:WPA;S:mynetwork;P:mypass;;</pre>
<p>The parameter &#8220;T&#8221; can be one of &#8220;nopass&#8221;, &#8220;WEP&#8221; or &#8220;WPA&#8221; for the security type. The parameter &#8220;S&#8221; is your wireless access point&#8217;s SSID (<a href="http://pthree.org/2011/11/15/google-wants-to-track-your-physical-location/">make sure you append &#8220;_nomap&#8221; to prevent Google from tracking you [3]</a>). The parameter &#8220;P&#8221; is the password, if any, of accessing the access point. So, a QR Code containing this information could be something like:<br />
<img src="http://chart.apis.google.com/chart?cht=qr&#038;chs=350x350&#038;chld=L&#038;choe=UTF-8&#038;chl=WIFI%3AS%3ANetwork_nomap%3BT%3AWPA%3BP%3A7644d642ccc546db5ac70aac26bba9f1%3B%3B" /></p>
<p>Hopefully other barcode scanners pick up on the proposed standard, and make this more ubiquitous. The obvious advantage is not having to type in lengthy passwords on a small screen. At any event, hope this is useful for some.</p>
<p>1: <a href="https://code.google.com/p/zxing/">https://code.google.com/p/zxing/</a><br />
2: <a href="https://code.google.com/p/zxing/wiki/BarcodeContents#Wifi_Network_config_%28Android%29">https://code.google.com/p/zxing/wiki/BarcodeContents#Wifi_Network_config_%28Android%29</a><br />
3: <a href="http://pthree.org/2011/11/15/google-wants-to-track-your-physical-location/">http://pthree.org/2011/11/15/google-wants-to-track-your-physical-location/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2011/11/15/use-qr-codes-for-accessing-wireless-access-points/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Google Wants To Track Your Physical Location</title>
		<link>http://pthree.org/2011/11/15/google-wants-to-track-your-physical-location/</link>
		<comments>http://pthree.org/2011/11/15/google-wants-to-track-your-physical-location/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 12:14:17 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=2102</guid>
		<description><![CDATA[From http://googleblog.blogspot.com/2011/11/greater-choice-for-wireless-access.html: We&#8217;re introducing a method that lets you opt out of having your wireless access point included in the Google Location Server. To opt out, visit your access point&#8217;s settings and change the wireless network name (or SSID) so that it ends with &#8220;_nomap.&#8221; For example, if your SSID is &#8220;Network,&#8221; you&#8217;d need to [...]]]></description>
			<content:encoded><![CDATA[<p>From <a href="http://googleblog.blogspot.com/2011/11/greater-choice-for-wireless-access.html">http://googleblog.blogspot.com/2011/11/greater-choice-for-wireless-access.html</a>:</p>
<blockquote><p>We&#8217;re introducing a method that lets you opt out of having your wireless access point included in the Google Location Server. To opt out, visit your access point&#8217;s settings and change the wireless network name (or SSID) so that it ends with &#8220;_nomap.&#8221; For example, if your SSID is &#8220;Network,&#8221; you&#8217;d need to change it to &#8220;Network_nomap.&#8221;</p></blockquote>
<p>Great. Just great. Google will now be tracking my wireless access point unless I append &#8220;_nomap&#8221; to the SSID. How many people do you think are going to do this? How many people have even changed their default AP login from &#8220;admin:admin&#8221;? Google is taking advantage of people, and they know it. I hope the backlash is severe, because I find this to be a breach of trust. Whatever happened to &#8220;Do No Evil&#8221;?</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2011/11/15/google-wants-to-track-your-physical-location/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Rejected And Legal</title>
		<link>http://pthree.org/2011/11/10/rejected-and-legal/</link>
		<comments>http://pthree.org/2011/11/10/rejected-and-legal/#comments</comments>
		<pubDate>Thu, 10 Nov 2011 15:32:50 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=2096</guid>
		<description><![CDATA[Some of the roles I fill at work are: storage architecture, cloud engineering, system administration and backend coding. When approaching my tasks head on, it&#8217;s always important to me that standards are adhered to. From PEP coding style to adhering to an RFC for mail server. Unfortunately, I think I&#8217;m a dying breed, or something, [...]]]></description>
			<content:encoded><![CDATA[<p>Some of the roles I fill at work are: storage architecture, cloud engineering, system administration and backend coding. When approaching my tasks head on, it&#8217;s always important to me that standards are adhered to. From PEP coding style to adhering to an RFC for mail server. Unfortunately, I think I&#8217;m a dying breed, or something, because more and more, I&#8217;m seeing standards ignored.</p>
<p>Case in point: I just filled out a form for a survey to &#8220;enter to win a $1000 shopping spree). You know, the crap that you constantly get bombarded with at the checkout stand when the cashier gives you your receipt. I always ignore them, but then thought to myself &#8220;I&#8217;ll never win if I don&#8217;t at least try&#8221;, so I gave my first survey a go. At the end of the survey, it asked for my email address. I figure they&#8217;ll sell it for marketing purposes, and I have a Google Mail address, so I&#8217;m not really that worried about the SPAM (their SPAM filters are amazing). But, I would like to track who they are selling my address to. So, I gave them the following address:</p>
<pre>aaron.toponce+survey-provider@gmail.com</pre>
<p>To which, I received an error that the email address is not a valid address. <b>AHEM!</b> Yes it is, and it&#8217;s this lack of support for standards that I&#8217;m talking about. My email address was rejected, yet it&#8217;s perfectly legal according to RFC 5322. You see, according to that RFC, I get the following flexibilities with my email address:</p>
<ul>
<li>ASCII upper and lower case letters (a-z &#038; A-Z).</li>
<li>ASCII digits 0-9</li>
<li>ASCII characters !#$%&#038;&#8217;*+-/=?^_`{|}~</li>
<li>ASCII dot (.) so long as the local part of the address does not contain the dot consecutively, and it does not start with a dot.</li>
<li>ASCII characters &#8221; &#8221; (space) and &#8220;(),:;<>@[\] are allowed with certain restrictions.</li>
</ul>
<p>So, I could have the following email addresses, all of which are perfectly legit according to the RFC:</p>
<ul>
<li>&#8220;[Aaron Toponce]&#8220;@gmail.com</li>
<li>a&#038;t@gmail.com</li>
<li>aaron.toponce+business@gmail.com</li>
<li>aaron&#8217;s-travel-agency@example.travel</li>
<li>{atoponce}@gmail.com</li>
</ul>
<p>Yet, these will get ejected outright in most web forms I&#8217;ve come across. Specifically interesting is the .travel TLD. I&#8217;ve had web forms enforce TLDs that are less than 4 characters, which is absolutely absurd for the .travel and .museum TLDs. I&#8217;m guessing one of two things is happening with these web forms:</p>
<ol>
<li>The developer used the regular expression [A-Za-z0-9_\-\.]+@[A-Za-z0-9\-\.]+ for validating addresses.</li>
<li>There is absolute denial for the use of &#8220;plus-addressing&#8221; as a DEA.</li>
</ol>
<p>I&#8217;m guessing the first is more likely the scenario than the second. Regardless, Of course, when we&#8217;re talking about the rules of RFC 5322, we&#8217;re no longer talking about regular expression syntax. We&#8217;re talking about grammar. If your page is designed in PHP, Python, CGI, or whatever, you should use a real parser for parsing the email address, rather than reinventing the wheel yourself. What&#8217;s unfortunate, is this disease of not properly parsing valid email addresses is found in some big companies and sites too, not just the little guys.</p>
<p>Now, Google COULD provide true DEAs, such as Yahoo! Plus does with their subscribers, However, I should be able to create an DEA with an already existing email address, rather than creating completely new ones, because people refuse to conform to the standards. So Google, if you&#8217;re reading (I know you are), you may want to consider proper DEAs, seeing as though &#8220;plus addressing&#8221; isn&#8217;t working, and it is important to some.</p>
<p><a href="http://www.bortzmeyer.org/arreter-d-interdire-des-adresses-legales.html">Stéphane Bortzmeyer has already blogged about this</a>, and he uses the <a href="http://identi.ca/tag/ral">#ral hashtag</a> on Identica and Twitter to vent his frustrations, which stands for &#8220;Refus d&#8217;Adresses Légales&#8221; or &#8220;Rejection of Legal Address&#8221;. Well, I&#8217;ve determined that I will be doing the same, although I&#8217;ll bacronym the hashtag to &#8220;Rejected And Legal&#8221;, along with the url to the site that refuses to adhere to the RFC.</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2011/11/10/rejected-and-legal/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

