This commit is contained in:
flucont 2022-07-28 18:54:51 +08:00
parent 29a874afd4
commit 2c4a139a13
3 changed files with 9 additions and 2 deletions

View File

@ -188,14 +188,21 @@ class Plugins
$userinfo = $btapi->get_user_info();
if(isset($userinfo['uid'])){
$src = file_get_contents($main_filepath);
$data = explode("\n", $src)[0];
$uid = $userinfo['uid'];
$serverid = $userinfo['serverid'];
$key = md5(substr($serverid, 10, 16).$uid.$serverid);
$iv = md5($key.$serverid);
$key = substr($key, 8, 16);
$iv = substr($iv, 8, 16);
$de_text = openssl_decrypt($data, 'aes-128-cbc', $key, 0, $iv);
$data_arr = explode("\n", $src);
$de_text = '';
foreach($data_arr as $data){
$data = trim($data);
if(!empty($data) && strlen($data)!=24){
$tmp = openssl_decrypt($data, 'aes-128-cbc', $key, 0, $iv);
if($tmp) $de_text .= $tmp;
}
}
if(!empty($de_text)){
file_put_contents($main_filepath, $de_text);
return true;

Binary file not shown.

Binary file not shown.