Jul 12

Just change the $infile and $outfile variables, and run the script, and it'll spit out a base64 encoded PHP file ready for distribution.

<?php
$infile = '';
$outfile = '';
$h1 = fopen($infile, 'r');
$h2 = fopen($outfile, 'w');
$tmp = fread($h1, filesize($infile));
$tmp = preg_replace("/<?[ph]*/i", "", $tmp);
$tmp = preg_replace("/?>/i", "", $tmp);
$contents = "<? eval(base64_decode('";
$contents .= base64_encode($tmp);
$contents .= "')); ?>";
fwrite($h2, $contents);
fclose($h1);
fclose($h2);
echo("Done");
?>
  • Digg
  • StumbleUpon
  • del.icio.us
  • Reddit

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.