PHP eval加密的破解方法
2014-01-17 10:20
225 查看
今天我们来深入的了解一下PHP语言的深层次概念。
特别说明:此PHP eval加密解密程序好像一定得在PHP5上面使用,
我在PHP4上面测试eval(gzinflate(base64_decode("codes")))内加密的代码始终无法正常解密
以下是PHP eval加密破解的代码:
< ?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执行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, 代码应该已经解密完成,如果出现错误请
把代码发送到 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 ($fp1, filesize ("coded.txt"));
fclose($fp1);
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($fp2,
trim($contents)); fclose($fp2);
?>
再简单的说下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加密解密程序好像一定得在PHP5上面使用,
我在PHP4上面测试eval(gzinflate(base64_decode("codes")))内加密的代码始终无法正常解密
以下是PHP eval加密破解的代码:
< ?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执行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, 代码应该已经解密完成,如果出现错误请
把代码发送到 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 ($fp1, filesize ("coded.txt"));
fclose($fp1);
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($fp2,
trim($contents)); fclose($fp2);
?>
再简单的说下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使用N层加密eval gzinflate str_rot13 base64 破解方法汇总
- 一种php文件加密方法的破解
- PHP Zend加密文件破解方法介绍
- 一种php文件加密方法的破解
- 破解php-screw加密过的文件有效方法
- PHP服务器生成密钥,java端加密,php解密的方法。更新Android加密方法
- 常见的用户密码加密方式以及破解方法
- PHP给源代码加密的几种方法汇总(推荐)
- 破解zend加密php程序工具 解密成功
- 又一个加密PHP脚本的解码方法
- PHP rsa加密解密使用方法
- Atitit.视频文件加密的方法大的总结 java c# php
- 利用PHP脚本在Linux下用md5函数加密字符串的方法
- php中Password Hashing加密方法详解
- PHP使用DES进行加密与解密的方法详解
- javascript vvorld 在线加密破解方法
- 征个人开发的“针式背单词”软件的注册方法破解、数据库加密破解
- PHP实现超简单的SSL加密解密、验证及签名的方法示例
- Atitit.视频文件加密的方法大的总结 java c# php