mirror of
https://github.com/flucont/btcloud.git
synced 2025-01-23 05:08:14 -05:00
update
This commit is contained in:
parent
29a874afd4
commit
2c4a139a13
@ -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.
Loading…
Reference in New Issue
Block a user