<?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>Tyler Oderkirk&#039;s Blog</title>
	<atom:link href="http://unsyncopated.com/blog/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://unsyncopated.com/blog</link>
	<description>&#34;No matter how cynical you get, it&#039;s impossible to keep up&#34; - Lily Tomlin</description>
	<lastBuildDate>Mon, 03 May 2010 02:51:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Backpacking Gear Unboxing Photos</title>
		<link>http://unsyncopated.com/blog/index.php/2010/04/11/backpacking-gear-unboxing-photos/</link>
		<comments>http://unsyncopated.com/blog/index.php/2010/04/11/backpacking-gear-unboxing-photos/#comments</comments>
		<pubDate>Sun, 11 Apr 2010 23:03:20 +0000</pubDate>
		<dc:creator>Tyler</dc:creator>
				<category><![CDATA[Hiking]]></category>

		<guid isPermaLink="false">http://unsyncopated.com/blog/?p=804</guid>
		<description><![CDATA[Introduction
It&#8217;s a hassle to shop for physical goods online because you don&#8217;t have the opportunity to put your hands on the item before making the purchase.
For camping gear this means you can&#8217;t&#8230;

Yank on a zipper to see if it&#8217;s sturdy.
Set up a tent to see if your other gear will fit inside.
Check tags for &#8220;Made [...]]]></description>
			<content:encoded><![CDATA[<span id="Introduction"><h3>Introduction</h3></span>
						<div class="flickr-gallery image right"><a href="http://www.flickr.com/photos/55502932@N00/3945511849"><img class="flickr small" title="Paul, Matt, Jared and Me @ ADK" alt="Paul, Matt, Jared and Me @ ADK" src="http://farm3.static.flickr.com/2637/3945511849_6364f14203_m.jpg" /></a></div>
					<br />
It&#8217;s a hassle to shop for physical goods online because you don&#8217;t have the opportunity to put your hands on the item before making the purchase.</p>
<p>For camping gear this means you can&#8217;t&#8230;</p>
<ul>
<li>Yank on a zipper to see if it&#8217;s sturdy.</li>
<li>Set up a tent to see if your other gear will fit inside.</li>
<li>Check tags for &#8220;Made in the USA&#8221;.</li>
<li>Try to fit your camp stove inside your cooking pot for storage.</li>
</ul>
<p>The next best thing to physical inspection are high-resolution product photos. Since many online retailers don&#8217;t provide these, I thought I&#8217;d share mine. Below you&#8217;ll find some pictures I took of the gear I bought last Spring.<br />
<div class='toc wptoc'>
<h2>Contents</h2>
<ol class='toc-odd level-1'>
	<li>
		<a href="#Introduction">Introduction</a>
	</li>
	<li>
		<a href="#Choosing_an_online_retailer">Choosing an online retailer</a>
	</li>
	<li>
		<a href="#Cooking">Cooking</a>
		<ol class='toc-even level-2'>
			<li>
				<a href="#MSR_Pocket_Rocket">MSR Pocket Rocket</a>
			</li>
			<li>
				<a href="#MSR_4oz_Isopro_Fuel">MSR 4oz Isopro Fuel</a>
			</li>
			<li>
				<a href="#T-Fal_One_Egg_Wonder_Pan">T-Fal One Egg Wonder Pan</a>
			</li>
			<li>
				<a href="#Aquamira_Water_Treatment_Drops">Aquamira Water Treatment Drops</a>
			</li>
			<li>
				<a href="#Snow_Peak_210g_Camp_Fuel">Snow Peak 210g Camp Fuel</a>
			</li>
		</ol>
	<li>
		<a href="#Shelter">Shelter</a>
		<ol class='toc-even level-2'>
			<li>
				<a href="#MSR_Hubba_Tent">MSR Hubba Tent</a>
			</li>
			<li>
				<a href="#Marmot_40_Rec_Sleeping_Bag">Marmot 40 Rec Sleeping Bag</a>
			</li>
			<li>
				<a href="#Therm-A-Rest_Z-Lite_Sleeping_Pad">Therm-A-Rest Z-Lite Sleeping Pad</a>
			</li>
		</ol>
	<li>
		<a href="#Clothing">Clothing</a>
		<ol class='toc-even level-2'>
			<li>
				<a href="#Bridgedale_Multisport_Socks">Bridgedale Multisport Socks</a>
			</li>
			<li>
				<a href="#Bridgedale_Trailhead_Socks">Bridgedale Trailhead Socks</a>
			</li>
		</ol>
	<li>
		<a href="#Misc.">Misc.</a>
		<ol class='toc-even level-2'>
			<li>
				<a href="#Adventure_Medical_Kits_Moleskin">Adventure Medical Kits Moleskin</a>
			</li>
			<li>
				<a href="#MSR_Packsoap">MSR Packsoap</a>
			</li>
			<li>
				<a href="#Bens_30_Deet_Bug_Spray">Ben's 30% Deet Bug Spray</a>
			</li>
			<li>
				<a href="#Petzel_Tikka_Plus_Headlamp">Petzel Tikka Plus Headlamp</a>
			</li>
			<li>
				<a href="#Sea_to_Summit_210d_15L_Stuff_Sack">Sea to Summit 210d 15L Stuff Sack</a>
			</li>
		</ol>
	<li>
		<a href="#Further_reading">Further reading</a>
	</li>
</ol>
</ol>
</ol>
</div>
<div class='wptoc-end'>&nbsp;</div>
<span id="Choosing_an_online_retailer"><h3>Choosing an online retailer</h3></span>
<p>I ordered most of my equipment from <a href="http://www.campsaver.com">Campsaver.com</a>, <a href="http://www.moosejaw.com">MooseJaw.com</a>, and a used gear broker <a href="http://www.geartrade.com">GearTrade.com</a> and was pleased with the service from each. I spent some time searching <a href="http://www.craigslist.org/">Craigslist</a> too. <a href="http://www.google.com/prdhp">Google Product Search</a> was handy for comparing prices.</p>
<p>Be sure to check <a href="http://www.retailmenot.com">RetailMeNot.com</a> for coupons and discount codes. A simple Google search like &#8220;campsaver coupon&#8221; can be surprisingly effective. Campsaver sent me a &#8220;10% off your next order&#8221; certificate and the MooseJaw catalog contains lots of codes redeemable for store-brand gear.</p>
<p>Of course, nothing beats advice and hand-me-downs from the pros. Thanks Matt and Kenneth!</p>
<span id="Cooking"><h3>Cooking</h3></span>
<span id="MSR_Pocket_Rocket"><h4>MSR Pocket Rocket</h4></span>
				<div id="gallery-0b463d77" class="flickr-gallery photoset">
										<div class="fg-clear"></div>
				</div>
												<div class="fg-clear"></div>
							<script type="text/javascript">
											jQuery(document).ready(function(){
							jQuery("#gallery-0b463d77 .flickr-thumb img").flightbox();
						});
										
										//-->
				</script>
			
<span id="MSR_4oz_Isopro_Fuel"><h4>MSR 4oz Isopro Fuel</h4></span>
				<div id="gallery-938958ba" class="flickr-gallery photoset">
										<div class="fg-clear"></div>
				</div>
												<div class="fg-clear"></div>
							<script type="text/javascript">
											jQuery(document).ready(function(){
							jQuery("#gallery-938958ba .flickr-thumb img").flightbox();
						});
										
										//-->
				</script>
			
<span id="T-Fal_One_Egg_Wonder_Pan"><h4>T-Fal One Egg Wonder Pan</h4></span>
				<div id="gallery-3635e873" class="flickr-gallery photoset">
										<div class="fg-clear"></div>
				</div>
												<div class="fg-clear"></div>
							<script type="text/javascript">
											jQuery(document).ready(function(){
							jQuery("#gallery-3635e873 .flickr-thumb img").flightbox();
						});
										
										//-->
				</script>
			
<span id="Aquamira_Water_Treatment_Drops"><h4>Aquamira Water Treatment Drops</h4></span>
				<div id="gallery-2da09f97" class="flickr-gallery photoset">
										<div class="fg-clear"></div>
				</div>
												<div class="fg-clear"></div>
							<script type="text/javascript">
											jQuery(document).ready(function(){
							jQuery("#gallery-2da09f97 .flickr-thumb img").flightbox();
						});
										
										//-->
				</script>
			
<span id="Snow_Peak_210g_Camp_Fuel"><h4>Snow Peak 210g Camp Fuel</h4></span>
				<div id="gallery-f83c59f3" class="flickr-gallery photoset">
										<div class="fg-clear"></div>
				</div>
												<div class="fg-clear"></div>
							<script type="text/javascript">
											jQuery(document).ready(function(){
							jQuery("#gallery-f83c59f3 .flickr-thumb img").flightbox();
						});
										
										//-->
				</script>
			
<span id="Shelter"><h3>Shelter</h3></span>
<span id="MSR_Hubba_Tent"><h4>MSR Hubba Tent</h4></span>
				<div id="gallery-c3f37637" class="flickr-gallery photoset">
													<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3739648942"><img class="photo" title="img_2416.jpg" src="http://farm3.static.flickr.com/2622/3739648942_cbedbabd01_s.jpg" alt="img_2416.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3738864475"><img class="photo" title="img_2417.jpg" src="http://farm3.static.flickr.com/2542/3738864475_978925b0d0_s.jpg" alt="img_2417.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3738830321"><img class="photo" title="img_2415.jpg" src="http://farm4.static.flickr.com/3459/3738830321_cf52834136_s.jpg" alt="img_2415.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3739669308"><img class="photo" title="img_2418.jpg" src="http://farm3.static.flickr.com/2457/3739669308_17d48e2079_s.jpg" alt="img_2418.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3739712458"><img class="photo" title="img_2419.jpg" src="http://farm3.static.flickr.com/2488/3739712458_9a0f541be7_s.jpg" alt="img_2419.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3738927949"><img class="photo" title="img_2420.jpg" src="http://farm3.static.flickr.com/2496/3738927949_ebd3e655a6_s.jpg" alt="img_2420.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3738937663"><img class="photo" title="img_2421.jpg" src="http://farm3.static.flickr.com/2565/3738937663_6d30febfac_s.jpg" alt="img_2421.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3739741506"><img class="photo" title="img_2422.jpg" src="http://farm4.static.flickr.com/3447/3739741506_be588ccd88_s.jpg" alt="img_2422.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3739749108"><img class="photo" title="img_2423.jpg" src="http://farm3.static.flickr.com/2444/3739749108_9e5e991915_s.jpg" alt="img_2423.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3738964069"><img class="photo" title="img_2424.jpg" src="http://farm3.static.flickr.com/2480/3738964069_7de72338a6_s.jpg" alt="img_2424.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3739765486"><img class="photo" title="img_2425.jpg" src="http://farm3.static.flickr.com/2556/3739765486_77b7463e40_s.jpg" alt="img_2425.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3738979329"><img class="photo" title="img_2426.jpg" src="http://farm3.static.flickr.com/2626/3738979329_1a002a951c_s.jpg" alt="img_2426.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3738987159"><img class="photo" title="img_2427.jpg" src="http://farm3.static.flickr.com/2637/3738987159_673824e2a3_s.jpg" alt="img_2427.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3739789116"><img class="photo" title="img_2428.jpg" src="http://farm3.static.flickr.com/2607/3739789116_751d4d9635_s.jpg" alt="img_2428.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3740006802"><img class="photo" title="img_2429.jpg" src="http://farm3.static.flickr.com/2656/3740006802_1e726374dc_s.jpg" alt="img_2429.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3740017238"><img class="photo" title="img_2430.jpg" src="http://farm3.static.flickr.com/2660/3740017238_c5f9ef324a_s.jpg" alt="img_2430.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3740028750"><img class="photo" title="img_2431.jpg" src="http://farm4.static.flickr.com/3519/3740028750_5a39c94566_s.jpg" alt="img_2431.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3740036074"><img class="photo" title="img_2432.jpg" src="http://farm3.static.flickr.com/2531/3740036074_8ed66cb86e_s.jpg" alt="img_2432.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3740049984"><img class="photo" title="img_2433.jpg" src="http://farm3.static.flickr.com/2157/3740049984_d2d878f95a_s.jpg" alt="img_2433.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3739265875"><img class="photo" title="img_2434.jpg" src="http://farm3.static.flickr.com/2547/3739265875_78bc1c4635_s.jpg" alt="img_2434.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3739274935"><img class="photo" title="img_2435.jpg" src="http://farm3.static.flickr.com/2469/3739274935_48453377d8_s.jpg" alt="img_2435.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3739283775"><img class="photo" title="img_2436.jpg" src="http://farm3.static.flickr.com/2421/3739283775_4e8f5cdde5_s.jpg" alt="img_2436.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3739291905"><img class="photo" title="img_2437.jpg" src="http://farm3.static.flickr.com/2595/3739291905_9b053e4815_s.jpg" alt="img_2437.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3740094454"><img class="photo" title="img_2438.jpg" src="http://farm4.static.flickr.com/3427/3740094454_51a7cb5fe5_s.jpg" alt="img_2438.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3739309309"><img class="photo" title="img_2439.jpg" src="http://farm3.static.flickr.com/2575/3739309309_5bca17f801_s.jpg" alt="img_2439.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3740112254"><img class="photo" title="img_2440.jpg" src="http://farm3.static.flickr.com/2473/3740112254_d26d6c8205_s.jpg" alt="img_2440.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3740120722"><img class="photo" title="img_2441.jpg" src="http://farm3.static.flickr.com/2592/3740120722_48b5a9b0eb_s.jpg" alt="img_2441.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3739335711"><img class="photo" title="img_2442.jpg" src="http://farm4.static.flickr.com/3603/3739335711_a6c7985972_s.jpg" alt="img_2442.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3740138444"><img class="photo" title="img_2443.jpg" src="http://farm3.static.flickr.com/2221/3740138444_30a2f453d0_s.jpg" alt="img_2443.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3740147100"><img class="photo" title="img_2445.jpg" src="http://farm4.static.flickr.com/3493/3740147100_7aec1012eb_s.jpg" alt="img_2445.jpg" /></a>
								</div>
												<div class="fg-clear"></div>
				</div>
									<div class="fg-clear" id="fg-c3f37637-nav">
						<div id="fg-c3f37637-next" class="flickr-gallery-next" style="float: right"><a href="#">Next Page &rsaquo;</a></div>
						<div id="fg-c3f37637-prev" class="flickr-gallery-prev" style="display: none; float: left"><a href="#">&lsaquo; Previous Page</a></div>
					</div>
												<div class="fg-clear"></div>
							<script type="text/javascript">
											jQuery(document).ready(function(){
							jQuery("#gallery-c3f37637 .flickr-thumb img").flightbox();
						});
										
											var flickr_gallery_c3f37637_page = 1;
						(function($){
							$(document).ready(function(){
								$("#fg-c3f37637-next a, #fg-c3f37637-prev a").click(function(e){
									if ( $(e.target).parent().is("#fg-c3f37637-next") ) {
										flickr_gallery_c3f37637_page++;
									} else {
										flickr_gallery_c3f37637_page--;
									}
									$("#gallery-c3f37637 .flickr-thumb").css("visibility", "hidden");
									//$("#gallery-c3f37637").css("background", "transparent url(http://unsyncopated.com/blog/wp-content/plugins/flickr-gallery/flightbox/images/loading-2.gif) scroll no-repeat center center");
									$.post("/blog/index.php/feed/", {
										action: 'flickr-gallery-page',
										pager: "O:15:\"phpFlickr_pager\":5:{s:6:\"method\";s:26:\"flickr.photosets.getPhotos\";s:4:\"args\";a:4:{s:11:\"photoset_id\";s:17:\"72157621771841992\";s:6:\"extras\";s:6:\",media\";s:8:\"per_page\";i:30;s:4:\"page\";i:1;}s:8:\"per_page\";s:2:\"30\";s:4:\"page\";i:1;s:6:\"_extra\";N;}",
										page: flickr_gallery_c3f37637_page
									}, function(rsp){
										$("#gallery-c3f37637").html(rsp.html);
																					$("#gallery-c3f37637 .flickr-thumb img").flightbox();
																				if ( rsp.page == 1 ) {
											$("#fg-c3f37637-prev").hide();
										} else {
											$("#fg-c3f37637-prev").show();
										}
										if ( rsp.page == rsp.pages ) {
											$("#fg-c3f37637-next").hide();
										} else {
											$("#fg-c3f37637-next").show();
										}
									}, 'json');
									return false;
								});
							});
						})(jQuery);
										//-->
				</script>
			
<span id="Marmot_40_Rec_Sleeping_Bag"><h4>Marmot 40 Rec Sleeping Bag</h4></span>
				<div id="gallery-ea136850" class="flickr-gallery photoset">
													<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3739240770"><img class="photo" title="img_2388.jpg" src="http://farm3.static.flickr.com/2602/3739240770_1e12ee44b9_s.jpg" alt="img_2388.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3738456355"><img class="photo" title="img_2389.jpg" src="http://farm4.static.flickr.com/3533/3738456355_b1f47ff101_s.jpg" alt="img_2389.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3738464947"><img class="photo" title="img_2390.jpg" src="http://farm4.static.flickr.com/3487/3738464947_436000c43c_s.jpg" alt="img_2390.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3738474229"><img class="photo" title="img_2391.jpg" src="http://farm4.static.flickr.com/3430/3738474229_f6a7ee5674_s.jpg" alt="img_2391.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3738481111"><img class="photo" title="img_2392.jpg" src="http://farm3.static.flickr.com/2430/3738481111_b9646c855f_s.jpg" alt="img_2392.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3739280148"><img class="photo" title="img_2393.jpg" src="http://farm4.static.flickr.com/3481/3739280148_5ff6e2a447_s.jpg" alt="img_2393.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3738495399"><img class="photo" title="img_2394.jpg" src="http://farm3.static.flickr.com/2491/3738495399_2b825c4f31_s.jpg" alt="img_2394.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3739295740"><img class="photo" title="img_2395.jpg" src="http://farm3.static.flickr.com/2507/3739295740_2dc4f1f146_s.jpg" alt="img_2395.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3738517895"><img class="photo" title="img_2396.jpg" src="http://farm3.static.flickr.com/2463/3738517895_deafa816c1_s.jpg" alt="img_2396.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3739319372"><img class="photo" title="img_2397.jpg" src="http://farm3.static.flickr.com/2432/3739319372_e8d888014e_s.jpg" alt="img_2397.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3738536125"><img class="photo" title="img_2398.jpg" src="http://farm3.static.flickr.com/2432/3738536125_e1c86ac32c_s.jpg" alt="img_2398.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3738549103"><img class="photo" title="img_2399.jpg" src="http://farm4.static.flickr.com/3485/3738549103_c82b6af107_s.jpg" alt="img_2399.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3738561621"><img class="photo" title="img_2400.jpg" src="http://farm3.static.flickr.com/2557/3738561621_8a523266d4_s.jpg" alt="img_2400.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3739364324"><img class="photo" title="img_2403.jpg" src="http://farm3.static.flickr.com/2599/3739364324_a60bed40e5_s.jpg" alt="img_2403.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3739436038"><img class="photo" title="img_2404.jpg" src="http://farm3.static.flickr.com/2487/3739436038_cf0d940c4f_s.jpg" alt="img_2404.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3738655091"><img class="photo" title="img_2406.jpg" src="http://farm3.static.flickr.com/2628/3738655091_a7a62eec1e_s.jpg" alt="img_2406.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3738665155"><img class="photo" title="img_2407.jpg" src="http://farm3.static.flickr.com/2594/3738665155_934b24935f_s.jpg" alt="img_2407.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3739485480"><img class="photo" title="img_2408.jpg" src="http://farm4.static.flickr.com/3480/3739485480_503223c654_s.jpg" alt="img_2408.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3738699303"><img class="photo" title="img_2409.jpg" src="http://farm4.static.flickr.com/3501/3738699303_cee7cf75df_s.jpg" alt="img_2409.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3739504156"><img class="photo" title="img_2410.jpg" src="http://farm3.static.flickr.com/2537/3739504156_c237b417bc_s.jpg" alt="img_2410.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3738719989"><img class="photo" title="img_2412.jpg" src="http://farm4.static.flickr.com/3497/3738719989_a7da1e202e_s.jpg" alt="img_2412.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3739603564"><img class="photo" title="img_2413.jpg" src="http://farm3.static.flickr.com/2449/3739603564_9fca5bed00_s.jpg" alt="img_2413.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3738820757"><img class="photo" title="img_2414.jpg" src="http://farm3.static.flickr.com/2601/3738820757_67b8a2a2fc_s.jpg" alt="img_2414.jpg" /></a>
								</div>
												<div class="fg-clear"></div>
				</div>
												<div class="fg-clear"></div>
							<script type="text/javascript">
											jQuery(document).ready(function(){
							jQuery("#gallery-ea136850 .flickr-thumb img").flightbox();
						});
										
										//-->
				</script>
			
<span id="Therm-A-Rest_Z-Lite_Sleeping_Pad"><h4>Therm-A-Rest Z-Lite Sleeping Pad</h4></span>
				<div id="gallery-ff604646" class="flickr-gallery photoset">
										<div class="fg-clear"></div>
				</div>
												<div class="fg-clear"></div>
							<script type="text/javascript">
											jQuery(document).ready(function(){
							jQuery("#gallery-ff604646 .flickr-thumb img").flightbox();
						});
										
										//-->
				</script>
			
<span id="Clothing"><h3>Clothing</h3></span>
<span id="Bridgedale_Multisport_Socks"><h4>Bridgedale Multisport Socks</h4></span>
				<div id="gallery-b14252de" class="flickr-gallery photoset">
													<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3739144738"><img class="photo" title="img_2379.jpg" src="http://farm3.static.flickr.com/2460/3739144738_ccc9826247_s.jpg" alt="img_2379.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3738359405"><img class="photo" title="img_2380.jpg" src="http://farm3.static.flickr.com/2556/3738359405_3af290b183_s.jpg" alt="img_2380.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3738375675"><img class="photo" title="img_2382.jpg" src="http://farm3.static.flickr.com/2567/3738375675_0c70f51ca6_s.jpg" alt="img_2382.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3739160562"><img class="photo" title="img_2381.jpg" src="http://farm3.static.flickr.com/2513/3739160562_d85a7c892a_s.jpg" alt="img_2381.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3738384467"><img class="photo" title="img_2383.jpg" src="http://farm4.static.flickr.com/3040/3738384467_c743ba729d_s.jpg" alt="img_2383.jpg" /></a>
								</div>
												<div class="fg-clear"></div>
				</div>
												<div class="fg-clear"></div>
							<script type="text/javascript">
											jQuery(document).ready(function(){
							jQuery("#gallery-b14252de .flickr-thumb img").flightbox();
						});
										
										//-->
				</script>
			
<span id="Bridgedale_Trailhead_Socks"><h4>Bridgedale Trailhead Socks</h4></span>
				<div id="gallery-2254b816" class="flickr-gallery photoset">
													<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3739136498"><img class="photo" title="img_2378.jpg" src="http://farm4.static.flickr.com/3491/3739136498_ed758c1c10_s.jpg" alt="img_2378.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3739129290"><img class="photo" title="img_2377.jpg" src="http://farm4.static.flickr.com/3481/3739129290_8a655144aa_s.jpg" alt="img_2377.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3738384467"><img class="photo" title="img_2383.jpg" src="http://farm4.static.flickr.com/3040/3738384467_c743ba729d_s.jpg" alt="img_2383.jpg" /></a>
								</div>
												<div class="fg-clear"></div>
				</div>
												<div class="fg-clear"></div>
							<script type="text/javascript">
											jQuery(document).ready(function(){
							jQuery("#gallery-2254b816 .flickr-thumb img").flightbox();
						});
										
										//-->
				</script>
			
<span id="Misc."><h3>Misc.</h3></span>
<span id="Adventure_Medical_Kits_Moleskin"><h4>Adventure Medical Kits Moleskin</h4></span>
				<div id="gallery-70c5937f" class="flickr-gallery photoset">
										<div class="fg-clear"></div>
				</div>
												<div class="fg-clear"></div>
							<script type="text/javascript">
											jQuery(document).ready(function(){
							jQuery("#gallery-70c5937f .flickr-thumb img").flightbox();
						});
										
										//-->
				</script>
			
<span id="MSR_Packsoap"><h4>MSR Packsoap</h4></span>
				<div id="gallery-888146ba" class="flickr-gallery photoset">
													<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3739233638"><img class="photo" title="img_2387.jpg" src="http://farm3.static.flickr.com/2461/3739233638_f444b9cc2f_s.jpg" alt="img_2387.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3738433271"><img class="photo" title="img_2386.jpg" src="http://farm4.static.flickr.com/3429/3738433271_d5276c1b6d_s.jpg" alt="img_2386.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3738425483"><img class="photo" title="img_2385.jpg" src="http://farm3.static.flickr.com/2517/3738425483_6eb50ae59d_s.jpg" alt="img_2385.jpg" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3739212344"><img class="photo" title="img_2384.jpg" src="http://farm3.static.flickr.com/2493/3739212344_d8af30ca50_s.jpg" alt="img_2384.jpg" /></a>
								</div>
												<div class="fg-clear"></div>
				</div>
												<div class="fg-clear"></div>
							<script type="text/javascript">
											jQuery(document).ready(function(){
							jQuery("#gallery-888146ba .flickr-thumb img").flightbox();
						});
										
										//-->
				</script>
			
<span id="Ben8217s_30_Deet_Bug_Spray"><h4>Ben&#8217;s 30% Deet Bug Spray</h4></span>
				<div id="gallery-64c11875" class="flickr-gallery photoset">
										<div class="fg-clear"></div>
				</div>
												<div class="fg-clear"></div>
							<script type="text/javascript">
											jQuery(document).ready(function(){
							jQuery("#gallery-64c11875 .flickr-thumb img").flightbox();
						});
										
										//-->
				</script>
			
<span id="Petzel_Tikka_Plus_Headlamp"><h4>Petzel Tikka Plus Headlamp</h4></span>
				<div id="gallery-d96be265" class="flickr-gallery photoset">
										<div class="fg-clear"></div>
				</div>
												<div class="fg-clear"></div>
							<script type="text/javascript">
											jQuery(document).ready(function(){
							jQuery("#gallery-d96be265 .flickr-thumb img").flightbox();
						});
										
										//-->
				</script>
			
<span id="Sea_to_Summit_210d_15L_Stuff_Sack"><h4>Sea to Summit 210d 15L Stuff Sack</h4></span>
				<div id="gallery-3e6db0aa" class="flickr-gallery photoset">
										<div class="fg-clear"></div>
				</div>
												<div class="fg-clear"></div>
							<script type="text/javascript">
											jQuery(document).ready(function(){
							jQuery("#gallery-3e6db0aa .flickr-thumb img").flightbox();
						});
										
										//-->
				</script>
			
<span id="Further_reading"><h3>Further reading</h3></span>
<p>I documented the nitty-gritty of my gear requirements at <a href="http://www.unsyncopated.com/wiki/Appalachian%20Trail">this wiki page</a>. It contains notes specific to planning a trip on the Appalachian Trail too.</p>
]]></content:encoded>
			<wfw:commentRss>http://unsyncopated.com/blog/index.php/2010/04/11/backpacking-gear-unboxing-photos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Miami Road Trip 2009</title>
		<link>http://unsyncopated.com/blog/index.php/2010/03/29/miami-road-trip-2009/</link>
		<comments>http://unsyncopated.com/blog/index.php/2010/03/29/miami-road-trip-2009/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 21:55:54 +0000</pubDate>
		<dc:creator>Tyler</dc:creator>
				<category><![CDATA[Music]]></category>
		<category><![CDATA[Travel]]></category>

		<guid isPermaLink="false">http://unsyncopated.com/blog/?p=797</guid>
		<description><![CDATA[One of the biggest North American electronic music festivals, Ultra, just wrapped up in Miami. I think it&#8217;s about time that I blogged about my experience there last year.
I attended last year&#8217;s edition with Carolyn just prior to a return trip which included visits to&#8230;

Florida State University in Tallahassee, FL
Georgia Tech in Atlanta, GA
UNC Charlotte, [...]]]></description>
			<content:encoded><![CDATA[<p>One of the biggest North American electronic music festivals, <a href="http://www.ultramusicfestival.com/">Ultra</a>, just wrapped up in Miami. I think it&#8217;s about time that I blogged about my experience there <a href="http://www.last.fm/event/844865+UMF+Miami+2009">last year</a>.</p>
						<div class="flickr-gallery image right"><a href="http://www.flickr.com/photos/55502932@N00/4473917324"><img class="flickr small" title="Santigold!" alt="Santigold!" src="http://farm5.static.flickr.com/4046/4473917324_1a0552b7d6_m.jpg" /></a></div>
					
<p>I attended last year&#8217;s edition with Carolyn just prior to a return trip which included visits to&#8230;</p>
<ul>
<li>Florida State University in Tallahassee, FL</li>
<li>Georgia Tech in Atlanta, GA</li>
<li>UNC Charlotte, NC</li>
<li>Stony Brook on Long Island, NY</li>
</ul>
<p>Take a look at the pictures I took at the festival:</p>
				<div id="gallery-09ba456b" class="flickr-gallery photoset">
													<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=4473936058"><img class="photo" title="Miami skyline" src="http://farm3.static.flickr.com/2690/4473936058_08d5bb7540_s.jpg" alt="Miami skyline" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=4473933692"><img class="photo" title="\"I don't know much about the cow ...\"" src="http://farm3.static.flickr.com/2796/4473933692_f60ba0c24d_s.jpg" alt="\"I don't know much about the cow ...\"" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=4473926810"><img class="photo" title="The view @ Wet Willie's" src="http://farm5.static.flickr.com/4009/4473926810_f3855555e0_s.jpg" alt="The view @ Wet Willie's" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=4473921742"><img class="photo" title="Our hostesses" src="http://farm3.static.flickr.com/2729/4473921742_e4f9d5cebb_s.jpg" alt="Our hostesses" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=4473919304"><img class="photo" title="Beautiful sunsets" src="http://farm3.static.flickr.com/2713/4473919304_e516b04552_s.jpg" alt="Beautiful sunsets" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=4473153949"><img class="photo" title="A stage" src="http://farm5.static.flickr.com/4068/4473153949_a0149d3b56_s.jpg" alt="A stage" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=4473152249"><img class="photo" title="A tent" src="http://farm5.static.flickr.com/4040/4473152249_d118786986_s.jpg" alt="A tent" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=4473147155"><img class="photo" title="An Aston Martin" src="http://farm3.static.flickr.com/2679/4473147155_9916cc3342_s.jpg" alt="An Aston Martin" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=4474119282"><img class="photo" title="Santigold!" src="http://farm5.static.flickr.com/4040/4474119282_6762d32a8d_s.jpg" alt="Santigold!" /></a>
								</div>
												<div class="fg-clear"></div>
				</div>
												<div class="fg-clear"></div>
							<script type="text/javascript">
											jQuery(document).ready(function(){
							jQuery("#gallery-09ba456b .flickr-thumb img").flightbox();
						});
										
										//-->
				</script>
			
<p>These are some photos from the remainder of the trip.</p>
				<div id="gallery-00650b4e" class="flickr-gallery photoset">
													<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=4474029800"><img class="photo" title="Next stop: Charlotte" src="http://farm5.static.flickr.com/4015/4474029800_d34ef024a3_s.jpg" alt="Next stop: Charlotte" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=4473251005"><img class="photo" title="Lighthouse on the Gulf" src="http://farm5.static.flickr.com/4054/4473251005_c2e0c3072b_s.jpg" alt="Lighthouse on the Gulf" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=4474026554"><img class="photo" title="The Gulf of Mexico" src="http://farm5.static.flickr.com/4041/4474026554_9b9e716998_s.jpg" alt="The Gulf of Mexico" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=4473247657"><img class="photo" title="Rattling mud guard needs..." src="http://farm5.static.flickr.com/4023/4473247657_34f5a158c9_s.jpg" alt="Rattling mud guard needs..." /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=4474022406"><img class="photo" title="\"Honk for Ultra\"" src="http://farm5.static.flickr.com/4035/4474022406_44c4df60fe_s.jpg" alt="\"Honk for Ultra\"" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=4473977588"><img class="photo" title="Miami '09 Road Trip Map" src="http://farm5.static.flickr.com/4047/4473977588_16074e9126_s.jpg" alt="Miami '09 Road Trip Map" /></a>
								</div>
												<div class="fg-clear"></div>
				</div>
												<div class="fg-clear"></div>
							<script type="text/javascript">
											jQuery(document).ready(function(){
							jQuery("#gallery-00650b4e .flickr-thumb img").flightbox();
						});
										
										//-->
				</script>
			
]]></content:encoded>
			<wfw:commentRss>http://unsyncopated.com/blog/index.php/2010/03/29/miami-road-trip-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Storing file metadata with fnmeta.py</title>
		<link>http://unsyncopated.com/blog/index.php/2010/03/27/storing-file-metadata-with-fnmeta-py/</link>
		<comments>http://unsyncopated.com/blog/index.php/2010/03/27/storing-file-metadata-with-fnmeta-py/#comments</comments>
		<pubDate>Sat, 27 Mar 2010 16:37:04 +0000</pubDate>
		<dc:creator>Tyler</dc:creator>
				<category><![CDATA[Shell programming]]></category>

		<guid isPermaLink="false">http://unsyncopated.com/blog/?p=784</guid>
		<description><![CDATA[The problem
Have you ever named a file something like&#8230;

main.cpp.GOOD

&#8230; to indicate a &#8220;known-good&#8221; copy of `main.cpp`?
This simplistic method for storing file metadata is great because it&#8217;s filesystem-agnostic &#8211; the metadata (e.g. &#8220;this is known-good source code&#8221;) &#8220;follows&#8221; the file wherever it goes &#8211; from ext3 to FAT32 to NTFS, etc.
However, it has a few limitations:

Certain [...]]]></description>
			<content:encoded><![CDATA[<span id="The_problem"><h3>The problem</h3></span>
<p>Have you ever named a file something like&#8230;</p>
<blockquote>
<pre>main.cpp.GOOD</pre>
</blockquote>
<p>&#8230; to indicate a &#8220;known-good&#8221; copy of `main.cpp`?</p>
<p>This simplistic method for storing <em>file metadata</em> is great because it&#8217;s <em>filesystem-agnostic</em> &#8211; the metadata (e.g. &#8220;this is known-good source code&#8221;) &#8220;follows&#8221; the file wherever it goes &#8211; from ext3 to FAT32 to NTFS, etc.</p>
<p>However, it has a few limitations:</p>
<ol>
<li>Certain characters like &#8220;/&#8221;, &#8221; &#8220;, and &#8220;?&#8221;, while <em>possible</em>, become a hassle later when you need to manipulate the file by name at a shell.</li>
<li>Adding, editing, and removing metadata at a shell involves lots of line-editing acrobatics especially if you want to maintain the file&#8217;s orginal extension e.g. `main.WORKING.cpp`.</li>
</ol>
<span id="The_solution"><h3>The solution</h3></span>
<p>To work around these limitations I wrote a small utility called `fnmeta.py` (for &#8220;<strong>f</strong>ile<strong>n</strong>ame <strong>meta</strong>data&#8221;). It uses <a href="http://en.wikipedia.org/wiki/Base64">Base64 encoding</a> to store metadata, thus allowing you store arbitrary binary data. Beware <a href="http://en.wikipedia.org/w/index.php?title=Comparison_of_file_systems&amp;oldid=351665073#Limits">the limits on filename length</a> imposed by the filesystem. For the filesystems I use, the lowest common denominator is 255 characters.</p>
<p>If you ask `fnmeta.py` to store the string &#8220;foo&#8221; as metadata for the file `bar.baz`, it will rename `bar.baz` to `bar.<strong>TAG</strong>.<strong>ENCODED_METADATA</strong>.<strong>TAG</strong>.baz` where&#8230;</p>
<ul>
<li>&#8220;<strong>TAG</strong>&#8221; is the word &#8220;fnmeta&#8221; followed by a number indicating which version of fnmeta was used to encode the metadata. &#8220;fnmeta&#8221; gives a hint at why there&#8217;s a big chunk of non-english text in the filename and the number facilitates future updates to the encoding scheme.</li>
<li>&#8220;<strong>ENCODED_METADATA</strong>&#8221; is base64_encode(&#8220;foo&#8221;)</li>
</ul>
<span id="An_example"><h3>An example</h3></span>
<p>Here&#8217;s an example showing how I used `fnmeta.py` to store the URL from which I downloaded a PDF named `xapp374.pdf`:</p>
<pre class="brush: plain;">

$ fnmeta.py xapp374.pdf
please enter the new metadata: www.xilinx.com/support/documentation/application_notes/xapp374.pdf

$ ls xapp374*
xapp374.fnmeta1.d3d3LnhpbGlueC5jb20vc3VwcG9ydC9kb2N1bWVudGF0aW9uL2FwcGxpY2F0aW9uX25vdGVzL3hhcHAzNzQucGRm.fnmeta1.pdf

$
</pre>
<p>Later on, I retrieved the metadata like this:</p>
<pre class="brush: plain;">

$ fnmeta.py xapp374.fnmeta1.d3d3LnhpbGlueC5jb20vc3VwcG9ydC9kb2N1bWVudGF0aW9uL2FwcGxpY2F0aW9uX25vdGVzL3hhcHAzNzQucGRm.fnmeta1.pdf
www.xilinx.com/support/documentation/application_notes/xapp374.pdf

$
</pre>
<span id="The_code"><h3>The code</h3></span>
<p>`fnmeta.py` is licensed under the GPL and can be found ﻿﻿<a href="http://unsyncopated.com/corral/fnmeta.py">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://unsyncopated.com/blog/index.php/2010/03/27/storing-file-metadata-with-fnmeta-py/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>libhasp: Repurposing a copy-protection dongle for general-purpose data storage</title>
		<link>http://unsyncopated.com/blog/index.php/2010/03/12/libhasp-repurposing-a-copy-protection-dongle-for-general-purpose-data-storage/</link>
		<comments>http://unsyncopated.com/blog/index.php/2010/03/12/libhasp-repurposing-a-copy-protection-dongle-for-general-purpose-data-storage/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 15:07:29 +0000</pubDate>
		<dc:creator>Tyler</dc:creator>
				<category><![CDATA[Flickr]]></category>
		<category><![CDATA[Footnotes]]></category>
		<category><![CDATA[Reverse engineering]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Table of Contents]]></category>

		<guid isPermaLink="false">http://unsyncopated.com/blog/index.php/2010/03/12/libhasp-repurposing-a-copy-protection-dongle-for-general-purpose-data-storage/</guid>
		<description><![CDATA[Way back in 2004, I spied an offer in Circuit Cellar magazine for a free evaluation kit from Aladdin Knowledge Systems (AKS), manufacturer of copy protection tokens. These are the little gadgets that you often need to plug in to your computer to prove that you &#8221;really&#8221; own the particularly expensive application you&#8217;re trying to [...]]]></description>
			<content:encoded><![CDATA[						<div class="flickr-gallery image right"><a href="http://www.flickr.com/photos/55502932@N00/2420667301"><img class="flickr small" title="HASP HL Dongle" alt="HASP HL Dongle" src="http://farm3.static.flickr.com/2378/2420667301_d57374a9a8_m.jpg" /></a></div>
					Way back in 2004, I spied an offer in Circuit Cellar magazine for a free evaluation kit from Aladdin Knowledge Systems (AKS), manufacturer of copy protection tokens. These are the little gadgets that you often need to plug in to your computer to prove that you &#8221;really&#8221; own the <a href="http://usa.autodesk.com/adsk/servlet/pc/index?siteID=123112&amp;id=13577897">particularly expensive application</a> you&#8217;re trying to run.</p>
<p><div class='toc wptoc'>
<h2>Contents</h2>
<ol class='toc-odd level-1'>
	<li>
		<a href="#The_goods">The goods</a>
	</li>
	<li>
		<a href="#The_hack">The hack</a>
	</li>
	<li>
		<a href="#The_blob">The blob</a>
	</li>
	<li>
		<a href="#What_Bob_and_I_learned">What Bob and I learned</a>
	</li>
	<li>
		<a href="#Further_reading">Further reading</a>
	</li>
</ol>
</ol>
</ol>
</div>
<div class='wptoc-end'>&nbsp;</div>
<span id="The_goods"><h3>The goods</h3></span>
<p>Anyways, the offer boasted&#8230;</p>
<ul>
<li>A <a href="http://www.aladdin.com/hasp/protection-keys-benefits-models.aspx">HASP HL &#8220;Time&#8221; dongle</a> with built-in AES, host-accessible 4kB EEPROM, and &#8220;tamperproof&#8221; real-time clock (RTC).</li>
<li>A cross-platform SDK with libraries and example code in C and a handful of other languages.</li>
<li>Printed API documentation.</li>
</ul>
<p>After pestering them with a few emails over the course of a week, AKS sent me the kit and it arrived just in time to distract me from the first round of exams during my Senior year `X|`</p>
<p>The SDK includes a demo application which can&#8230;</p>
<ul>
<li>Read/write the token&#8217;s EEPROM.</li>
<li>Ask the token to encrypt/decrypt data with its key.</li>
<li>Read the RTC.</li>
</ul>
<span id="The_hack"><h3>The hack</h3></span>
<p>To prevent its use in a commercial setting, AKS hard-codes the encryption keys on its evaluation kit tokens.</p>
<p>So, I set out to make use of one of the &#8221;un-crippled&#8221; features: the on-token EEPROM. Claiming 1,000,000+ read/write cycles, it seems like a nice place to store &#8221;my own&#8221; encryption keys or perhaps store two-factor authentication data.</p>
<p>						<div class="flickr-gallery image right"><a href="http://www.flickr.com/photos/55502932@N00/4426568909"><img class="flickr small" title="FUSE architecture" alt="FUSE architecture" src="http://farm3.static.flickr.com/2705/4426568909_5df292d6df_m.jpg" /></a></div>
					At the time, Miklos Szeredi had just <a href="http://marc.info/?l=linux-fsdevel&amp;m=110099238632141&amp;w=2">released his Filesystem-in-userspace (FUSE) framework</a> thus extending the Real Ultimate Power(tm) of the *NIX &#8220;everything-is-a-file&#8221; paradigm to mere mortals<sup>1</sup>.</p>
<p>I hacked up the demo application to implement a bare-bones FUSE filesystem &#8211; one which provides a single file, `hello`, backed by the token&#8217;s EEPROM. I call the result &#8220;<a href="http://unsyncopated.com/hg/haspfuse/file/tip/haspfuse.c#l1">haspfuse</a>&#8220;.</p>
<p>Here are its limitations. See <a href="http://unsyncopated.com/hg/haspfuse/">the haspfuse code</a> for details.</p>
<ul>
<li>The filesystem only supports a single file. This wouldn&#8217;t be too bad if you were to stack a <a href="http://code.google.com/p/fuse-zip/">fuse-zip</a> or <a href="http://en.wikipedia.org/wiki/Archivemount">archivemount</a>-based tarball-backed filesystem on top. Don&#8217;t even think about JFFS(2) or ext2 &#8211; they each require more than 4kB for a single block.</li>
<li>The single file has a fixed size of 3584.</li>
<li>No operation besides: `getattr`, `readdir`, `open`, `read`, `write`, `truncate`, and `chmod` is supported.</li>
<li>The filesystem probably isn&#8217;t &#8220;eject-safe&#8221;. See FUSE&#8217;s `direct_io` for a starting point.</li>
</ul>
<span id="The_blob"><h3>The blob</h3></span>
<p>Additionally, a proprietary blob &#8220;driver&#8221; named `aksusbd` and a static library from the SDK named `libhasp_linux.a` are required. I had trouble with version 3.5.0 so I included v1.8.1 with the haspfuse code.</p>
<p>`aksusbd` is a userspace driver that employs usbfs to interact with the token. Unfortunately, the deprecation of usbfs is <a href="http://www.alteraforum.com/forum/showthread.php?t=5893">apparently now complete with the release of the 2.6.31.20 Ubuntu kernel</a>. This means that <a href="https://help.ubuntu.com/community/VirtualBox/USB">the old standby methods for re-enabling it</a> no longer work.</p>
<p>You&#8217;ll need to use a custom kernel with usbfs support, or better yet, develop an open source driver for these tokens!</p>
<p>The latter approach would be especially helpful because my friend Bob claims that &#8220;`aksusbd` is setuid root and full of vulnerabilities&#8221;. But that&#8217;s another story&#8230;</p>
<p>Be aware that various AKS licenses and draconian US laws may prohibit you from reverse engineering `akusbd`.</p>
<span id="What_Bob_and_I_learned"><h3>What Bob and I learned</h3></span>
<ul>
<li>Filesystem design for severely space-constrained storage devices.</li>
<li>How to build a virtual filesystem using the FUSE C API.</li>
<li>Methods for rebuilding ELF symbol tables and the idiosyncrasies that result when the binary is dynamically-linked and uses <a href="http://en.wikipedia.org/wiki/Native_POSIX_Thread_Library">the Native POSIX Thread Library (NTPL)</a>.</li>
<li>The software tools available for USB protocol reversing.</li>
<li>The myriad sorts of implementation failures that lead to &#8220;cracked&#8221; hardware tokens.</li>
</ul>
<span id="Further_reading"><h3>Further reading</h3></span>
<ul>
<li><a href="http://www.etokenonlinux.org/et/">etokenonlinux.org</a> &#8211; A great resource for using other AKS tokens to do two-factor authentication, one-time password storage, and encrypted partition unlocking <em>The Right Way™</em>. Provided by Cornelius Koelbel.</li>
<li>Guy-Gregoire Leclercq&#8217;s <a href="http://www.stacksegment.net/wiki/index.php/Aladdin_eToken_64k">detailed notes on using the eToken 64k with OpenCT/OpenSC on Debian</a>.</li>
<li>Andy Smith&#8217;s rebuilt, <a href="http://andys.org.uk/bits/2009/12/23/openssh-and-opensc-for-debian-and-ubuntu/">OpenSC-enabled, openssh-client and how to store SSH keys</a> on an eToken with it.</li>
</ul>
<ol class="footnotes">
<li id="footnote_0_542" class="footnote">Well, mortals too squeamish to run <a href="http://en.wikipedia.org/wiki/Plan_9_from_Bell_Labs">Plan 9</a> as their every-day operating system ;]</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://unsyncopated.com/blog/index.php/2010/03/12/libhasp-repurposing-a-copy-protection-dongle-for-general-purpose-data-storage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding a dimension to your photos</title>
		<link>http://unsyncopated.com/blog/index.php/2010/03/09/adding-a-dimension-to-your-photos/</link>
		<comments>http://unsyncopated.com/blog/index.php/2010/03/09/adding-a-dimension-to-your-photos/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 00:13:47 +0000</pubDate>
		<dc:creator>Tyler</dc:creator>
				<category><![CDATA[Flickr]]></category>
		<category><![CDATA[Shell programming]]></category>
		<category><![CDATA[Syntax highlighter]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Youtube]]></category>

		<guid isPermaLink="false">http://unsyncopated.com/blog/index.php/2010/03/10/adding-a-dimension-to-your-photos/</guid>
		<description><![CDATA[Have you ever wanted to transform a run-of-the-mill photograph into a complete 3D scene automagically like Jack Black does in this mildly-NSFW 35MiB 2min clip from Enemy of the State?
Well too bad -- it&#8217;s just not possible to ascertain details that are hidden from the camera&#8217;s view!
You can get pretty close, though, with some software [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever wanted to transform a run-of-the-mill photograph into a complete 3D scene automagically like Jack Black does in <a href="http://unsyncopated.com/corral/enemy_of_the_state_trimmed.mpeg">this mildly-NSFW 35MiB 2min clip</a> from <a href="http://www.imdb.com/title/tt0120660/">Enemy of the State</a>?</p>
<p>Well too bad -- it&#8217;s just not possible to ascertain details that are hidden from the camera&#8217;s view!</p>
<p>You can get pretty close, though, with some software I discovered via <a href="http://www.linuxjournal.com/magazine/new-projects-fresh-labs-14">an article in the Linux Journal</a>.</p>
<p>						<div class="flickr-gallery image right"><a href="http://www.flickr.com/photos/55502932@N00/4421405150"><img class="flickr small" title="Loctite Epoxy Bottle" alt="Loctite Epoxy Bottle" src="http://farm5.static.flickr.com/4002/4421405150_632821eaef_m.jpg" /></a></div>
					The software is called Discrete Geometry Viewer (DGV) and I&#8217;ll illustrate the salient feature with this photo I took of a cylindrical epoxy bottle:</p>
<p>GDV uses <a href="http://www.vtk.org/">the Visualization Toolkit (VTK)</a> to display what are called &#8220;surface plots&#8221;. I wanted to record a simple screencast of myself rotating a surface plot by hand but <a href="http://groups.google.com/group/discrete-geometry-viewer/browse_thread/thread/77df519c03d8eb6f">I couldn&#8217;t convince VTK to do &#8220;live&#8221; previews</a>. As a workaround I whipped up this shell script which rotates the surface plot in small increments, taking screenshots along the way:</p>
<pre class="brush: bash;">
# simulate multiple click-and-drag mouse events along predetermined

# coordinates. after each of these click-and-drag events, take a screenshot
# with imagemagick's &quot;import&quot; utility.

# you should generate coordinates at which to click with...
#  (while :; do xdotool getmouselocation | \
#   awk '{print substr($1,3) &quot; &quot; substr($2,3)}'; done) | uniq
# ... and save them to the file at COORDS_PATH

# you can assemble the screenshots into a movie with...
#  ffmpeg -r 30 -b 300k -i %05d.jpg -b 1157kb out.mp4

COORDS_PATH=~/prog/sh/screenshot_rect_while_dragging.dat
SHOTS_DIR=/media/humid_data/tmp/shots
# head -n1 ${COORDS_PATH} | read PREV_X PREV_Y
# PUZZLE: why doesnt the above work? instead we'll use...
PREV_X=343; PREV_Y=135
I=1
mkdir ${SHOTS_DIR}
while read CUR_X CUR_Y
do
  echo moving to ${CUR_X} ${CUR_Y} as step ${I}
  # move to pos
  # greets to fellow RIT alum jordan sissel, xdotool's author
  xdotool mousemove ${PREV_X} ${PREV_Y}
  # mouse down
  xdotool mousedown 1
  # move to pos
  xdotool mousemove ${CUR_X} ${CUR_Y}
  # mouse up
  xdotool mouseup 1
  # give the app some time to finish rendering
  sleep .3s
  # take screenshot
  import -crop 640x480+38+130 -window root -quality 100 \
  ${SHOTS_DIR}/$(printf &quot;%05d&quot; ${I}).jpg

  I=$((I+1))
  PREV_X=${CUR_X}
  PREV_Y=${CUR_Y}
done &lt; ${COORDS_PATH}
</pre>
<p>Next I assembled the screenshots into a video with <a href="http://www.openshotvideo.com/">Openshot</a>, a young but very stable and featureful nonlinear video editor. Here&#8217;s the result:</p>
<p>	<!-- Smart Youtube -->
	<span class="youtube">
		<object width="425" height="362">
			<param name="movie" value="http://www.youtube-nocookie.com/v/a4UCOrIZb2s&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0" />
			<param name="allowFullScreen" value="true" />
			<embed wmode="transparent" 
				src="http://www.youtube-nocookie.com/v/a4UCOrIZb2s&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0" 
				type="application/x-shockwave-flash" 
				allowfullscreen="true" 
				width="425" 
				height="362">
			</embed>
			<param name="wmode" value="transparent" />
		</object>
	</span><a href="http://www.youtube.com/watch?v=a4UCOrIZb2s">www.youtube.com/watch?v=a4UCOrIZb2s</a></p>
<p>For some more image-processing fanciness, see <a href="http://cs5.org/?p=147">this slick video demo of the &#8220;structural editing&#8221; tools planned for Photoshop CS5</a>. There&#8217;s interesting discussion (incl. some NSFW comments) at <a href="http://www.reddit.com/r/programming/comments/9o4uu/improved_image_editing_in_photoshop_cs5_demo/">this proggit thread</a>. For instructions on feeding &#8220;heightmaps&#8221; to a 3D printer, see <a href="http://www.thingiverse.com/thing:2078">these instructions</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://unsyncopated.com/blog/index.php/2010/03/09/adding-a-dimension-to-your-photos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://unsyncopated.com/corral/enemy_of_the_state_trimmed.mpeg" length="35631104" type="video/mpeg" />
		</item>
		<item>
		<title>Visiting Boston</title>
		<link>http://unsyncopated.com/blog/index.php/2010/03/07/visiting-boston/</link>
		<comments>http://unsyncopated.com/blog/index.php/2010/03/07/visiting-boston/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 04:39:51 +0000</pubDate>
		<dc:creator>Tyler</dc:creator>
				<category><![CDATA[Flickr]]></category>
		<category><![CDATA[Food and Drink]]></category>
		<category><![CDATA[Travel]]></category>
		<category><![CDATA[Youtube]]></category>

		<guid isPermaLink="false">http://unsyncopated.com/blog/index.php/2010/03/07/visiting-boston/</guid>
		<description><![CDATA[After a few false starts this Winter, I finally made it to Boston this weekend. I went with Carolyn and Jumbo. It was great to take a road trip where I wasn&#8217;t in the driver&#8217;s seat `:]`
We stopped at the Museum of Science as soon as we arrived. It housed an excellent &#8220;history of mathematics&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>After a few false starts this Winter, I finally made it to Boston this weekend. I went with Carolyn and Jumbo. It was great to take a road trip where I <em>wasn&#8217;t</em> in the driver&#8217;s seat `:]`</p>
<p>We stopped at <a href="http://www.mos.org/">the Museum of Science</a> as soon as we arrived. It housed an excellent &#8220;history of mathematics&#8221; exhibit sponsored by IBM and sprinkled with comic strips to keep it from getting too heavy. I became comfortably lost there for almost an hour.</p>
<p>I stopped by <a href="http://www.mos.org/computingrevolution/enigma/index.html">the computing exhibit</a> next and found a replica Enigma Machine -- a piece of WWII crypto history that was central to the plot of a book I just finished -- Neal Stephenson&#8217;s Cryptonomicon. The machine itself was understandably enclosed in a plastic display case, but an authentic Enigma transmission bleated out from a little speaker at the push of a button.</p>
<p>Around the corner I found &#8220;<a href="http://en.wikipedia.org/wiki/Whirlwind_(computer)">Whirlwind</a>&#8220;, an early computer built down the river at MIT under an Air Force contract. The machine included a shoebox-size stack of &#8220;core&#8221; memory -- you know, the stuff made of ferrite donuts after which most Unixes name the memory dumps created for misbehaving programs<sup>1</sup>. The museum installed a 16-bit bank of interactive core memory nearby that you can fiddle with . Dime-sized compasses indicate the values programmed at each bit. Neat.</p>
						<div class="flickr-gallery image right"><a href="http://www.flickr.com/photos/55502932@N00/4415435776"><img class="flickr small" title="Coral at the NEA" alt="Coral at the NEA" src="http://farm5.static.flickr.com/4013/4415435776_834e47353d_m.jpg" /></a></div>
					Due to a field trip, we were forced to crowdsurf over a thousand caffeinated field-tripping 5th-graders on our way out. After paying the exorbitant parking fee ($30 for 2.5hrs?) we jetted across town to <a href="http://www.neaq.org/">the Aquarium</a>.</p>
<p>	<!-- Smart Youtube -->
	<span class="youtube">
		<object width="425" height="362">
			<param name="movie" value="http://www.youtube-nocookie.com/v/lnvWbq6V7AU&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0" />
			<param name="allowFullScreen" value="true" />
			<embed wmode="transparent" 
				src="http://www.youtube-nocookie.com/v/lnvWbq6V7AU&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0" 
				type="application/x-shockwave-flash" 
				allowfullscreen="true" 
				width="425" 
				height="362">
			</embed>
			<param name="wmode" value="transparent" />
		</object>
	</span><a href="http://www.youtube.com/watch?v=lnvWbq6V7AU">www.youtube.com/watch?v=lnvWbq6V7AU</a></p>
<p>						<div class="flickr-gallery image right"><a href="http://www.flickr.com/photos/55502932@N00/4414669621"><img class="flickr small" title="The NEA's Main Tank" alt="The NEA's Main Tank" src="http://farm5.static.flickr.com/4010/4414669621_5c26afd259_m.jpg" /></a></div>
					The aquarium featured a 4-story-tall 290,000gal tank that you can view from every angle besides below. As we walked up the staircase that spiraled around it, we watched divers feeding some cranky-looking 8ft sand sharks. Very impressive.</p>
<p>	<!-- Smart Youtube -->
	<span class="youtube">
		<object width="425" height="362">
			<param name="movie" value="http://www.youtube-nocookie.com/v/K89lFWV2KcI&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0" />
			<param name="allowFullScreen" value="true" />
			<embed wmode="transparent" 
				src="http://www.youtube-nocookie.com/v/K89lFWV2KcI&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0" 
				type="application/x-shockwave-flash" 
				allowfullscreen="true" 
				width="425" 
				height="362">
			</embed>
			<param name="wmode" value="transparent" />
		</object>
	</span><a href="http://www.youtube.com/watch?v=K89lFWV2KcI">www.youtube.com/watch?v=K89lFWV2KcI</a></p>
<p>We consulted <a href="http://www.yelp.com/boston">Yelp</a> for dinner ideas and decided on <a href="http://www.cafebelo.com/">Cafe Belo</a>, a Brazilian BBQ restaurant in Everett of the <a href="http://en.wikipedia.org/wiki/Rodizio">rodizio</a> style. You pay a fixed price ($10, there) and servers stop by your table every few minutes with hot meats on skewers, asking if you&#8217;d like a slice. Brazilian Beef ribs, Jamaican chicken, sirloin, pork, and some killer garlic beef.</p>
<p>On Saturday I got up early and took the train to Cambridge to visit the MIT campus.<br />
						<div class="flickr-gallery image right"><a href="http://www.flickr.com/photos/presta/2739807731"><img class="flickr small" title="skyline, 365.210" alt="skyline, 365.210" src="http://farm4.static.flickr.com/3052/2739807731_e92d79944d_m.jpg" /></a></div>
					
<p>It was quiet save for a scattered handful of undergrads with MIT sweatshirts looking more energetic than any undergrads I&#8217;ve seen on a weekend morning.</p>
<p>Access was restricted to <a href="http://people.csail.mit.edu/rivest/">Rivest</a>&#8217;s hallway, the <a href="http://groups.csail.mit.edu/pag/">Program Analysis Group</a>&#8217;s wing<sup>2</sup>, and the <a href="http://css.csail.mit.edu/">Computer Systems Security Group</a>&#8217;s wing. I did, however, have lunch in the curiously-shaped Stata center and stumble across a <a href="http://en.wikipedia.org/wiki/Lisp_machine">Lisp Machine</a>!</p>
						<div class="flickr-gallery image right"><a href="http://www.flickr.com/photos/55502932@N00/4414670689"><img class="flickr small" title="Lisp Machine at MIT" alt="Lisp Machine at MIT" src="http://farm5.static.flickr.com/4058/4414670689_1ec1316711_m.jpg" /></a></div>
					
<p>That afternoon we drove to <a href="http://www.jordansimax.com/">the IMAX theater in Natick</a> to see Tim Burton&#8217;s Alice in Wonderland. An enterprising furniture salesman convinced IMAX to build this theater in the middle of his showroom, thus guaranteeing a continuous flow of people in a receptive frame of mind. Ingenious.</p>
<p>On Saturday night we met Jumbo&#8217;s high school buddy, Mike, at his home a few blocks from Bunker Hill. We all went out to celebrate Mike&#8217;s birthday at <a href="http://www.midwestgrillrestaurant.com/ma/cambridge/">the Midwest Grill</a>. It turned out to be another Rodizio restaurant. In addition to Cafe Belo&#8217;s fare, we had bacon-wrapped chicken, sirloin tips, checken breasts, chicken hearts (!), and some of the best keilbasa I&#8217;ve ever had. The hot buffet included some amazing smooth and buttery ocra, two stews, and some <em>mean</em> pork rinds.</p>
						<div class="flickr-gallery image right"><a href="http://www.flickr.com/photos/nikchick/405106840"><img class="flickr small" title="Action shot" alt="Action shot" src="http://farm1.static.flickr.com/180/405106840_944281663c_m.jpg" /></a></div>
					
<p>As if to prevent me from floating off into culinary heaven, our waitress denied my request for draft Sam Adams (imagine that -- <em>out of Sam Adams</em> in <em>Boston</em>) and instead brought me a bottle.</p>
<p>We returned around noon today after having some killer french toast at <a href="http://www.ballsquarecafe.com">Ball Square Cafe</a> in Everett and climbing the Bunker Hill Monument.</p>
						<div class="flickr-gallery image right"><a href="http://www.flickr.com/photos/55502932@N00/4415439006"><img class="flickr small" title="French Toast at Ball Squared" alt="French Toast at Ball Squared" src="http://farm3.static.flickr.com/2721/4415439006_33c6711797_m.jpg" /></a></div>
					
<p>						<div class="flickr-gallery image right"><a href="http://www.flickr.com/photos/55502932@N00/4415438778"><img class="flickr small" title="Bunker Hill Monument" alt="Bunker Hill Monument" src="http://farm3.static.flickr.com/2738/4415438778_b80110bf7d_m.jpg" /></a></div>
					
<ol class="footnotes">
<li id="footnote_0_471" class="footnote">Linux 2.5+ gives you some options in this regard via its <a href="http://www.google.com/search?q=core_pattern">core_pattern</a> `/proc` knob</li>
<li id="footnote_1_471" class="footnote">Check out the <em>deep</em> reading list at <a href="http://groups.csail.mit.edu/pag/reading-group/">the Program Analysis Reading Group&#8217;s site</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://unsyncopated.com/blog/index.php/2010/03/07/visiting-boston/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creds101 v0.1 Release</title>
		<link>http://unsyncopated.com/blog/index.php/2010/02/20/creds101-v0-1-release/</link>
		<comments>http://unsyncopated.com/blog/index.php/2010/02/20/creds101-v0-1-release/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 14:38:45 +0000</pubDate>
		<dc:creator>Tyler</dc:creator>
				<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Flickr]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Python programming]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Table of Contents]]></category>

		<guid isPermaLink="false">http://unsyncopated.com/blog/index.php/2010/02/20/creds101-v0-1-release/</guid>
		<description><![CDATA[I&#8217;m happy to announce the first release of a credentials (e.g. &#8220;usernames and passwords&#8221;) management system that I&#8217;ve been working on for the past few weeks. It&#8217;s called Creds101 and this excerpt from the documentation gives some more detail:
Creds101 has 2 parts:

Software that you run on your computer (the &#8220;host&#8221;) to send commands to&#8230;
A USB [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m happy to announce the first release of a credentials (e.g. &#8220;usernames and passwords&#8221;) management system that I&#8217;ve been working on for the past few weeks. It&#8217;s called Creds101 and this excerpt from <a href="http://unsyncopated.com/corral/creds101-0.1/index.html">the documentation</a> gives some more detail:</p>
<hr />Creds101 has 2 parts:</p>
<ol>
<li>Software that you run on your computer (the &#8220;host&#8221;) to send commands to&#8230;</li>
<li>A USB &#8220;token&#8221; which A) encrypts and stores credentials from the host and B) decrypts and displays them on its LCD.</li>
</ol>
<p>Creds101 serves the same purpose as traditional &#8220;password database&#8221; solutions but it is different in two fundamental ways:</p>
<ol>
<li>Credentials aren&#8217;t stored on the user&#8217;s computer &#8211; they&#8217;re stored on a USB &#8220;token&#8221;.</li>
<li>Sensitive credential data &#8221;cannot be read by malicious software on the user&#8217;s computer&#8221; &#8211; credentials can only be viewed on the token&#8217;s &#8220;trusted LCD display&#8221;.</li>
</ol>
<hr />
<span id="Contents"><h3>Contents</h3></span>
<div class='toc wptoc'>
<h2>Contents</h2>
<ol class='toc-odd level-1'>
	<li>
		<a href="#Contents">Contents</a>
	</li>
	<li>
		<a href="#Whats_in_v0.1">What's in v0.1?</a>
	</li>
	<li>
		<a href="#Whats_next">What's next?</a>
	</li>
	<li>
		<a href="#What_I_learned">What I learned</a>
	</li>
	<li>
		<a href="#Download__Quickstart">Download / Quickstart</a>
	</li>
	<li>
		<a href="#Further_reading">Further reading</a>
	</li>
</ol>
</ol>
</ol>
</div>
<div class='wptoc-end'>&nbsp;</div>
<span id="What8217s_in_v0.1"><h3>What&#8217;s in v0.1?</h3></span>
<ul>
<li><a href="http://www.methods.co.nz/asciidoc/">AsciiDoc</a>-based documentation including the &#8220;host-&gt;token&#8221; serial command protocol and data-flow diagrams illustrating how credentials are encrypted, stored, decrypted, and displayed by the token.</li>
<li>A <a href="http://docs.python.org/library/unittest.html">unittest</a> test suite which exercises each of the commands accepted by the token. Install <a href="http://twistedmatrix.com/trac/">Twisted</a> and try
<pre class="brush: bash;">PYTHONPATH=src trial src/TestSimulatorToken.py</pre>
</li>
<li>A cross-platform &#8220;token administration&#8221; GUI for storing and retrieving credentials. Try
<pre class="brush: bash;">bin/creds101-admin-gui --use-simulator</pre>
<p>or see screenshot 1.						<div class="flickr-gallery image none"><a href="http://www.flickr.com/photos/55502932@N00/4373389528"><img class="flickr small" title="Screenshot 1 - GUIs" alt="Screenshot 1 - GUIs" src="http://farm5.static.flickr.com/4066/4373389528_7f97d950e4_m.jpg" /></a></div>
					</li>
<li>A command-line &#8220;token administration&#8221; interface. Try
<pre class="brush: bash;">bin/creds101 --help</pre>
</li>
<li>A &#8220;token simulator&#8221; that allows us to 1) develop tests 2) iron out token design issues &#8221;before&#8221; coding in C for an embedded platform. Try
<pre class="brush: bash;">bin/creds101-simulator --gui</pre>
<p>or see screenshot 1.</li>
<li>						<div class="flickr-gallery image right"><a href="http://www.flickr.com/photos/55502932@N00/4372493561"><img class="flickr small" title="Photo 2 - Desoldering flash part" alt="Photo 2 - Desoldering flash part" src="http://farm3.static.flickr.com/2709/4372493561_13955be0f6_m.jpg" /></a></div>
					The beginnings of the code for an <a href="http://www.arduino.cc/en/Main/ArduinoBoardDuemilanove">Arduino</a>-based token. Take a look in `src/arduino`. This includes code for&#8230;
<ul>
<li>Receiving commands from the &#8220;host&#8221; via the Arduino&#8217;s FTDI serial-over-USB chip.</li>
<li>Reading and writing data to the 512 bytes of internal EEPROM or an attached SPI <a href="http://www.atmel.com/products/dataflash/default.asp">DataFlash</a> part. See photos 2 and 3.</li>
<li>Displaying text on a <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=9394">SparkFun SerLCD</a> LCD module.</li>
<li>Encrypting and decrypting data with 128-bit AES.</li>
</ul>
</li>
</ul>
<span id="What8217s_next"><h3>What&#8217;s next?</h3></span>
<ul>
<li>						<div class="flickr-gallery image right"><a href="http://www.flickr.com/photos/55502932@N00/4373266740"><img class="flickr small" title="Photo 3 - New leads" alt="Photo 3 - New leads" src="http://farm3.static.flickr.com/2706/4373266740_32369563b4_m.jpg" /></a></div>
					Completing the Arduino token implementation so that we have something that&#8217;s suitable for everyday use.</li>
<li>Completing a thumbdrive-sized token implementation &#8211; the ideal form factor.</li>
<li>The smaller tasks that can be found in the `TODO` file.</li>
</ul>
<span id="What_I_learned"><h3>What I learned</h3></span>
<ul>
<li>How to create slick, source-based docs with the AsciiDoc tool suite. As much as I like MoinMoin markup, the wiki engine itself isn&#8217;t amenable to being invoked from a build automation tool.</li>
<li>GUI design with <a href="http://glade.gnome.org/">Glade</a>, a slick <a href="http://en.wikipedia.org/wiki/Rapid_application_development">RAD</a> tool used by many free software projects.</li>
<li>GUI interaction with <a href="http://www.pygtk.org/">PyGTK</a>. I wrote a well-behaved worker thread that runs alongside the GTK main loop for the token simulator component.</li>
<li>The theory and implementation of &#8220;Secret Sharing&#8221; schemes especially Shamir&#8217;s Secret Sharing Scheme (SSSS). We discarded SSSS in favor of the current &#8220;store-the-key-on-the-host, store-the-ciphertext-on-the-token&#8221; design.</li>
<li>A handful of Python skills&#8230;
<ul>
<li>Finding a script&#8217;s location &#8221;from within the script&#8221;. Handy for using `bin/foo -&gt; src/foo.py` symlinks in conjunction with external (e.g. Glade XML) resources.</li>
<li>Python&#8217;s built-in <a href="http://docs.python.org/library/xmlrpclib.html">XML-RPC</a> library. Reconciling UNIX socket semantics with thread semantics gave me fits before I switched to this IPC mechanism.</li>
<li>Steven Bethard&#8217;s superior <a href="http://code.google.com/p/argparse/">argparse</a> module which makes handling subcommands and required positional arguments a breeze compared with Python&#8217;s standard optparse module.</li>
</ul>
</li>
</ul>
<span id="Download__Quickstart"><h3>Download / Quickstart</h3></span>
<p>Creds101 is licensed under the GPL.</p>
<p>Here are the steps to grab the v0.1 source tarball from <a href="http://unsyncopated.com/hg/creds101/">the hgweb interface</a> and take the GUIs for a test drive!</p>
<pre class="brush: bash;">
$ wget http://unsyncopated.com/hg/creds101/archive/0.1.tar.gz
$ tar xzf 0.1.tar.gz
$ cd creds101-0.1
$ bin/creds101-simulator --gui &amp;           # launch the token simulator
$ bin/creds101-admin-gui --use-simulator &amp; # connect to the simulator
</pre>
<span id="Further_reading"><h3>Further reading</h3></span>
<p>You can see our design notes, plans, and a list of similar projects at <a href="https://www.unsyncopated.com/wiki/Creds101">the wiki page</a> but beware the outdated Secret Sharing content.</p>
<p>I&#8217;m accumulating all the research papers, datasheets, and application notes I&#8217;ve encountered during this project in <a href="http://unsyncopated.com/hg/creds101-research_materials/file/tip">a &#8220;research materials&#8221; repository</a>. You might find the contents useful if you&#8217;re trying to choose an AES implementation for an AVR microcontroller or if your project falls into one of these categories: &#8220;cryptographic co-processor&#8221;, &#8220;hardware security module&#8221;, &#8220;embedded secret secret sharing&#8221;, &#8220;ubiquitous/pervasive computer security&#8221;, or &#8220;tamper evidence/proof&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://unsyncopated.com/blog/index.php/2010/02/20/creds101-v0-1-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sending data via cellular voice connections with Linux</title>
		<link>http://unsyncopated.com/blog/index.php/2009/11/19/sending-data-via-cellular-voice-connections-with-linux/</link>
		<comments>http://unsyncopated.com/blog/index.php/2009/11/19/sending-data-via-cellular-voice-connections-with-linux/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 10:45:03 +0000</pubDate>
		<dc:creator>Tyler</dc:creator>
				<category><![CDATA[Flickr]]></category>
		<category><![CDATA[Footnotes]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Python programming]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Shell programming]]></category>
		<category><![CDATA[Syntax highlighter]]></category>
		<category><![CDATA[Table of Contents]]></category>

		<guid isPermaLink="false">http://unsyncopated.com/blog/index.php/2009/11/20/sending-data-via-cellular-voice-connections-with-linux/</guid>
		<description><![CDATA[
&#8220;A5/1 [the encryption scheme used in most cellular voice calls] has operated unchanged for the last 21 years but it has now reached its cryptographic end-of-life, engulfed by the march of Moore&#8217;s Law. However, the operational end-of-life of A5/1 may still be decades away as there are approximately 2 billion GSM subscribers, commanding about 80% of [...]]]></description>
			<content:encoded><![CDATA[<div>
<p style="padding-left: 30px;">&#8220;A5/1 [the encryption scheme used in most cellular voice calls] has operated unchanged for the last 21 years but it has now reached its cryptographic end-of-life, engulfed by the march of Moore&#8217;s Law. However, the operational end-of-life of A5/1 may still be decades away as there are approximately 2 billion GSM subscribers, commanding about 80% of the global mobile market. This would be a tough product recall indeed. A5/1 is well-positioned to become the NT of the mobile crypto world, and I see the makings of a long tail of GSM vulnerability.&#8221; - <a href="http://ch.linkedin.com/pub/luke-o-connor/1/bb6/152">Dr. Luke O&#8217;Connor</a> at <a href="http://lukenotricks.blogspot.com/2009/09/another-crack-at-open-rainbow-tables.html">NoTricks: Another crack at open Rainbow Tables for A5/1</a></p>
<div class='toc wptoc'>
<h2>Contents</h2>
<ol class='toc-odd level-1'>
	<li>
		<a href="#Introduction">Introduction</a>
	</li>
	<li>
		<a href="#The_modem__Hardware_components">The modem / Hardware components</a>
	</li>
	<li>
		<a href="#Transmitting_audio_from_a_PC_to_a_cell_phone__Software_components">Transmitting audio from a PC to a cell phone / Software components</a>
	</li>
	<li>
		<a href="#Demonstration__OKCrypto_scripts">Demonstration / OKCrypto scripts</a>
	</li>
	<li>
		<a href="#Encryption">Encryption</a>
	</li>
	<li>
		<a href="#Further_work">Further work</a>
	</li>
	<li>
		<a href="#What_I_learned">What I learned</a>
	</li>
	<li>
		<a href="#Conclusion__Download">Conclusion / Download</a>
	</li>
	<li>
		<a href="#Further_reading">Further reading</a>
	</li>
</ol>
</ol>
</ol>
</div>
<div class='wptoc-end'>&nbsp;</div>
<span id="Introduction"><h3>Introduction</h3></span>
<p>The ability to intercept and decrypt GSM cell phone conversations is now well within the reach of hobbyists.<sup>1</sup><sup>2</sup></p>
<p>My friend Scott and I were discussing this sobering fact one night and we began wondering if any systems exist which provide end-to-end encryption for this insecure link.</p>
<p>Sure, there are plenty of solutions for people with access to cellular dataconnections, but what can voice call participants use to foil eavesdroppers?</p>
<p>We didn&#8217;t find any low-cost systems so we decided to create our own. OKCrypto is the Linux-based encrypting software modem that we&#8217;ve made. It consists of two components: the modem component and crypto component.</p>
<span id="The_modem__Hardware_components"><h3>The modem / Hardware components</h3></span>
<p>We needed the ability to send data before we could try sending  encrypteddata, so the first step was to design a simple software modem.</p>
<p>Rather than executing the modem code on the cell phones themselves, I decided to host the modem code on a the sender and receiver&#8217;s Linux systems. This design provides two benefits:</p>
<ol>
<li>The modem code and crypto code has access to the rich Linux API.</li>
<li>Sensitive code and data are isolated from the both the cell phone itself and from the cell infrastructure. We have clean separation between trusted (PC) and untrusted (cell) environments.</li>
</ol>
<p>Thus, the &#8220;real work&#8221; in OKCrypto is done on the PC &#8211; the cell phones simply allow the PCs to talk to each other. See figure 1 for an overview of the hardware involved in the system. 						<div class="flickr-gallery image right"><a href="http://www.flickr.com/photos/55502932@N00/4153181728"><img class="flickr small" title="Fig. 1 - Hardware components" alt="Fig. 1 - Hardware components" src="http://farm3.static.flickr.com/2534/4153181728_a0fe8e3a63_m.jpg" /></a></div>
					</p>
<p>Conceptually, the modem is similar to the analog Plain Old Telephone Service (POTS) modems from the Bad Old Days before broadband service became popular. Instead of an audio coupler, we&#8217;re using Bluetooth to connect our PC to our phone line. Instead of custom hardware, our modem is comprised of some glue scripts and the software packages they connect &#8211; all running on a Linux PC.</p>
<p>The modem doesn&#8217;t provide an asynchronous full-duplex communication link like traditional modems. This modem&#8217;s operation is simpler: The sender&#8217;s modem dials the number of, and subsequently transmits a pre-prepared chunk of data to, the recipient&#8217;s modem. It then hangs up.</p>
<p>The modem uses Dual-tone multi-frequency (DTMF) signaling to encode the data it transmits. I chose DTMF because I was familiar with it and because Debian provides a package for <a href="http://www.baycom.org/~tom/ham/linux/multimon.html">Multimon</a>. OKCrypto uses two utilities that Multimon provides:</p>
<ol>
<li>gen &#8211; a DTMF generation utility (digits-&gt;wav file)</li>
<li>multimon &#8211; a DTMF detection utility (wav file-&gt;digits)</li>
</ol>
<span id="Transmitting_audio_from_a_PC_to_a_cell_phone__Software_components"><h3>Transmitting audio from a PC to a cell phone / Software components</h3></span>
<p>I&#8217;d been working on a few Bluetooth security projects at the time, so the Hands-Free Profile (HFP)<sup>3</sup> came immediately to mind as a convenient way to transfer audio (and any data we&#8217;ve encoded in the audio) between a PC and a cell phone during a call.</p>
<p>-flickr size=&#8221;small&#8221; float=&#8221;right&#8221;-4153181752-/flickr-In most cases HFP is used to connect a a Bluetooth phone to a Bluetooth headset so that the headset can be used to make calls via the phone. See figure 2.</p>
<p>-flickr size=&#8221;small&#8221; float=&#8221;right&#8221;-4153181518-/flickr-In the PC world, HFP is typically used to connect a desktop computer to a bluetooth headset. See figure 3. In that configuration, the PC fulfills the first of two roles mandated by the HFP specification: the Audio Gateway (AG) role. The headset fulfills the hands-free (HF) role.</p>
						<div class="flickr-gallery image right"><a href="http://www.flickr.com/photos/55502932@N00/4152393267"><img class="flickr small" title="Fig. 4 - PC ~ Cell phone" alt="Fig. 4 - PC ~ Cell phone" src="http://farm3.static.flickr.com/2737/4152393267_95526e2aaf_m.jpg" /></a></div>
					For our purposes, we need the PC to appear to be a bluetooth headset to a cell phone &#8211; the PC must fulfill the HF role. See figure 4. This is similar to how call-handling in-vehicle GPS/stereo units work.</p>
<p>Support for the HF role in <a href="http://www.bluez.org/">bluez</a>, the Linux Bluetooth stack (pronounced &#8220;blue-zee&#8221;), is just now maturing<sup>4</sup> so I went searching for a userspace implementation of the HFP protocol stack.</p>
<p>One of the best, chan_mobile, is distributed as an add-on to the popular open-source private branch exchange (PBX) <a href="http://www.asterisk.org/">Asterisk</a> system. If you configure chan_mobile to use your cell phone, Asterisk can make both outbound calls and receive inbound calls with the phone.</p>
<p>Asterisk is the largest software component of the OKCrypto modem. It not only provides a reliable HFP HF role implementation which works with a wide array of modern phones (see above), but also many essential telephony operations:</p>
<ol>
<li>Recording audio during a call. OKCrypto uses Asterisk&#8217;s built-in voicemail capabilities.</li>
<li>Transmitting audio during a call.</li>
<li>Pausing for a given time period.</li>
<li>Logging phone call details.</li>
</ol>
<p>See figure 5 for an overview of the software components in the OKCrypto system. Note that the same software is used on both the sender and receiver&#8217;s PCs.						<div class="flickr-gallery image right"><a href="http://www.flickr.com/photos/55502932@N00/4153379126"><img class="flickr small" title="Fig. 5 - Software components" alt="Fig. 5 - Software components" src="http://farm3.static.flickr.com/2521/4153379126_22a0fbc569_m.jpg" /></a></div>
					
<span id="Demonstration__OKCrypto_scripts"><h3>Demonstration / OKCrypto scripts</h3></span>
<p>Let&#8217;s look at how we can use this modem to send a 16-byte binary file over a cellular voice connection.</p>
<p>First, the sender and recipient will need to perform some set-up steps:</p>
<ol>
<li>1. Acquire a Linux-supported computer and Bluetooth adapter. I found that using a virtual machine introduces latency that bluez/btusb cannot tolerate.</li>
<li>Acquire a HFP-capable cell phone.</li>
<li>Install Linux, <a href="http://sox.sourceforge.net/">SoX</a>, Python, multimon, Asterisk, the Asterisk &#8220;add-ons&#8221;, GPG, and the OKCrypto scripts.</li>
<li>Pair cell phone with computer. Grant HFP access.</li>
<li>Configure chan_mobile</li>
<li>Start Asterisk Next, the sender can issue this command at a shell to send the file &#8216;/tmp/foo&#8217; to the recipient at 585-555-3258.
<pre class="brush: bash;">$ ./bin_to_int_seq.py /tmp/foo | ./ast_send.sh 5855553258 [...]
$ cksum /tmp/foo 668417501 16 /tmp/foo</pre>
<p>She&#8217;ll notice her PC making a call with her phone, silently transmitting the data, and disconnecting. Behind the scenes, the OKCrypto scripts will&#8230;</li>
<li>Convert the bytes in /tmp/foo to a series of decimal digits.</li>
<li>Encode the digits as DTMF tones with gen from the multimon package. 1. Increase the pitch (time-independent) to prevent any intermediary systems (esp. Asterisk) from interpreting the tones.</li>
<li>Queue the final audio file for transmission by Asterisk.</li>
</ol>
<p>The recipient will hear his phone ring once before his PC answers the call, records the audio, and disconnects. When the call is complete, Asterisk will invoke one of the OKCrypto scripts to&#8230;</p>
<ol>
<li>Decrease the pitch to yield the original DTMF tones.</li>
<li>Decode the DTMF tones to a series of decimal digits.</li>
<li>Convert the digits to a series of bytes which is written to &#8216;/tmp/bar&#8217;.
<pre class="brush: bash;">$ tr -d '\n' &lt; /tmp/newest_vm.txt | ./int_seq_to_bin.py /tmp/bar [...]
$ cksum /tmp/bar 668417501 16 /tmp/bar</pre>
</li>
</ol>
<span id="Encryption"><h3>Encryption</h3></span>
<p>Now that we can reliably send data, let&#8217;s make sure that it&#8217;s encrypted first. This turns out to be one of the simplest components of the system &#8211; many good crypto APIs are available.</p>
<p>I use <a href="http://www.gnupg.org/">GnuPG</a>:</p>
<pre class="brush: bash;">$ gpg --symmetric --force-mdc --cipher-algo AES256 filetoencrypt </pre>
<p>The `&#8211;force-mdc` option provides integrity checking &#8211; useful for handling transmission errors. Consider these GPG options carefully and make sure they fit your requirements.</p>
<span id="Further_work"><h3>Further work</h3></span>
<p>Here are a few ideas we&#8217;re pursuing for the future of this project:</p>
<ul>
<li>Moving the modem code to the cell phone. This would simplify the setup but potentially risk security.</li>
<li>Improving modem error rate. Data is often erroneously duplicated during transmission.</li>
<li>Increasing the modem throughput. The current code averages a meager 10 bytes/second.</li>
<li>Hiding the data within a steganographic channel in a normal voice conversation.</li>
<li>Incorporating GPG into the OKCrypto scripts.</li>
<li>Packaging the system as a LiveCD/Live flash drive.</li>
<li>Implementing key exchange.</li>
<li>Building an embedded device dedicated to OKCrypto.</li>
</ul>
<span id="What_I_learned"><h3>What I learned</h3></span>
<p>I gained experience in the follow areas during the design, implementation. and testing:</p>
<ul>
<li>GSM, CDMA crypto. I suspect the cellular phone industry would make a great case study in protocol security by obscurity.</li>
<li>Cellular voice codecs used by large carriers. Trivia: your calls only require ~10kbps.<sup>5</sup></li>
<li>Bluetooth HFP specification and available implementations.</li>
<li>Debugging latency tolerances in virtual machine USB &#8220;passthrough&#8221; subsystems.</li>
<li>The <a href="http://www.twilio.com/">Twilio</a> telephony API. I used Twilio when I only had one cell phone to debug with.</li>
<li>Asterisk administration.</li>
</ul>
<span id="Conclusion__Download"><h3>Conclusion / Download</h3></span>
<p>I&#8217;ve described a method to securely transmit data over any of the widely-available cell voice networks. The implementation requires only commodity hardware, open-source software, and minimal setup.</p>
<p>Be aware that transmitting data by &#8220;automated means&#8221; may violate the terms of your cellular service contract. I disclaim all liability. This information is provided for educational purposes only.</p>
<p>You can download the OKCrypto system here: http://www.unsyncopated.com/corral/okcrypto_v0.1.tar.gz</p>
<p>It is licensed under the LGPL.</p>
<span id="Further_reading"><h3>Further reading</h3></span>
<ul>
<li>You&#8217;ll find lots of links to cell security architecture articles, Bluetooth HFP implementations, and Asterisk administration web pages on the wiki at <a href="http://www.unsyncopated.com/wiki/Crypto%20Phone/Stacked%20Linux-based%20CPhone%20Brainstorming">Crypto Phone/Stacked Linux-based CPhone Brainstorming</a></li>
</ul>
<p>Update 1/13/09 - Check out some technical notes on our recent progress with a faster and more reliable modem: <a href="https://www.unsyncopated.com/wiki/OKCrypto/Progress%20Report%20for%2001-09-2010">OKCrypto/Progress Report for 01-09-2010</a></p>
</div>
<ol class="footnotes">
<li id="footnote_0_317" class="footnote"><a href="http://spectrum.ieee.org/telecom/wireless/open-source-effort-to-hack-gsm">Open-Source Effort to Hack GSM</a> John Blau &#8211; IEEE Spectrum Magazine &#8211; December 2009 issue</li>
<li id="footnote_1_317" class="footnote"><a href="https://har2009.org/program/attachments/119_GSM.A51.Cracking.Nohl.pdf">Subverting the security base of GSM</a> Karsten Nohl &#8211; Hacking at Random &#8211; 8/15/2009</li>
<li id="footnote_2_317" class="footnote"><a href="http://www.bluetooth.com/Bluetooth/Technology/Works/HFP.htm">Bluetooth Hands-Free Profile (HFP) 1.5</a> &#8211; Bluetooth Special Interest Group &#8211; 11/25/2005</li>
<li id="footnote_3_317" class="footnote"><a href="https://bugs.maemo.org/show_bug.cgi?id=2754#c1">Comment #1 on Maemo bug #2754</a> &#8211; Johan Hedberg &#8211; 1/25/2009</li>
<li id="footnote_4_317" class="footnote"><a href="http://en.wikipedia.org/w/index.php?title=Adaptive_Multi-Rate_audio_codec&amp;oldid=327719647">Adaptive Multi-Rate audio codec</a> &#8211; Wikipedia &#8211; 11/24/2009</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://unsyncopated.com/blog/index.php/2009/11/19/sending-data-via-cellular-voice-connections-with-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a local mirror of Ubuntu&#8217;s most popular packages</title>
		<link>http://unsyncopated.com/blog/index.php/2009/11/04/creating-a-local-mirror-of-ubuntus-most-popular-packages/</link>
		<comments>http://unsyncopated.com/blog/index.php/2009/11/04/creating-a-local-mirror-of-ubuntus-most-popular-packages/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 22:25:55 +0000</pubDate>
		<dc:creator>Tyler</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Syntax highlighter]]></category>
		<category><![CDATA[Table of Contents]]></category>

		<guid isPermaLink="false">http://unsyncopated.com/blog/index.php/2009/11/04/creating-a-local-mirror-of-ubuntus-most-popular-packages/</guid>
		<description><![CDATA[The problem
You want to create local mirrors of the apt repositories that you use but you don&#8217;t have enough hard drive space to mirror every package. Or maybe you have a slow link and you don&#8217;t want to spend time downloading packages that you&#8217;re unlikely to need.
The solution
Only mirror packages whose popularity (as reported by [...]]]></description>
			<content:encoded><![CDATA[<span id="The_problem"><h3>The problem</h3></span>
<p>You want to create local mirrors of the apt repositories that you use but you don&#8217;t have enough hard drive space to mirror every package. Or maybe you have a slow link and you don&#8217;t want to spend time downloading packages that you&#8217;re unlikely to need.</p>
<span id="The_solution"><h3>The solution</h3></span>
<p>Only mirror packages whose popularity (as reported by popcon&#8217;s &#8220;installed&#8221; metric) matches a certain threshold.</p>
<span id="The_explanation"><h3>The explanation</h3></span>
<p>I&#8217;ve been hacking without a network connection recently and one of the biggest pain points is not having access to my distro&#8217;s software package repository.</p>
<p>For example, while writing some Python screen-scraping code last week I realized I didn&#8217;t have the Python library I wanted to parse some HTML with &#8211; <a href="http://www.crummy.com/software/BeautifulSoup/">Beautiful Soup</a>. Rather than postpone my work on the script until I found a weefee signal, it would have been nice to simply install the package from a local mirror of the repository.</p>
<p>I soon discovered two common tools that can be used to create a local mirror of a repository &#8211; Frans Pop&#8217;s <a href="http://alioth.debian.org/~fjp/log/posts.html">debmirror</a> and Dmitriy Khramtsov&#8217;s <a href="http://apt-mirror.sourceforge.net/">apt-mirror</a>.</p>
<p>I chose apt-mirror, skimmed <a href="http://popey.com/blog/2006/10/24/Creating_an_Ubuntu_repository_mirror_with_apt-mirror/">Alan Pope&#8217;s handy step-by-step guide</a> and kicked off the mirror script&#8230;</p>
<pre class="brush: bash;">
$ sudo -u apt-mirror apt-mirror

[...]
52.7 GiB will be downloaded into archive.
Downloading 75 archive files using 10 threads...
</pre>
<p>ACK! That&#8217;s a lot of gibibytes.</p>
<p>Eventually I&#8217;d like a complete mirror, but for now, I only want the packages I&#8217;m likely to need. <a href="http://www.frontier.com">My broadband connection</a> isn&#8217;t as &#8220;broad&#8221; as I would like.</p>
<p>The <a href="http://popcon.debian.org/">Debian Popularity Contest</a> (&#8220;popcon&#8221;) came to mind and sure enough, Ubuntu also provides <a href="http://popcon.ubuntu.com/by_inst">a flat text file</a> containing the names of all packages sorted by the frequency with which they&#8217;re installed by users.</p>
<p>I downloaded this file and hacked up the primary apt-mirror perl script to consult the file, only mirroring binary and source packages if they meet a chosen popularity threshold.</p>
<p>Here&#8217;s the meat from <a href="http://unsyncopated.com/corral/apt-mirror-0.4.5-1ubuntu2_popcon.patch">a patch that applies cleanly to apt-mirror version 0.4.5-1ubuntu2</a>:</p>
<pre class="brush: perl;">

sub should_process {
# print &quot;should_process()\n&quot;;
my $pkg_name = shift;
my $section_name = shift;
my @popular_pkgs = @{ $_[0] };

# if the pkg isn't in the 'game' section...
if($section_name !~ /game/){
my %is_popular;
for (@popular_pkgs) { $is_popular{$_} = 1 };

if( $is_popular{$pkg_name} ) {
# print &quot;processing popular pkg: &quot; . $pkg_name . &quot;\n&quot;;
return 1;
} else {
# print &quot;skipping unpopular pkg: &quot; . $pkg_name . &quot;\n&quot;;
return 0;
}
} else {
# print &quot;skipping game pkg: &quot; . $pkg_name . &quot;\n&quot;;
return 0;
}
}

# [...]

# open our popcon database
my $db_path = &quot;/home/tz/Desktop/by_inst&quot;;
open(FILE,$db_path) or die &quot;Can't open popcon db: $!&quot;;
my @data=; # beware record separator ($/) tweak below
close FILE;
my $num_comment_lines = 11;
my $threshold = 3000;
my $cur_line;
my @popular_pkgs;
# for each of the first $threshold lines, grab pkg name
foreach $cur_line (@data[$num_comment_lines .. ($num_comment_lines + $threshold)]) {
# print &quot;cur_line: $cur_line&quot;;
my @tokens = split / +/, $cur_line;
# print &quot;pkgname: &quot; . $tokens[1] . &quot;\n&quot;;
push( @popular_pkgs, $tokens[1] );
}

# [...]

if( should_process( $lines{&quot;Package:&quot;}, $lines{&quot;Section:&quot;},@popular_pkgs ) ) {
add_url_to_download($uri . &quot;/&quot; . $lines{&quot;Directory:&quot;} . &quot;/&quot; . $file[2], $file[1]);
}
</pre>
<p>Tweak the path to the flat file (`$db_path`) and the threshold (`$threshold`!) to suit your needs.<br />
<!-- echo "As you can see, I also modified the\nscript to skip games. Games tend to be\nlarge and there aren't many that I use\noften, except perhaps cowsay(1) :]" |cowsay -f gnu --></p>
<pre> ________________________________________
/ As you can see, I also modified the    \
| script to skip games. Games tend to be |
| large and there aren't many that I use |
\ often, except perhaps cowsay(1) :]     /
 ----------------------------------------
    \               ,-----._
  .  \         .  ,'        `-.__,------._
 //   \      __\\'                        `-.
((    _____-'___))                           |
 `:='/     (alf_/                            |
 `.=|      |='                               |
    |)   O |                                  \
    |      |                               /\  \
    |     /                          .    /  \  \
    |    .-..__            ___   .--' \  |\   \  |
   |o o  |     ``--.___.  /   `-'      \  \\   \ |
    `--''        '  .' / /             |  | |   | \
                 |  | / /              |  | |   mmm
                 |  ||  |              | /| |
                 ( .' \ \              || | |
                 | |   \ \            // / /
                 | |    \ \          || |_|
                /  |    |_/         /_|
               /__/</pre>
<span id="Future_improvements"><h3>Future improvements</h3></span>
<ul>
<li>Download popcon db file, rather than expect that it already exists on disk.</li>
<li>Read desired popularity threshold from mirror.list rather than using a hard-coded value.</li>
<li>Read desired sections as above.</li>
<li>Speed holes! My perl-fu is weak.</li>
</ul>
<span id="Tips"><h3>Tips</h3></span>
<ul>
<li>I found a faster mirror half-way through creating my local mirror. Renaming `/var/spool/apt-mirror/{mirror,skel}/${OLD_MIRROR` to `/var/spool/apt-mirror/{mirror,skel}/${NEW_MIRROR}` was sufficient.</li>
<li>If you try to install a package from your local mirror which doesn&#8217;t exist, you&#8217;ll get a 404 error &#8211; nothing catastrophic happens.</li>
<li>Beware <a href="http://sourceforge.net/projects/apt-mirror/forums/forum/197335/topic/1747995">permissions issues</a>. Avoid running apt-mirror as root rather than the prescribed `apt-mirror` user.</li>
<li>debmirror has a `&#8211;exclude-deb-section` option</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://unsyncopated.com/blog/index.php/2009/11/04/creating-a-local-mirror-of-ubuntus-most-popular-packages/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Downloading photos from Facebook with Linux</title>
		<link>http://unsyncopated.com/blog/index.php/2009/11/02/downloading-photos-from-facebook-with-linux/</link>
		<comments>http://unsyncopated.com/blog/index.php/2009/11/02/downloading-photos-from-facebook-with-linux/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 02:37:49 +0000</pubDate>
		<dc:creator>Tyler</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Python programming]]></category>
		<category><![CDATA[Syntax highlighter]]></category>

		<guid isPermaLink="false">http://unsyncopated.com/blog/index.php/2009/11/03/downloading-photos-from-facebook-with-linux/</guid>
		<description><![CDATA[Tommy Murphy recently released photograbber, a simple Python/tkinter app that uses the Facebook API to&#8230;
1. Find all the photos that you&#8217;ve been tagged in and&#8230;
2. Download each photo to a chosen directory.
It worked fine for me after I fixed a trivial tkinter bug.
Right now I&#8217;m adapting photograbber to download entire albums for me. Here&#8217;s the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://eat.ourbunny.com/">Tommy Murphy</a> recently released <a href="http://code.google.com/p/photograbber">photograbber</a>, a simple Python/tkinter app that uses the Facebook API to&#8230;</p>
<p>1. Find all the photos that you&#8217;ve been tagged in and&#8230;<br />
2. Download each photo to a chosen directory.</p>
<p>It worked fine for me after I <a href="http://code.google.com/p/photograbber/issues/detail?id=5">fixed a trivial tkinter bug</a>.</p>
<p>Right now I&#8217;m adapting photograbber to download entire albums for me. Here&#8217;s the crucial code that requests a collection of &#8220;photo&#8221; records using <a href="http://wiki.developers.facebook.com/index.php/FQL">Facebook Query Language</a> (FQL):</p>
<pre class="brush: python;">

photos = self.facebook.fql.query(&quot;SELECT pid, aid, src_big FROM &quot; \
&quot;photo WHERE pid IN (SELECT pid FROM photo_tag WHERE subject=&quot; + \
str(self.facebook.uid) + &quot;)&quot;)
</pre>
<p>Changing the query to&#8230;</p>
<pre class="brush: python;">

&quot;SELECT pid, aid, src_big FROM photo WHERE aid IN (SELECT aid &quot; \
&quot;FROM album WHERE owner IN (SELECT uid FROM user WHERE name=\&quot;&quot; + \
FriendName + &quot;\&quot;) AND name=\&quot;&quot; + AlbumName + &quot;\&quot;)&quot;
</pre>
<p>&#8230; did the trick. Caveat coder: the album IDs that you see in your browser while surfing Facebook <em>aren&#8217;t</em> the same IDs that you should use in your FQL queries. If you slip up, you might receive this misleading message: &#8220;FacebookError: Error 600: An unknown error occurred in FQLPhotoTable::get_ids_for_queries:  should never have a pid or aid without a uid&#8221;</p>
<p>Keep <a href="http://www.facebook.com/terms.php">Facebook&#8217;s terms of service</a> in mind when interacting with their site &#8211; you don&#8217;t want a &#8220;cease and desist&#8221; letter like <a href="http://www.vincentcheung.ca/blog/facedown/cease-and-desist/">Vincent Cheung received for his &#8220;FaceDown&#8221; application</a>.</p>
<p>If all else fails, you might have some luck with a PHP script called &#8220;FBCMD&#8221; as illustrated <a href="http://dieter.plaetinck.be/a_script_that_pulls_photos_from_facebook">here</a>.</p>
<p>I&#8217;ll spare you my internet balkanization rant &#8211; Fred Vogelstein made the argument far better in the June issue of Wired: <a href="http://www.wired.com/techbiz/it/magazine/17-07/ff_facebookwall?currentPage=all">Great Wall of Facebook &#8211; The Social Network&#8217;s Plan to Dominate the Internet &#8211; and Keep Google Out</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://unsyncopated.com/blog/index.php/2009/11/02/downloading-photos-from-facebook-with-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
