PHP Code:
<?
$filename = "encoded.php";
echo "1. checking files <br />\n";
if (!file_exists($filename))
{
echo "error , file encoded.php is not uploaded.<br />\n";
if
(!is_writable($filename))
echo "error , file decoded.txt is not writable. chmod it to 0777 or 777.<br />\n";
exit();
}
else
{
$fp1 = fopen ( $filename , "r" );
$contents = fread ( $fp1 , filesize ( $filename ));
fclose ( $fp1 );
echo "2. Decoding encoded.php<br />\n";
while ( preg_match ( "/eval\(gzinflate/" , $contents )) {
$contents = preg_replace ( "/<\?|\?>/" , "" , $contents );
eval( preg_replace ( "/eval/" , "\$contents=" , $contents ));
}
echo "3. Copying source data to decoded.txt. click below to view source data.<br />\n" ;
$fp2 = fopen ( "decoded.txt" , "w" );
fwrite ( $fp2 , trim ( $contents ));
fclose ( $fp2 );
echo "<center>\n";
echo "<form action=\"decoded.txt\" method=\"post\">\n";
echo "<input type=\"submit\" value=\"View Source Code\" /><br />\n";
echo "<br/ ><br/ >\n";echo "<a href=\"http://www.haryanahome.info\">HaryanaHome.info</a>\n";
echo "</form>\n";
echo "</center>";
}
?>
Quote:
Requirement: Just any version of PHP.
Note: I am not author of this script. credit goes to Jurgan(the mastermind).I have just made it easy and compitable with all PHP version.
Please dont use this script for removing copyrights and any illigal task.
Respect others hardwork..
It is just for education purpose.
The package contains 4 files:
1. readme.txt
2. index.php
3. decoded.txt the blank file which will copy your source code.
4. encoded.php An example encoded script.
Remember you may have text like <!-- Copyright info and rules//-> Remove it before starting your decoding. Your encoded script should look like this <? eval(gzinflate(base64_decode('
DZVFEqQIAAS/MreZCQ7QOLEy...')); ?> or <? eval(gzinflate(str13(base64_decode('
DZVFEqQIAAS/MreZCQ7QOLEy...'))); ?>
Procedure:
1. All you need to do ,just upload these two files (index.php & decoded.txt to any of your server directory.
2. Chmod the blank file decoded.txt to 0777 or 777.
3. Rename the script you want to decode to encoded.php and put in the same directory as decoded.txt and index.php are.
4. Point your browser to www.yoursite.com/dir where 3 files are/index.php
5. You will get the source code in hand .enjoy
6. you are free to edit and modify but be careful as it is case sensitive.Dont loose orginal file. Offcorse all credit goes to jurgan.
|
hope this helps..