Today, let's take a closer look at the deep-seated concepts of the PHP language.
Special Note: This PHP eval encryption decryption program seems to have to be used on the PHP5,
I tested the encryption code in eval (Gzinflate (Base64_decode ("Codes")) on PHP4 and never decrypted properly.
Here is the code for PHP eval encryption hack:
- < ? PHP
- /*
- Taken from http://www.php.net/manual/
de/function.eval.php#59862
- 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 Shell do CHMOD 0666 decoded.txt)
- 4. Execute This script (visit decrypt.php in
A Web browser or do php decrypt.php in the shell)
- 5. Open Decoded.txt, the PHP should be decrypted
If not post the code on Http://www.ariadoss.
Com/forums/web-development/lamp
- Gzinflate Execute PHP Eval encryption code decryption method translated into Chinese after the text
(This paragraph is not in the original file.)
- 1. Save this 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 (must put decoded.
The TXT permission is set to Chmod 0666, which is what can be written. Of course, you can
Do not create a file file. As long as the folder has write permissions, the script automatically creates a
A document named Decoded.txt.)
- 4. Run the PHP eval Cryptographic decryption script (the browser runs decrypt.php to access http:
Your domain/storage directory/decrypt.php)
- 5. Open Decoded.txt, the code should have been decrypted to complete, if an error occurred, please
Send the code to http://www.ariadoss.com/forums/web-
Development/lamp
- */
- echo "Ndecode nested eval (gzinflate ()) by Debo
Jurgen <Mailto:jurgen@person. Benn ";
- echo "1. Reading Coded.txtn ";
- $ FP1 = 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 ";
$fp2 = 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 file name can be set by itself.
Create a coded.txt in the same directory in this file, with PHP eval encrypted code, which is the codes of eval (Gzinflate (Base64_decode ("Codes"));
Again, the point is to decrypt the gzinflate (Base64_decode ("Codes")). Executes the saved file decrypt.php, which generates a Decoded.txt txt document in the same directory To open the document. Inside is the original code for PHP eval encryption.
http://www.bkjia.com/PHPjc/445972.html www.bkjia.com true http://www.bkjia.com/PHPjc/445972.html techarticle today, let's take a closer look at the deep-seated concepts of the PHP language. Special Note: This PHP eval encryption decryption program seems to have to be used above the PHP5, I test the PHP4 above eval (Gzinflat ...