mirror of
https://github.com/flucont/btcloud.git
synced 2026-02-21 08:37:22 +08:00
update
This commit is contained in:
parent
0bf1aa2260
commit
3ebaa3b116
@ -2,7 +2,7 @@
|
||||
|
||||
Linux_Version="7.9.10"
|
||||
Windows_Version="7.8.0"
|
||||
Btm_Version="2.1.7"
|
||||
Btm_Version="2.2.1"
|
||||
|
||||
FILES=(
|
||||
public/install/src/panel6.zip
|
||||
|
||||
@ -18,9 +18,9 @@ INSERT INTO `cloud_config` (`key`, `value`) VALUES
|
||||
('new_version_win', '7.8.0'),
|
||||
('update_msg_win', '暂无更新日志'),
|
||||
('update_date_win', '2022-12-08'),
|
||||
('new_version_btm', '2.1.7'),
|
||||
('new_version_btm', '2.2.1'),
|
||||
('update_msg_btm', '暂无更新日志'),
|
||||
('update_date_btm', '2023-05-18'),
|
||||
('update_date_btm', '2023-06-01'),
|
||||
('updateall_type', '0'),
|
||||
('syskey', 'UqP94LtI8eWAIgCP');
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -10,7 +10,7 @@
|
||||
|
||||
极少数文件解密失败是正常现象可无视
|
||||
|
||||
- 全局搜索替换 https://api.bt.cn => http://www.example.com
|
||||
- 全局搜索替换 https://api.bt.cn => http://www.example.com(需排除/bt_monitor/latest_agent_version)
|
||||
|
||||
- 全局搜索替换 https://www.bt.cn/api/ => http://www.example.com/api/(需排除/panel/get_ip_info)
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ import public,os,sys,json
|
||||
|
||||
#获取插件列表(0/1)
|
||||
def get_plugin_list(force = 0):
|
||||
api_root_url = 'http://www.example.com'
|
||||
api_root_url = 'https://api.bt.cn'
|
||||
api_url = api_root_url+ '/panel/get_plugin_list'
|
||||
cache_file = 'data/plugin_list.json'
|
||||
|
||||
@ -123,14 +123,91 @@ def path_check(path):
|
||||
|
||||
#数据加密
|
||||
def db_encrypt(data):
|
||||
result = {}
|
||||
result['status'] = True
|
||||
result['msg'] = data
|
||||
try:
|
||||
key = __get_db_sgin()
|
||||
iv = __get_db_iv()
|
||||
str_arr = data.split('\n')
|
||||
res_str = ''
|
||||
for data in str_arr:
|
||||
if not data: continue
|
||||
res_str += __aes_encrypt(data, key, iv)
|
||||
except:
|
||||
res_str = data
|
||||
result = {
|
||||
'status' : True,
|
||||
'msg' : res_str
|
||||
}
|
||||
return result
|
||||
|
||||
#数据解密
|
||||
def db_decrypt(data):
|
||||
result = {}
|
||||
result['status'] = True
|
||||
result['msg'] = data
|
||||
try:
|
||||
key = __get_db_sgin()
|
||||
iv = __get_db_iv()
|
||||
str_arr = data.split('\n')
|
||||
res_str = ''
|
||||
for data in str_arr:
|
||||
if not data: continue
|
||||
res_str += __aes_decrypt(data, key, iv)
|
||||
except:
|
||||
res_str = data
|
||||
result = {
|
||||
'status' : True,
|
||||
'msg' : res_str
|
||||
}
|
||||
return result
|
||||
|
||||
def __get_db_sgin():
|
||||
keystr = '3gP7+k_7lSNg3$+Fj!PKW+6$KYgHtw#R'
|
||||
key = ''
|
||||
for i in range(31):
|
||||
if i & 1 == 0:
|
||||
key += keystr[i]
|
||||
return key
|
||||
|
||||
def __get_db_iv():
|
||||
div_file = "{}/data/div.pl".format(public.get_panel_path())
|
||||
if not os.path.exists(div_file):
|
||||
str = public.GetRandomString(16)
|
||||
str = __aes_encrypt_module(str)
|
||||
div = public.get_div(str)
|
||||
public.WriteFile(div_file, div)
|
||||
if os.path.exists(div_file):
|
||||
div = public.ReadFile(div_file)
|
||||
div = __aes_decrypt_module(div)
|
||||
else:
|
||||
keystr = '4jHCpBOFzL4*piTn^-4IHBhj-OL!fGlB'
|
||||
div = ''
|
||||
for i in range(31):
|
||||
if i & 1 == 0:
|
||||
div += keystr[i]
|
||||
return div
|
||||
|
||||
def __aes_encrypt_module(data):
|
||||
key = 'Z2B87NEAS2BkxTrh'
|
||||
iv = 'WwadH66EGWpeeTT6'
|
||||
return __aes_encrypt(data, key, iv)
|
||||
|
||||
def __aes_decrypt_module(data):
|
||||
key = 'Z2B87NEAS2BkxTrh'
|
||||
iv = 'WwadH66EGWpeeTT6'
|
||||
return __aes_decrypt(data, key, iv)
|
||||
|
||||
def __aes_decrypt(data, key, iv):
|
||||
from Crypto.Cipher import AES
|
||||
import base64
|
||||
encodebytes = base64.decodebytes(data.encode('utf-8'))
|
||||
aes = AES.new(key.encode('utf-8'), AES.MODE_CBC, iv.encode('utf-8'))
|
||||
de_text = aes.decrypt(encodebytes)
|
||||
unpad = lambda s: s[0:-s[-1]]
|
||||
de_text = unpad(de_text)
|
||||
return de_text.decode('utf-8')
|
||||
|
||||
def __aes_encrypt(data, key, iv):
|
||||
from Crypto.Cipher import AES
|
||||
import base64
|
||||
data = (lambda s: s + (16 - len(s) % 16) * chr(16 - len(s) % 16).encode('utf-8'))(data.encode('utf-8'))
|
||||
aes = AES.new(key.encode('utf8'), AES.MODE_CBC, iv.encode('utf8'))
|
||||
encryptedbytes = aes.encrypt(data)
|
||||
en_text = base64.b64encode(encryptedbytes)
|
||||
return en_text.decode('utf-8')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user