wiki-shan寫的php線上加密的解密程式
來源:互聯網
上載者:User
對應的寫了一個簡單的解密的,專門針對eval。這個原理很有用途的,在這裡記下。
複製代碼 代碼如下:<?php
/*
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<$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;
}
}
}
?>