Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Community Cafe (http://www.bvlist.com/forumdisplay.php?f=18)
-   -   Decoding Base64 (http://www.bvlist.com/showthread.php?t=598)

Fynnon 11th July 2008 01:13

Decoding Base64
 
1 Attachment(s)
Don`t know if it works, it didn`t for me but doesn`t hurt to try :whistle:


PART 1:

Note: This tutorial is just to educate you. Dont use my scripts to remove copyrights or illigal tasks.
If you are a true learner respect other's hardworks.

Description:
eval is a function to encryp or decrypt a files and used to protect files to be viewed. As we are in PHP segment lets discuss the most common encoding functions in PHP as below:
  • eval(gzinflate(base64_decode([/*:m:2qhny8dl]
  • eval(gzinflate(str_rot13(base64_decode([/*:m:2qhny8dl]
  • eval(gzinflate(base64_decode(base64_decode(str_rot 13([/*:m:2qhny8dl]
  • eval(gzinflate(base64_decode(str_rot13([/*:m:2qhny8dl]

Lets go one by one to explore these..
eval_str13_base64_decoder:
I made this script which is capable of decoding eval_str13_base64 in fews seconds..

Code:

$filename = "encoded.php";
echo  "1. checking files
\n";
if (!file_exists($filename))
{
echo "error , file encoded.php is not uploaded.
\n";

if
(!is_writable($filename))
echo "error , file decoded.txt is not writable. chmod it to 0777 or 777.
\n";
exit();
}
else
{
$fp1  =  fopen  ( $filename ,  "r" );
$contents  =  fread  ( $fp1 ,  filesize ( $filename ));
fclose ( $fp1 );
echo  "2. Decoding encoded.php
\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.
\n" ;
$fp2  =  fopen ( "decoded.txt" , "w" );
fwrite ( $fp2 ,  trim ( $contents ));
fclose ( $fp2 );
echo "
\n";
echo "
\n";
echo "
\n";
echo "

\n";echo "HaryanaHome.info\n";
echo "
\n";
echo "
";
}
?>

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
All times are GMT +2. The time now is 23:25.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.