<html>
<head><title>Decrypt gzinflate(str_rot13(base64_decode(STRINGS)))</title></head>
<body>
<?php
if(isset($_POST['submit'])) {
$count = 0;
if($_POST['type'] == '1')
$haystack = @htmlentities(gzinflate(str_rot13(base64_decode($_POST['string']))),ENT_NOQUOTES);
elseif($_POST['type'] == '2')
$haystack = @htmlentities(gzinflate(base64_decode($_POST['string'])),ENT_NOQUOTES);
else $end = 'finished';
while($end != 'finished') {
$pos_1 = stripos($haystack,'eval(gzinflate(str_rot13(base64_decode(');
$pos_2 = stripos($haystack,'eval(gzinflate(base64_decode(');
if($pos_1) { // code has eval(gzinflate(str_rot13(base64_decode(
$start = $pos_1 + 40;
$end = stripos($haystack,'))))') - 1;
$length = $end - $start;
$code = substr($haystack,$start,$length);
$haystack = @htmlentities(gzinflate(str_rot13(base64_decode($code))),ENT_NOQUOTES);
++$count;
}
elseif($pos_2) { // code has eval(gzinflate(base64_decode(
$start = $pos_2 + 30;
$end = stripos($haystack,')))') - 1;
$length = $end - $start;
$code = substr($haystack,$start,$length);
$haystack = @htmlentities(gzinflate(base64_decode($code)),ENT_NOQUOTES);
++$count;
}
else { // no encoding string is present
if($count > 0) { // decrypted at least once, show source
echo "<center><strong><u>SOURCE CODE:</u></strong><br /><br />\n<textarea rows='30' cols='70' onclick='this.focus();this.select();'>\n" . $haystack . "</textarea>\n<br /><br /><em>{$count} iterations</em></center><br /><br /><hr style='width:700px;'>\n";
}
$end = 'finished';
}
} // end while loop
} // end if statement
?>
<br /><center>Simple PHP script to decrypt strings encoded with nested
<br />
<code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 119, 0);">eval(</span><span style="color: rgb(0, 0, 187);">gzinflate</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">str_rot13</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">base64_decode</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">'STRING'</span><span style="color: rgb(0, 119, 0);">))));</span></span></code>
<br />and
<code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 119, 0);">eval(</span><span style="color: rgb(0, 0, 187);">gzinflate</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">base64_decode</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">'STRING'</span><span style="color: rgb(0, 119, 0);">)));</span></span></code>
<br /><br />
<form method='post'>
<textarea name='string' rows='30' cols='70' onclick='this.focus();this.select();'><?php
if(isset($_POST['submit']) && $count > 0) echo $_POST['string'];
elseif(isset($_POST['submit']) && $count == 0) echo "Your string doesn't appear to be encoded using eval(gzinflate(str_rot13(base64_decode('STRING')))) \nor eval(gzinflate(base64_decode('STRING'))) \n\nmaybe you put it in wrong?";
else echo "Paste ONLY the encoded string here \nno apostrophes or eval(gzinflate(base64_decode('blah blah')) stuff!";
?></textarea><br /><br />
Type: <select name="type">
<option value="1" <?php if($_POST['type'] == '1') echo "selected='selected'"; ?>>eval(gzinflate(str_rot13(base64_decode('STRING'))))</option>
<option value="2" <?php if($_POST['type'] == '2') echo "selected='selected'"; ?>>eval(gzinflate(base64_decode('STRING')))</option>
</select><br /><br />
<input type='submit' value='Decrypt This Shit Please!' name='submit' />
</form>
<br /><a href='http://josh.thespiffylife.com/decrypt-source.php' target='_blank'>Source Code</a>
<br />Courtesy of <a href='http://josh.thespiffylife.com'>Joshua Clayton</a> & <a href='http://thespiffylife.com/'>TheSpiffyLife.com</a>
</body>
</html>