欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  php教程

wiki-shan写的php在线加密的解密程序

程序员文章站 2024-02-10 13:22:04
...
对应的写了一个简单的解密的,专门针对eval。这个原理很有用途的,在这里记下。

复制代码 代码如下:


/*
author:zhiwushan
date:20080411
*/
 
//已经加密的文件内容
$a="
eval(gzinflate(str_rot13(base64_decode('DdNUsptVAADQq2vn7+oFGU6VPb+EyE4EiSA2LhAZUZN2OP343eF9//f7+1S+Jd1KbNZ90SVY/jUv098JLgT1lSZmztJ/s/wNs/zrp5jd/XZLrter6I6UEqkkshUXmfWmEQNnhJfcdH7qCvlmY60ku0QVlfMMSUMnMO5EAo7RTF3GKem+RGMeDAg96YCxmZf+wUVdJUVUJTyId9BivvZlTpv64zYb80BDE2znHTa/CFBbxGMa66VW9ucZl6uTunr8bXPRSB+ziagCm+pJxOtHPbpOJarMvXb8XjD1B7RMGC/g0vsFnElCvW7KUD1OLRPt7MPJPVJpwW/vnS0l1TnALytgP5GMZt1IdEWat3XONVendoWF5ZbuJcdYIIeNfxeNsX74gMnpTZgoBByrZo/1ZZ9CmjIktXDBdoe4X+JigbtDgnlXWxJDa6i/hh7MtRibAPdhFxwldbPEonbZdfSeK8XNzFTB501FlIcFB8Oo+W8dOYmQeSf3P6q6SQx4KeEAZ2Y6Cnm6OeHMEOqBkkvIzXj08Jh5HMrXXMSHtz4Pk1wvV2kTDlDZoxjKTzdb7XpcMzPXDvIW6gfYsdcJz93w2hFQsQRQliFwK82cblUfV+CQHU+73AT7PL3fKMHXa0ZJtpLVZ7bEPGE/yIO1Wmelx/LiUXU+Ikv9ZwLyRWRYZ32ElLZCdmBIcUAfFlAl+pwdrpiucej6AA68JfQJfJuIhmQOqk9UHlJl2Ufp5tKbM+PYBU504baq0nurFEj1cXYaPtGOKimjKzIOJ4rHWXCvP2SZ04MsA4qbNkYwm3xqIk6VWKLLC659Hwxc+DQN75dIOfd9K/asb3ldWzcZ/0dwzUqGbNfs9uTnD+xRQRp1g5dK9loQMQk3amvCjyrdCzuYVHqsVTayHr58EMmM+807dukI4bTEMgRtxk+YIdqA0BfjrtAQLuBvZtHHsRPzvN2Q02hCn121Z2ETWe0nDACMxhhu//Pn569/vv8t/R8='))));
";
echo decodephp($a);
 
function decodephp($a) {
$max_level=300; //最大层数
for($i=0;$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;
}
}
}
?>