PHP tutorial based on Eval N-layer encryption Gzinflate str_rot13 base64 hack method
PHP uses eval (gzinflate (str_rot13 (' Base64_decode (' BASE64 encrypted content '))) to decrypt the core code
The following non-extensible method of PHP Encryption:
There's an online one, and it's good. Trojan anti-killing is OK, to protect the code can not be.
Corresponding wrote a simple decryption,
specifically for Eval. This principle is very useful.
Special Note: This decryption program seems to have to be used above the PHP5,
I tested the Gzinflate (str_rot13 (' BASE64-encrypted content ')) encrypted code above PHP4 to never decrypt properly.
File contents that have been encrypted
$a = "eval (gzinflate (str_rot13 (Base64_decode (' Put BASE64 Code ')));";
function decodephp ($a) {
$max _level=300; Maximum number of layers
for ($i =0; $i < $max _level; $i + +) {
Ob_start ();
Eval (str_replace (' eval ', ' echo ', $a));
$a = Ob_get_clean ();
if (Strpos ($a, ' eval (gzinflate (str_rot13 (Base64_decode ') ===false) {
return $a;
}
}
}
echo decodephp ($a);
?>
PHP uses n-layer encryption eval (gzinflate (Base64_decode ("Codes")) to crack
First of all, this is not my original, I turned from a foreign blog above. I tested it. I think it's very useful.
If you want to see PHP using eval (gzinflate (str_rot13 (' BASE64 encrypted content ')) core code decryption, please see here: PHP using eval (gzinflate (str_ ROT13 (Base64_decode (' BASE64 encrypted content ')))) The decryption of the core code.
Special Note: This decryption program seems to have to be used above the PHP5,
I tested the encryption code in eval (Gzinflate (Base64_decode ("Codes")) on PHP4 and never decrypted properly.
Here's the code:
/*
Taken from [Url]http://www.php.net/manual/de/function.eval.php#59862[/url]
Directions:
1. Save this snippet as decrypt.php
2. Save encoded PHP code in Coded.txt
3. Create a blank file called Decoded.txt (from the shell do CHMOD 0666 decoded.txt)
4. Execute This script (visit decrypt.php in a Web browser or does PHP decrypt.php in the shell)
5. Open Decoded.txt, the PHP should is decrypted if not post the code on [URL]HTTP://WWW.ARIADOSS.COM/FORUMS/WEB-DEVELOPME Nt/lamp[/url]
Gzinflate The decryption method that performs the encryption code is translated into Chinese text (this paragraph is not in the original file.)
1. Save the entire script as decrypt.php
2. Save the code that needs to be decrypted as Coded.txt and decrypt.php in the same directory.
3. Create a blank file named Decoded.txt (the Decoded.txt permission must be set to chmod 0666, which can be written. Of course, you can not create a file file. As long as the folder has Write permission, The script automatically creates a document named Decoded.txt.)
4. Run the decryption script (the browser runs decrypt.php to access http:/your domain name/directory/decrypt.php)
5. Open Decoded.txt, The code should already be decrypted, and if an error occurs, send the code to [Url]http://www.ariadoss.com/forums/web-development/lamp[/url]
*/
Echo "Ndecode Nested eval (gzinflate ()) by Debo Jurgen echo" 1. Reading Coded.txtn ";
$fp 1 = fopen ("Coded.txt", "R");
$contents = fread ($fp 1, filesize ("Coded.txt"));
Fclose ($fp 1);
echo "2. DECODINGN ";
while (Preg_match ("/eval (gzinflate/", $contents)) {
$contents =preg_replace ("/!--? |?-->/", "", $contents); Eval (preg_replace ("/eval/", "$contents =", $contents)); } echo "3. Writing Decoded.txtn "; $FP 2 = fopen ("Decoded.txt", "w"); Fwrite ($fp 2, Trim ($contents)); Fclose ($fp 2);
?
The simplest way to say Gzinflate,eval (Gzinflate (Base64_decode ("Codes")) is to use;d ecoding-eval-gzinflate-base64_decode.
Save the above program file decrypt.php,
Of course the filename can be set by itself.
Create a coded.txt in the same directory in this file,
This contains the encrypted code, which is the codes in eval (gzinflate ("Codes"));
Again, the point is to decrypt the gzinflate (Base64_decode ("Codes")) that is executed inside the secret text.
Executes the saved file decrypt.php, which generates a Decoded.txt txt document in the same directory,
Open this document. Inside are the original code that is encrypted.
http://www.bkjia.com/PHPjc/629706.html www.bkjia.com true http://www.bkjia.com/PHPjc/629706.html techarticle PHP tutorial based on Eval N-layer encryption Gzinflate str_rot13 base64 hack method PHP uses eval (gzinflate (str_rot13 (Base64_decode (post-encrypted content))) Decryption of core code under non-extensible ...