php使用N层加密eval gzinflate str_rot13 base64 破解方法汇总

来源:本站转载 作者:佚名 时间:2011-02-14 TAG: 我要投稿
PHP使用eval(gzinflate(str_rot13(base64_decode('BASE64加密后内容'))))核心代码的解密
下非扩展方式的php加密方法:
这里有个在线的,还不错。木马防杀还行,要保护代码可就不行了。
对应的写了一个简单的解密的,
专门针对eval。这个原理很有用途。
特别说明:此解密程序好像一定得在PHP5上面使用,
我在PHP4上面测试eval(gzinflate(str_rot13(base64_decode('BASE64加密后内容'))))内加密的代码始终无法正常解密. <?php
//已经加密的文件内容
$a="eval(gzinflate(str_rot13(base64_decode('这里面放BASE64代码'))));";
function decodephp($a) {
$max_level=; //最大层数
for($i=;$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使用N层加密eval(gzinflate(base64_decode("codes")))的破解
首先申明一下,这个并非是我原创,是我转自一个国外的BLOG上面的.自己测试了下.觉得很好用的. 如果您想看的是PHP使用eval(gzinflate(str_rot13(base64_decode('BASE64加密后内容'))))核心代码的解密,请移步这里查看:PHP使用eval(gzinflate(str_rot13(base64_decode('BASE64加密后内容'))))核心代码的解密.
特别说明:此解密程序好像一定得在PHP5上面使用,
我在PHP4上面测试eval(gzinflate(base64_decode("codes")))内加密的代码始终无法正常解密
以下是代码: <?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执行加密代码的解密方法翻译为中文后的文字(此段汉字原始文件里面可没.嘿)
1. 把这整段脚本保存为decrypt.php
2. 把需要解密的代码保存为coded.txt并且和decrypt.php在同一目录.
3. 创建一个空白文件命名为 decoded.txt (必须把 decoded.txt 的权限设置为CHMOD 0666,也就是可以写入的.当然,你可以不创建文件文件.只要文件夹有写入权限,脚本便会自动创建一个名为decoded.txt的文档. )
4. 运行解密脚本 (浏览器中运行decrypt.php 即访问 http://您的域名/存放目录/decrypt.php)
5. 打开 decoded.txt, 代码应该已经解密完成,如果出现错误请把代码发送到 http://www.ariadoss.com/forums/web-development/lamp
*/
echo "\nDECODE nested eval(gzinflate()) by DEBO Jurgen <mailto:jurgen@person.be\n\n";
echo "1. Reading coded.txt\n";
$fp1 = fopen ("coded.txt", "r");
$contents = fread ($fp1, filesize ("coded.txt"));
fclose($fp1);
echo "2. Decoding\n";
while (preg_match("/eval\(gzinflate/",$contents)) {
$contents=preg_replace("/<\?|\?>/", "", $contents); eval(preg_replace("/eval/", "\$contents=", $contents)); } echo "3. Writing decoded.txt\n"; $fp2 = fopen("decoded.txt","w"); fwrite($fp2, trim($contents)); fclose($fp2);
?> 再简单的说下gzinflate,eval(gzinflate(base64_decode("codes")));decoding-eval-gzinflate-base64_decode的使用方法.
保存上面的程序文件decrypt.php,
当然文件名可以自己设置.
在此文件的同一目录建立一个coded.txt,
这个里面放的是加密过的代码,也就是eval(gzinflate(base64_decode("codes")))当中的codes;
再说明白点就是是要解密的eval(gzinflate(base64_decode("codes")))里面执行的密原文.
执行保存过的文件decrypt.php,这样便会在同一目录生成一个decoded.txt的txt文档,
打开此文档.里面就是那些被加密的原始代码.

最新文章

  1. LINQ
  2. open nms安装教程
  3. Oracle自定义函数实例
  4. [ssc] 数据库管理工具——SQuirreL SQL Client使用入门
  5. Thinking about think-time functions
  6. 作业调度框架 Quartz.NET 2.0 StepByStep
  7. FileZilla无法确定拖放操作的目标,由于shell未正确安装
  8. android模块化app开发-4为APP减负
  9. ViewFlipper的简单使用实现图片轮播效果
  10. 【转】Xcode 7 真机调试详细步骤
  11. 使用ICSharpCode.SharpZipLib.Zip实现压缩与解压缩
  12. 【转】OSX键盘快捷键
  13. Hibernate入门(四)
  14. centos-安装python3.6环境并配置虚拟环境
  15. 使用gogs搭建git私有仓库
  16. uclibc,eglibc,glibc,Musl-libc之间的区别和联系
  17. iOS.CodeSign
  18. WPF中的路由事件(转)
  19. elasticsearch DSL查询
  20. sublime Text 些许使用配置

热门文章

  1. [BZOJ 1912] patrol 巡逻
  2. [SRM570]TheTiles
  3. 【递归】【栈】先修课 计算概论(A)/函数递归练习(2)5:布尔表达式
  4. 【分块】【链表】bzoj2738 矩阵乘法
  5. pandas操作,感觉不错,复制过来的
  6. 让你的saga更具有可伸缩性(Scaling NServiceBus Sagas)
  7. [Android UI] Service里面启动Activity和Alertdialog
  8. iOS:GitHub上值得关注的iOS开源项目
  9. Discuz! 6.x/7.x 全局变量防御绕过漏洞
  10. webpack配置:css文件打包、JS压缩打包和HTML文件发布