[php]代码库
< ?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
gzinflate执行PHP eval加密代码的解密方法翻译为中文后的文字
(此段汉字原始文件里面可没.嘿)
1. 把这整段脚本保存为decrypt.php
2. 把需要解密的代码保存为coded.txt并且和decrypt.php在同一目录.
3. 创建一个空白文件命名为 decoded.txt (必须把 decoded.
txt 的权限设置为CHMOD 0666,也就是可以写入的.当然,你可以
不创建文件文件.只要文件夹有写入权限,脚本便会自动创建一个
名为decoded.txt的文档. )
4. 运行PHP eval加密解密脚本 (浏览器中运行decrypt.php 即访问 http:
//您的域名/存放目录/decrypt.php)
5. 打开 decoded.txt, 代码应该已经解密完成,
*/
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);
?>