mirror of
https://github.com/flucont/btcloud.git
synced 2025-10-16 07:40:28 +00:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e0242091a9 | ||
![]() |
3ebaa3b116 |
@@ -1,8 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
Linux_Version="7.9.10"
|
Linux_Version="8.0.0"
|
||||||
Windows_Version="7.8.0"
|
Windows_Version="7.8.0"
|
||||||
Btm_Version="2.1.7"
|
Btm_Version="2.2.3"
|
||||||
|
|
||||||
FILES=(
|
FILES=(
|
||||||
public/install/src/panel6.zip
|
public/install/src/panel6.zip
|
||||||
|
@@ -12,15 +12,15 @@ INSERT INTO `cloud_config` (`key`, `value`) VALUES
|
|||||||
('bt_key', ''),
|
('bt_key', ''),
|
||||||
('whitelist', '0'),
|
('whitelist', '0'),
|
||||||
('download_page', '1'),
|
('download_page', '1'),
|
||||||
('new_version', '7.9.10'),
|
('new_version', '8.0.0'),
|
||||||
('update_msg', '暂无更新日志'),
|
('update_msg', '暂无更新日志'),
|
||||||
('update_date', '2023-05-09'),
|
('update_date', '2023-06-21'),
|
||||||
('new_version_win', '7.8.0'),
|
('new_version_win', '7.8.0'),
|
||||||
('update_msg_win', '暂无更新日志'),
|
('update_msg_win', '暂无更新日志'),
|
||||||
('update_date_win', '2022-12-08'),
|
('update_date_win', '2022-12-08'),
|
||||||
('new_version_btm', '2.1.7'),
|
('new_version_btm', '2.2.3'),
|
||||||
('update_msg_btm', '暂无更新日志'),
|
('update_msg_btm', '暂无更新日志'),
|
||||||
('update_date_btm', '2023-05-18'),
|
('update_date_btm', '2023-06-15'),
|
||||||
('updateall_type', '0'),
|
('updateall_type', '0'),
|
||||||
('syskey', 'UqP94LtI8eWAIgCP');
|
('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)
|
- 全局搜索替换 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)
|
#获取插件列表(0/1)
|
||||||
def get_plugin_list(force = 0):
|
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'
|
api_url = api_root_url+ '/panel/get_plugin_list'
|
||||||
cache_file = 'data/plugin_list.json'
|
cache_file = 'data/plugin_list.json'
|
||||||
|
|
||||||
@@ -123,14 +123,91 @@ def path_check(path):
|
|||||||
|
|
||||||
#数据加密
|
#数据加密
|
||||||
def db_encrypt(data):
|
def db_encrypt(data):
|
||||||
result = {}
|
try:
|
||||||
result['status'] = True
|
key = __get_db_sgin()
|
||||||
result['msg'] = data
|
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
|
return result
|
||||||
|
|
||||||
#数据解密
|
#数据解密
|
||||||
def db_decrypt(data):
|
def db_decrypt(data):
|
||||||
result = {}
|
try:
|
||||||
result['status'] = True
|
key = __get_db_sgin()
|
||||||
result['msg'] = data
|
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
|
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')
|
||||||
|
@@ -81,6 +81,8 @@
|
|||||||
|
|
||||||
- 去除内页广告:BTPanel/templates/default/layout.html 删除getPaymentStatus();这一行
|
- 去除内页广告:BTPanel/templates/default/layout.html 删除getPaymentStatus();这一行
|
||||||
|
|
||||||
|
- 删除问卷调查:BTPanel/templates/default/layout.html 删除if(window.localStorage.getItem('panelNPS') == null)以及下面的行
|
||||||
|
|
||||||
- [可选]去除各种计算题:复制bt.js到 BTPanel/static/ ,在 BTPanel/templates/default/layout.html 的\</body\>前面加入
|
- [可选]去除各种计算题:复制bt.js到 BTPanel/static/ ,在 BTPanel/templates/default/layout.html 的\</body\>前面加入
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
|
Reference in New Issue
Block a user