<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.0.5" -->
<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/"
	>

<channel>
	<title>Stuff</title>
	<link>http://www.jamesshannon.com/wp</link>
	<description></description>
	<pubDate>Sun, 17 Dec 2006 05:16:00 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.5</generator>
	<language>en</language>
			<item>
		<title>Alternating row colors and adding hover with javascript</title>
		<link>http://www.jamesshannon.com/wp/2006/12/16/alternating-row-colors-and-adding-hover-with-javascript/</link>
		<comments>http://www.jamesshannon.com/wp/2006/12/16/alternating-row-colors-and-adding-hover-with-javascript/#comments</comments>
		<pubDate>Sun, 17 Dec 2006 05:14:07 +0000</pubDate>
		<dc:creator>james</dc:creator>
		
		<category>kb</category>

		<category>js</category>

		<guid isPermaLink="false">http://www.jamesshannon.com/wp/2006/12/16/alternating-row-colors-and-adding-hover-with-javascript/</guid>
		<description><![CDATA[Keeping in my do-it-all-with-javascript theme, here's something else I created in order to keep the javascript completely separate from the HTML from the more javascript stuff.
It was originally created for the purposes of adding the hover onmouseover, but I also decided to add the alternating row color at the same time.
To be completely anal, I'll [...]]]></description>
			<content:encoded><![CDATA[<p>Keeping in my do-it-all-with-javascript theme, here's something else I created in order to keep the javascript completely separate from the HTML from the more javascript stuff.</p>
<p>It was originally created for the purposes of adding the hover onmouseover, but I also decided to add the alternating row color at the same time.</p>
<p>To be completely anal, I'll note that the hover is something that should be done with javascript (it pretty much has to be done in javascript anyways, and it's less part of the presentation than an action), while the alternating colors should be purely CSS.</p>
<p>However, this makes page creation easier. I also remember having some problems with reading the background color style from the row object, so this makes it easy.<br />
<a id="more-6"></a><br />
It uses behaviour.</p>
<div class="igBar"><span id="ljavascript-2"><a href="#" onclick="javascript:showPlainTxt('javascript-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JavaScript:</span>
<div id="javascript-2">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">function</span> init_hoverclick_list <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #003366; font-weight: bold;">var</span> initList = <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #3366CC;">'tr.hoverclick'</span> : </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #66cc66;">&#40;</span>el<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; el.<span style="color: #006600;">list_mod</span> = list_iterate++ % <span style="color: #CC0000;color:#800000;">2</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; el.<span style="color: #006600;">style</span>.<span style="color: #006600;">background</span> = list_colors<span style="color: #66cc66;">&#91;</span>el.<span style="color: #006600;">list_mod</span><span style="color: #66cc66;">&#93;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; el.<span style="color: #006600;">onclick</span> = <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; url = document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">id</span> + <span style="color: #3366CC;">':url'</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">innerHTML</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; location.<span style="color: #006600;">href</span> = url;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; el.<span style="color: #006600;">onmouseover</span> = <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">style</span>.<span style="color: #006600;">background</span> = list_hover_color;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; el.<span style="color: #006600;">onmouseout</span> = <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">style</span>.<span style="color: #006600;">background</span> = list_colors<span style="color: #66cc66;">&#91;</span>el.<span style="color: #006600;">list_mod</span><span style="color: #66cc66;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #66cc66;">&#125;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; Behaviour.<span style="color: #006600;">register</span><span style="color: #66cc66;">&#40;</span>initList<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; Behaviour.<span style="color: #006600;">apply</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamesshannon.com/wp/2006/12/16/alternating-row-colors-and-adding-hover-with-javascript/feed/</wfw:commentRss>
		</item>
		<item>
		<title>automatic, more semantic image hovering</title>
		<link>http://www.jamesshannon.com/wp/2006/12/13/automatic-more-semantic-image-hovering/</link>
		<comments>http://www.jamesshannon.com/wp/2006/12/13/automatic-more-semantic-image-hovering/#comments</comments>
		<pubDate>Thu, 14 Dec 2006 03:13:01 +0000</pubDate>
		<dc:creator>james</dc:creator>
		
		<category>kb</category>

		<category>js</category>

		<guid isPermaLink="false">http://www.jamesshannon.com/wp/2006/12/13/automatic-more-semantic-image-hovering/</guid>
		<description><![CDATA[I can't stand editing pages with those hard-coded, god-forsaken [img onmouseout="MM_replace(...);" onmouseover="MM_Replace(...)" ... ] tags. I don't mind throwing a little javascript into the midst of my HTML document, but that's just excessive, and entirely too static, too. Making an image hover should not be that difficult.
So I came up with this quick hack that [...]]]></description>
			<content:encoded><![CDATA[<p>I can't stand editing pages with those hard-coded, god-forsaken [img onmouseout="MM_replace(...);" onmouseover="MM_Replace(...)" ... ] tags. I don't mind throwing a little javascript into the midst of my HTML document, but that's just excessive, and entirely too static, too. Making an image hover should not be that difficult.</p>
<p>So I came up with this quick hack that should probably be fleshed out a lot more. Basically, you set up the image as you normally would, but give it a special class and a sort-of special name. Once the page is loaded, javascript looks through for all images with that class, uses the .src to figure out the name of the hovered version, preloads it (for caching), and attaches the requisite onmouseover and onmouseout events.</p>
<p><a id="more-5"></a></p>
<p>This uses <a href="http://bennolan.com/behaviour/">behaviour</a>, though there are a number of other, similar methods of getting the img tags that have a particular class names.</p>
<div class="igBar"><span id="ljavascript-4"><a href="#" onclick="javascript:showPlainTxt('javascript-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JavaScript:</span>
<div id="javascript-4">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">var</span> preload_array = Array<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> initList = <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #3366CC;">'img.hover'</span> : <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #66cc66;">&#40;</span>el<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; preload_array<span style="color: #66cc66;">&#91;</span>preload_array.<span style="color: #006600;">length</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #003366; font-weight: bold;">new</span> Image<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; preload_array<span style="color: #66cc66;">&#91;</span>preload_array.<span style="color: #006600;">length</span> - <span style="color: #CC0000;color:#800000;">1</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">src</span> = el.<span style="color: #006600;">src</span>.<span style="color: #006600;">replace</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066FF;">/up/</span>, <span style="color: #3366CC;">'dn'</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; el.<span style="color: #006600;">onmouseover</span> = <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">src</span> = <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">src</span>.<span style="color: #006600;">replace</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066FF;">/up/</span>, <span style="color: #3366CC;">'dn'</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; el.<span style="color: #006600;">onmouseout</span> = <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">src</span> = <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">src</span>.<span style="color: #006600;">replace</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066FF;">/dn/</span>, <span style="color: #3366CC;">'up'</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; Behaviour.<span style="color: #006600;">register</span><span style="color: #66cc66;">&#40;</span>initList<span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamesshannon.com/wp/2006/12/13/automatic-more-semantic-image-hovering/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Decrypt (crack) Encrypted disk image (dmg) files</title>
		<link>http://www.jamesshannon.com/wp/2006/12/13/decrypt-crack-encrypted-disk-image-dmg-files/</link>
		<comments>http://www.jamesshannon.com/wp/2006/12/13/decrypt-crack-encrypted-disk-image-dmg-files/#comments</comments>
		<pubDate>Wed, 13 Dec 2006 22:07:40 +0000</pubDate>
		<dc:creator>james</dc:creator>
		
		<category>kb</category>

		<category>mac</category>

		<category>perl</category>

		<guid isPermaLink="false">http://www.jamesshannon.com/wp/2006/12/13/decrypt-crack-encrypted-disk-image-dmg-files/</guid>
		<description><![CDATA[I set myself up with encrypted sparseimage file a few weeks ago (as an alternative to filevault). Because this was supposed to be super-secure, I created a brand new password based marginally upon my standard password. I subsequently forgot this new password. 
I was lucky, though, because I remembered what I would have done to [...]]]></description>
			<content:encoded><![CDATA[<p>I set myself up with encrypted sparseimage file a few weeks ago (as an alternative to filevault). Because this was supposed to be super-secure, I created a brand new password based marginally upon my standard password. I subsequently forgot this new password. </p>
<p>I was lucky, though, because I remembered what I would have done to this password (preface, postfix, letters -> numbers, etc). It ended up being few enough permutations to be reasonable but too many to try manually.</p>
<p>Basically, I just set up some arrays for the positions which may differ. I loop through these arrays, concatenate together a password, and try it. Everything is written to the terminal, so you just look for the entry with the very obvious success message.</p>
<p>If you're in a similar situation, you can modify the following script to crack your dmg file.</p>
<p><a id="more-4"></a><br />
This perl code assumes that your default password is 'hello', and that you might preface or postfix it with nothing, 3, or #, and that the l's might become L's, 1's, or !'s.</p>
<p><code>
<pre>
<div class="igBar"><span id="lperl-6"><a href="#" onclick="javascript:showPlainTxt('perl-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PERL:</span>
<div id="perl-6">
<div class="perl">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">#! /usr/bin/perl -w</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">@preface_num</span> = <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">''</span>, <span style="color: #ff0000;">'3'</span>, <span style="color: #ff0000;">'#'</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">@first_l</span> = <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'l'</span>, <span style="color: #ff0000;">'L'</span>, <span style="color: #ff0000;">'1'</span>, <span style="color: #ff0000;">'!'</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">@second_l</span> = <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'l'</span>, <span style="color: #ff0000;">'L'</span>, <span style="color: #ff0000;">'1'</span>, <span style="color: #ff0000;">'!'</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">@postfix_num</span> = <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">''</span>, <span style="color: #ff0000;">'4'</span>, <span style="color: #ff0000;">'$'</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">foreach</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">@preface_num</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$first</span> = <span style="color: #0000ff;">$_</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #b1b100;">foreach</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">@first_l</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$second</span> = <span style="color: #0000ff;">$_</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">foreach</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">@second_l</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$third</span> = <span style="color: #0000ff;">$_</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">foreach</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">@postfix_num</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$fourth</span> = <span style="color: #0000ff;">$_</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$password</span> = <span style="color: #0000ff;">$first</span> . <span style="color: #ff0000;">'he'</span> . <span style="color: #0000ff;">$second</span> . <span style="color: #0000ff;">$third</span> . <span style="color: #ff0000;">'o'</span> . <span style="color: #0000ff;">$fourth</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$cmd</span> = <span style="color: #ff0000;">"echo -n '$password' | hdiutil mount /Path/To/Image/secure.sparseimage -stdinpass"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.perldoc.com/perl5.6/pod/func/print.html"><span style="color: #000066;">print</span></a> <span style="color: #ff0000;">"Trying $cmd ...<span style="color: #000099; font-weight: bold;">\</span>n"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.perldoc.com/perl5.6/pod/func/system.html"><span style="color: #000066;">system</span></a> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$cmd</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>

</pre>
<p></code></p>
<p>This was good enough for me, though it would be a lot better if stderr were redirected to null, the return code was tested, and it only printed the successful password.
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamesshannon.com/wp/2006/12/13/decrypt-crack-encrypted-disk-image-dmg-files/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Introduction</title>
		<link>http://www.jamesshannon.com/wp/2006/12/13/introduction/</link>
		<comments>http://www.jamesshannon.com/wp/2006/12/13/introduction/#comments</comments>
		<pubDate>Wed, 13 Dec 2006 22:04:54 +0000</pubDate>
		<dc:creator>james</dc:creator>
		
		<category>Uncategorized</category>

		<guid isPermaLink="false">http://www.jamesshannon.com/wp/2006/12/13/introduction/</guid>
		<description><![CDATA[I resisted for as long as possible.
However, this blog is different... really. This isn't borne from a need to rant, but a need to share (see). Specifically (at least for now), it's code snippets and the like from my development exercises.

]]></description>
			<content:encoded><![CDATA[<p>I resisted for as long as possible.</p>
<p>However, this blog is different... really. This isn't borne from a need to rant, but a need to share (see). Specifically (at least for now), it's code snippets and the like from my development exercises.
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamesshannon.com/wp/2006/12/13/introduction/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.458 seconds -->
