[转]解密phpjm混淆加密

最近玩回了emlog,看使用模板发现有个文件是加密的,看了下是phpjm.net,于是百度找到了解法,解码后有段

<?php
$in_file="a.php";//加密的文件
if($in_file){
	$out_file='de_'.$in_file;
	$code=file_get_contents($in_file);
	$code=explode('return',$code);
	$code=$code[3];

	preg_match_all('/\"(.*?)\"/',$code,$result);
	$result=$result[0];

	$str4=str_replace('"','',$result[13]);
	$rpd=str_replace('"','',$result[14]);
	$str1=str_replace('"','',$result[0]);
	$strM=substr($result[15],strpos($result[15],'\''));
	$strN=substr($result[16],0,strpos($result[16],'\''));
	/*preg_match_all('/\".*?\'/',$code,$result);
	$strN=str_replace('."','',str_replace("'","",$result[0][2]));*/
}
//serialdata
$str4=gzuncompress(base64_decode(base64_decode(strtr($str4,$rpd,strrev($rpd)))));

//decodedata
$str=$strM.$str4.$str1.$strN;
$output=gzuncompress(base64_decode($str));

//outputdata
if($in_file){
file_put_contents($out_file,$output);
echo'解密后文件已写入到'.$out_file;
}else{
echo"phpjmhasencoded.phpfileasstrM.str4.str1.strN<br>";
echo"thelengthis:strM+str4+str1+strN=".strlen($strM)."+".strlen($str4)."+".strlen($str1)."+".strlen($strN)."<br><br>";
echo"decoded:<br>";
highlight_string($output);
echo"<br>eval:<br>";
eval($output);
}
?>

本文代码转自:https://www.52pojie.cn/thread-794057-1-1.html 有修改

发现解密后后一串乱七八糟的删除就可以了


none

发表评论

1条评论

    YY

    2021-11-25 Windows7 / Chrome 回复

    完全解密 谢谢大佬
    https://Www.PHPJiaMi.Com/
    也能出个解密脚本就锦上添花了


设置
配色方案

布局

现在购买