<?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>A Party to the World &#187; hacks</title>
	<atom:link href="http://dan.lecocq.us/wordpress/category/hacks/feed/" rel="self" type="application/rss+xml" />
	<link>http://dan.lecocq.us/wordpress</link>
	<description>Life, love, and computer science</description>
	<lastBuildDate>Fri, 06 Jan 2012 17:21:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>A Little Challenge (Part 1 of 2)</title>
		<link>http://dan.lecocq.us/wordpress/2009/12/06/a-little-challenge-part-1-of-2/</link>
		<comments>http://dan.lecocq.us/wordpress/2009/12/06/a-little-challenge-part-1-of-2/#comments</comments>
		<pubDate>Sun, 06 Dec 2009 20:09:15 +0000</pubDate>
		<dc:creator>dan.lecocq</dc:creator>
				<category><![CDATA[computer science]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[hobbies]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[challenge]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[puzzle]]></category>

		<guid isPermaLink="false">http://dan.lecocq.us/wordpress/?p=766</guid>
		<description><![CDATA[Several months ago, I was given credentials to download a piece of software, and I needed to download another copy only to find that I had forgotten the password. I anticipated it would take quite a while to email the people in charge, and on a whim I decided to take action. Right click, view [...]]]></description>
			<content:encoded><![CDATA[<p>Several months ago, I was given credentials to download a piece of software, and I needed to download another copy only to find that I had forgotten the password.  I anticipated it would take quite a while to email the people in charge, and on a whim I decided to take action.  Right click, view source.</p>
<p>To my surprise, all the authentication was done in JavaScript, though in all fairness it was &#8220;encrypted.&#8221;  I&#8217;ve changed the underlying keyphrase in a code example, and I pose a small puzzle &#8211; find the password.</p>
<p>You may find <a href="http://www.jconsole.com/">jconsole</a> helpful.<br />
<code><br />
var pass=new Array()<br />
var t3=""<br />
var lim=8<br />
pass[0]="fE13Cw9emtKIg1F"<br />
pass[1]="wKTuZEy387Im8b2"<br />
pass[2]="3NKevEgjpWWwmSE"<br />
pass[3]="CryO6BmP9XpUlke"<br />
pass[4]="8R4Gf2sgs5Xs5KI3"<br />
pass[5]="62GZJ9Dzc2y8lBTU"</p>
<p>var extension=".html"<br />
var enablelocking=0<br />
var numletter="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"<br />
var temp3=''<br />
var cur=0</p>
<p>function max(which){<br />
return (pass[Math.ceil(which)+(3&#038;15)].substring(0,1))<br />
}</p>
<p>function testit(input){<br />
temp=numletter.indexOf(input)<br />
var temp2=temp^parseInt(pass[phase1-1+(1|3)].substring(0,2))<br />
temp2=numletter.substring(temp2,temp2+1)<br />
return (temp2)<br />
}</p>
<p>function submitentry(){<br />
t3=''<br />
verification=document.password1.password2.value<br />
phase1=Math.ceil(Math.random())-6+(2&lt;&lt;2)<br />
var indicate=true<br />
for (i=(1&#038;2);i&lt;window.max(Math.LOG10E);i++)<br />
t3+=testit(verification.charAt(i))<br />
for (i=(1&#038;2);i&lt;lim;i++){<br />
if (t3.charAt(i)!=pass[phase1+Math.round(Math.sin(Math.PI/2)-1)].charAt(i))<br />
indicate=false<br />
}<br />
if (verification.length!=window.max(Math.LOG10E))<br />
indicate=false<br />
if (indicate)<br />
alert("Correct password.")<br />
else<br />
alert("Invalid password. Please try again")<br />
}<br />
</code></p>
<p>You can also get it in a <a href='http://dan.lecocq.us/wordpress/wp-content/uploads/2009/12/authentication.html'>testable html page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://dan.lecocq.us/wordpress/2009/12/06/a-little-challenge-part-1-of-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Growlnotify</title>
		<link>http://dan.lecocq.us/wordpress/2008/04/12/growlnotify/</link>
		<comments>http://dan.lecocq.us/wordpress/2008/04/12/growlnotify/#comments</comments>
		<pubDate>Sun, 13 Apr 2008 03:58:08 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[hacks]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[Growl]]></category>
		<category><![CDATA[growlnotify]]></category>
		<category><![CDATA[ninja magic]]></category>

		<guid isPermaLink="false">http://dan.lecocq.us/wordpress/2008/04/12/growlnotify/</guid>
		<description><![CDATA[If you&#8217;re a Growl user, you probably appreciate (or are annoyed by) being able to get updates from various applications in a relatively out-of-the-way fashion. There is a command line utility included with Growl called growlnotify. It allows you to send up your own alerts from your own code (say using exec(3) or in your [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re a <a href="http://growl.info">Growl</a> user, you probably appreciate (or are annoyed by) being able to get updates from various applications in a relatively out-of-the-way fashion.</p>
<p>There is a command line utility included with Growl called growlnotify.  It allows you to send up your own alerts from your own code (say using exec(3) or in your shell scripts), but it&#8217;s nice to use for other things, too.  If I have a command that&#8217;s conceivably going to take a while, I tack on a &#038;&#038; and growlnotify.  Just like some people use</p>
<p><code>make &#038;&#038; ./myapp</code></p>
<p>when they run their code to ensure it&#8217;s running the latest saved version, it&#8217;s a nice way to get a heads-up instead of waiting a few minutes for that god-awful command to run.  For example, recently I was using curl(1) to get a bunch of files off of a server (when I fall behind on a webcomic, it&#8217;s just easier to download a bunch of them and browse them quickly in Preview instead of clicking through each), and it ended up taking a good 10 minutes:</p>
<p><code>curl http://boasas.com/boasas/[1-940].gif -o "#1.gif" &#038;&#038; growlnotify --message "I'm done downloading" --title "curl"</code></p>
<p>I get back to reading my dailies, and by the time I&#8217;ve forgotten that I set it going, up pops a nice little notification:</p>
<p><a href='http://dan.lecocq.us/wordpress/wp-content/uploads/2008/04/picture-1.png' title='Growlnotify'><img src='http://dan.lecocq.us/wordpress/wp-content/uploads/2008/04/picture-1.thumbnail.png' alt='Growlnotify' /></a></p>
<p>I will note that it can be a little finnicky.  It generally has better success when no title is supplied, and if you&#8217;re going to be running it with &#038;&#038;, I might suggest making it a </p>
<p><code>mycommand &#038;&#038; echo $? &#038;&#038; growlnotify --message "my message" --title "mycommand"</code></p>
<p>Since it gets its message argument from standard in, you can also pipe to it if your command returns a value of which you&#8217;d like to be notified:</p>
<p><code>make ; if [ $? -eq 0 ]; then echo "Success"; else echo "Failure"; fi | growlnotify --title "make"</code></p>
<p><a href='http://dan.lecocq.us/wordpress/wp-content/uploads/2008/04/picture-2.png' title='Growlnotify Make'><img src='http://dan.lecocq.us/wordpress/wp-content/uploads/2008/04/picture-2.thumbnail.png' alt='Growlnotify Make' /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://dan.lecocq.us/wordpress/2008/04/12/growlnotify/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XBMC</title>
		<link>http://dan.lecocq.us/wordpress/2007/09/24/xbmc/</link>
		<comments>http://dan.lecocq.us/wordpress/2007/09/24/xbmc/#comments</comments>
		<pubDate>Tue, 25 Sep 2007 00:18:05 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[hacks]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[toys]]></category>
		<category><![CDATA[XBMC]]></category>
		<category><![CDATA[xbox]]></category>

		<guid isPermaLink="false">http://dan.lecocq.us/wordpress/2007/09/24/xbmc/</guid>
		<description><![CDATA[My XBox is now my gateway to my media. $4.73 for Splinter Cell (how this particular hack gets the Linux installer running), and $21.81 for an Action Replay kit to transfer the files. Now, all the media on the LAN are at the fingertips of my XBox. Music, Pictures, Movies and TV Shows &#8211; the [...]]]></description>
			<content:encoded><![CDATA[<p>My XBox is now my gateway to my media.  $4.73 for Splinter Cell (how this particular hack gets the Linux installer running), and $21.81 for an Action Replay kit to transfer the files. Now, all the media on the LAN are at the fingertips of my XBox.  Music, Pictures, Movies and TV Shows &#8211; the whole gambit.</p>
<p>I used <a href="http://lifehacker.com/software/geek-to-live/transform-your-classic-xbox-into-a-killer-media-center-299809.php">this Lifehacker article</a> as a guideline.  All in all, it took about an hour.</p>
<table>
<tr>
<td>
<a href='http://dan.lecocq.us/wordpress/wp-content/uploads/2007/09/screenshot003.png' title='Watching Scrubs'><img src='http://dan.lecocq.us/wordpress/wp-content/uploads/2007/09/screenshot003.thumbnail.png' alt='Watching Scrubs' /></a>
</td>
<td>
<a href='http://dan.lecocq.us/wordpress/wp-content/uploads/2007/09/screenshot004.png' title='TV Shows'><img src='http://dan.lecocq.us/wordpress/wp-content/uploads/2007/09/screenshot004.thumbnail.png' alt='TV Shows' /></a>
</td>
<td>
<a href='http://dan.lecocq.us/wordpress/wp-content/uploads/2007/09/screenshot006.png' title='Music'><img src='http://dan.lecocq.us/wordpress/wp-content/uploads/2007/09/screenshot006.thumbnail.png' alt='Music' /></a>
</td>
</tr>
<tr>
<td>
<a href='http://dan.lecocq.us/wordpress/wp-content/uploads/2007/09/screenshot008.png' title='Weather / RSS'><img src='http://dan.lecocq.us/wordpress/wp-content/uploads/2007/09/screenshot008.thumbnail.png' alt='Weather / RSS' /></a>
</td>
<td>
<a href='http://dan.lecocq.us/wordpress/wp-content/uploads/2007/09/screenshot009.png' title='Watching A Movie'><img src='http://dan.lecocq.us/wordpress/wp-content/uploads/2007/09/screenshot009.thumbnail.png' alt='Watching A Movie' /></a>
</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://dan.lecocq.us/wordpress/2007/09/24/xbmc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

