查看文章 |
解密 eval gzinflate base64_decode
2008-09-06 12:51
在网上查到的不好用,简单修改一下.....嘿嘿! <?php $code_file = 'coded.txt'; //加密后文件 $decode_file = 'decoded.txt'; //解密后代码存放文件 echo '<pre>'; echo "\nDECODE nested eval(gzinflate()) by DEBO Jurgen AND modify By jayeeliu\r\n"; echo "1. Reading coded file\n"; $contents = file_get_contents($code_file); echo "2. Decoding\n"; $i=1; while (preg_match("/eval[ ]*\([ ]*gzinflate/",$contents)) {//在eval(的'('两边加入多空格匹配 echo $i++."\r\n";//显示解密次数 $contents=preg_replace("/<\?php|\?>/", "", $contents); $contents=preg_replace("/<\?|\?>/", "", $contents); eval(preg_replace("/eval/", "\$contents=", $contents)); } $contents = substr(substr($contents, 2), 0, -2);//去除开始的\?\>(\只是转义,文件中没有)和结尾的<? echo "3. Writing decoded file\n"; echo file_put_contents($decode_file, $contents); echo '</pre>'; ?> |
最近读者: