Codice:
/*
PHP CODE PACKER AND OBFUSCATOR BY BrainStorm
Istructions:
1. Save this snippet as encrypt.php
2. Save PHP code (without <?php and ?> tag) in decoded.txt
3. Execute this script (visit encrypt.php in a web browser or do php encrypt.php in the shell)
4. Open decoded.php, (visit encoded.php in a web browser or do php encoded.php in the shell)
*/
echo "\n<h1>PHP Code Packer and Obfuscator by BrainStorm <[email protected]></h1><br>\n";
$fp1 = fopen ("decoded.txt", "r");
$contents = fread ($fp1, filesize ("decoded.txt"));
fclose($fp1);
$fp2 = fopen("encoded.php","w");
fwrite($fp2, "<?php \r\n");
fwrite($fp2, 'eval(gzinflate(base64_decode(str_replace("\\n",\'\',\'');
fwrite($fp2, chunk_split(base64_encode(gzdeflate(trim($contents), 9)), 80, "\r\n"));
fwrite($fp2, "'))));\r\n");
fwrite($fp2, "?>");
fclose($fp2);
echo "<br><h1>File encoded.php creato con successo!!!</h1>\n";
?>
Commenti o domande sono ben accetti.