wiki-shan写的php在线加密的解密程序
程序员文章站
2024-02-07 15:12:40
对应的写了一个简单的解密的,专门针对eval。这个原理很有用途的,在这里记下。复制代码 代码如下:
对应的写了一个简单的解密的,专门针对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;
}
}
}
?>
复制代码 代码如下:
<?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;
}
}
}
?>