我们为大家介绍的PHP eval加密的破解方法需要在PHP5上面使用。在文中给出了详细的破解步骤,仅供学习者参考学习。

今天我们来深入的了解一下PHP语言的深层次概念。PHP eval加密的相关破解方法是一个比较复杂的步骤,希望通过本文介绍的内容大家能初步了解这一知识的概念。#t#

PHP eval加密的破解方法(php eval 解密)  eval加密 第1张

特别说明:此PHP eval加密解密程序好像一定得在PHP5上面使用,

我在PHP4上面测试eval(gzinflate(base64_decode("codes")))内加密的代码始终无法正常解密

以下是PHP eval加密破解的代码:

  1. <?PHP
  2. /*
  3. Takenfromhttp://www.php.net/manual/
    de/function.eval.php#59862
  4. Directions:
  5. 1.Savethissnippetasdecrypt.php
  6. 2.SaveencodedPHPcodeincoded.txt
  7. 3.Createablankfilecalleddecoded.txt
    (fromshelldoCHMOD0666decoded.txt)
  8. 4.Executethisscript(visitdecrypt.phpin
    awebbrowserordophpdecrypt.phpintheshell)
  9. 5.Opendecoded.txt,thePHPshouldbedecrypted
    ifnotpostthecodeonhttp://www.ariadoss.
    com/forums/web-development/lamp
  10. gzinflate执行PHP eval加密代码的解密方法翻译为中文后的文字
    (此段汉字原始文件里面可没.嘿)
  11. 1.把这整段脚本保存为decrypt.php
  12. 2.把需要解密的代码保存为coded.txt并且和decrypt.php在同一目录.
  13. 3.创建一个空白文件命名为decoded.txt(必须把decoded.
    txt的权限设置为CHMOD0666,也就是可以写入的.当然,你可以
    不创建文件文件.只要文件夹有写入权限,脚本便会自动创建一个
    名为decoded.txt的文档.)
  14. 4.运行PHP eval加密解密脚本(浏览器中运行decrypt.php即访问http:
    //您的域名/存放目录/decrypt.php)
  15. 5.打开decoded.txt,代码应该已经解密完成,如果出现错误请
    把代码发送到http://www.ariadoss.com/forums/web-
    development/lamp
  16. */
  17. echo"\nDECODEnestedeval(gzinflate())byDEBO
    Jurgen
    <mailto:jurgen@person.be\n\n";
  18. echo"1.Readingcoded.txt\n";
  19. $fp1=fopen("coded.txt","r");
  20. $contents=fread($fp1,filesize("coded.txt"));
  21. fclose($fp1);
  22. echo"2.Decoding\n";
  23. while(preg_match("/eval\(gzinflate/",$contents)){
  24. $contents=preg_replace("/<\?|\?>/","",$contents);
    eval(preg_replace("/eval/","\$
    contents=",
    $contents));}echo"
    3.Writingdecoded.txt\n";
    $
    fp2=fopen("decoded.txt","w");fwrite($fp2,
    trim($contents));fclose($fp2);
  25. ?>

再简单的说下gzinflate,eval(gzinflate(base64_decode("codes")));decoding-eval-gzinflate-base64_decode的使用方法.
保存上面的程序文件decrypt.php,当然文件名可以自己设置.

在此文件的同一目录建立一个coded.txt,这个里面放的是PHP eval加密过的代码,也就是eval(gzinflate(base64_decode("codes")))当中的codes;

再说明白点就是是要解密的eval(gzinflate(base64_decode("codes")))里面执行的密原文.执行保存过的文件decrypt.php,这样便会在同一目录生成一个decoded.txt的txt文档,打开此文档.里面就是那些PHP eval加密的原始代码.

转载请说明出处
知优网 » PHP eval加密的破解方法(php eval 解密)

发表评论

您需要后才能发表评论