苹果maccms V10播放地址AES加密

一:加密部分代码部署
1.打开application/admin/view/system/config.html
找到大概约385行

<option value="2" {if condition="$config['app']['encrypt'] eq 2"}selected {/if}>base64编码</option>

在下面添加

<option value="3" {if condition="$config['app']['encrypt'] eq 3"}selected {/if}>ASE编码</option>

2.打开application/common/controller/All.php
找到大概422行

elseif($GLOBALS['config']['app']['encrypt']=='2'){
$player_info['url'] = base64_encode(mac_escape($player_info['url']));
$player_info['url_next'] = base64_encode(mac_escape($player_info['url_next']));
}

在下面添加

elseif($GLOBALS['config']['app']['encrypt']=='3'){
require_once 'yyobjm.php';//引用加密文件
$player_info['url'] = yyobjm($player_info['url']);
$player_info['url_next'] = yyobjm($player_info['url_next']);
}

从V8搬运的时候,因疏忽导致变成了base64加密,之前部署的用户替换下yyobjm.php这个文件的内容即可。
3.保存下列代码为yyobjm.php保存到目录application/common/controller/里

<?php
function yyobjm($xzv_4 = ", $xzv_1 = 'tianciwangluo')
{
$xzv_3 = str_split(base64_encode($xzv_4));
$xzv_5 = count($xzv_3);
foreach (str_split($xzv_1) as $xzv_2 => $xzv_0) $xzv_2 < $xzv_5 && $xzv_3[$xzv_2] .= $xzv_0;
return str_replace(array('=', '+', '/'), array(
'O0O0O',
'o000o',
'oo00o'
), join(", $xzv_3));
}
?>

二:解密代码部署

在你的解析文件里部署以下代码

$url = $_GET['url'];
$skey = 'tianciwangluo';//密钥
function decrypt($string = ", $skey = ") {
$strArr = str_split(str_replace(array('O0O0O', 'o000o', 'oo00o'), array('=', '+', '/'), $string), 2);
$strCount = count($strArr);
foreach (str_split($skey) as $key => $value)
$key <= $strCount && isset($strArr[$key]) && $strArr[$key][1] === $value && $strArr[$key] = $strArr[$key][0];
return base64_decode(join(", $strArr));
}
{"type":"block","srcIndex":1,"srcClientId":"b7a96f7c-b286-45cd-8907-eac421787a72″,"srcRootClientId":""} $url=decrypt($url,$skey);

解密函数调用方法

$url=decrypt($url,$skey);
点赞