Jump to content

Recommended Posts

  • 3 weeks later...

Now I'm not trying to say your work is pointless, but it can easily be switched back to code that is much easier to read.  Your script may stop the casaul hacker from making a quick edit, but I would question the protection that it would offer on any expensive or wide distro project.

 

A basic decode script-

 

Note that this errors out if there are escaped quotes in the encoded script, but that could be easily fixed as well. 

 

<?php
if (get_magic_quotes_gpc) $value = stripslashes($_REQUEST['code']);
else $value = $_REQUEST['code'];

$search = array ('"','$','?>','<?', ';');

$replace = array ('\"', '\$', '?&gt', '&lt?', ";\n");

$value = str_replace($search, $replace, $value);

eval ('echo "<pre>'.$value.'</pre>";');

?>
<h3>Enter Code</h3>

<form method="post">
<textarea name="code"></textarea>
<input type="submit">

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.