Browse Source

update

tags/1.8.7
flucont 2 years ago
parent
commit
3ebaa3b116
  1. 2
      app/script/convert.sh
  2. 4
      install.sql
  3. BIN
      public/install/src/bt-monitor-2.2.1.zip
  4. BIN
      public/install/src/panel6.zip
  5. BIN
      public/install/update/LinuxPanel-7.9.10.zip
  6. 2
      wiki/btmonitor.md
  7. 91
      wiki/files/linux/PluginLoader.py

2
app/script/convert.sh

@ -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

4
install.sql

@ -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');

BIN
public/install/src/bt-monitor-2.1.7.zip → public/install/src/bt-monitor-2.2.1.zip

BIN
public/install/src/panel6.zip

BIN
public/install/update/LinuxPanel-7.9.10.zip

2
wiki/btmonitor.md

@ -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)

91
wiki/files/linux/PluginLoader.py

@ -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…
Cancel
Save