>  기사  >  类库下载  >  Micro Shield PHP 스크립트 암호화 전문가 PHP 복호화 알고리즘

Micro Shield PHP 스크립트 암호화 전문가 PHP 복호화 알고리즘

高洛峰
高洛峰원래의
2016-10-20 15:23:081841검색

Weidun PHP Encryption Expert 복호화 알고리즘 게시자: Neeao, Weidun PHP Encryption Expert로 암호화된 코드를 발견하면 다음 코드를 사용하여 소스 파일을 볼 수 있습니다.


방법:

<?php 
/*********************************** 
*威盾PHP加密专家解密算法 By:Neeao 
*http://Neeao.com 
*2009-09-10 
***********************************/ 
 
$filename="play-js.php";//要解密的文件 
$lines = file($filename);//0,1,2行 
 
//第一次base64解密 
$content=""; 
if(preg_match("/O0O0000O0\(&#39;.*&#39;\)/",$lines[1],$y)) 
{ 
$content=str_replace("O0O0000O0(&#39;","",$y[0]); 
$content=str_replace("&#39;)","",$content); 
$content=base64_decode($content); 
} 
//第一次base64解密后的内容中查找密钥 
$decode_key=""; 
if(preg_match("/\),&#39;.*&#39;,/",$content,$k)) 
{ 
$decode_key=str_replace("),&#39;","",$k[0]); 
$decode_key=str_replace("&#39;,","",$decode_key); 
} 
//查找要截取字符串长度 
$str_length=""; 
if(preg_match("/,\d*\),/",$content,$k)) 
{ 
$str_length=str_replace("),","",$k[0]); 
$str_length=str_replace(",","",$str_length); 
} 
//截取文件加密后的密文 
$Secret=substr($lines[2],$str_length); 
//echo $Secret; 
 
//直接还原密文输出 
echo "<?php\n".base64_decode(strtr($Secret,$decode_key,&#39;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/&#39;))."?>"; 
?>

Weidun PHP 스크립트 크래킹

<?php 
function get_filetree($path){ 
$tree = array(); 
foreach(glob($path . &#39;/*&#39;) as $single){ 
if(is_dir($single)){ 
$tree = array_merge($tree,get_filetree($single)); 
} else { 
$tree[] = $single; 
} 
} 
return $tree; 
} 
function eval_decode($File) 
{ 
$Lines = file($File); 
$Content; 
if(preg_match("/O0O0000O0\(&#39;.*&#39;\)/", $Lines[1], $S)){ 
$Content = str_replace("O0O0000O0(&#39;", "", $S[0]); 
$Content = str_replace("&#39;)", "", $Content); 
$Content = base64_decode($Content); 
} else { 
return "file not encode!"; 
} 
$Key; 
if(preg_match("/\),&#39;.*&#39;,/", $Content, $K)){ 
$Key = str_replace("),&#39;", "", $K[0]); 
$Key = str_replace("&#39;,", "", $Key); 
} else { 
return "not decode key!"; 
} 
$Length; 
if(preg_match("/,\d*\),/", $Content, $K)){ 
$Length = str_replace("),", "", $K[0]); 
$Length = str_replace(",", "", $Length); 
} else { 
return "not decode base64 string!"; 
} 
$Secret = substr($Lines[2], $Length); 
$Decode = "<?php".base64_decode(strtr($Secret,$Key,&#39;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/&#39;)) ."?>"; 
file_put_contents($File, $Decode); 
return "file decode success!"; 
} 
 
$filelist = get_filetree("D:/PHPnow/htdocs/1"); 
foreach($filelist as $value){ 
echo $value." :\t\t".eval_decode($value) . "\n\r<br>"; 
} 
?>


성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
이전 기사:PHP 파일 작업다음 기사:PHP 파일 작업

관련 기사

더보기