Merge branch 'CHERWING:main' into main

This commit is contained in:
SingTsang 2024-05-26 11:55:16 +08:00 committed by GitHub
commit a1f411bfb4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 8 deletions

View File

@ -11,7 +11,7 @@ import requests
from http import HTTPStatus from http import HTTPStatus
from datetime import datetime from datetime import datetime
NOW_TOOLS_VERSION = '2024.05.23' NOW_TOOLS_VERSION = '2024.05.26'
if os.path.isfile('DEV_ENV.py'): if os.path.isfile('DEV_ENV.py'):
import DEV_ENV import DEV_ENV
IS_DEV = True IS_DEV = True
@ -351,7 +351,7 @@ def CHECK():
if 'code' in CHERWIN_SCRIPT_CONFIG: if 'code' in CHERWIN_SCRIPT_CONFIG:
CHERWIN_SCRIPT_CONFIG = None CHERWIN_SCRIPT_CONFIG = None
TOOLS_VERSION = CHERWIN_SCRIPT_CONFIG.get('TOOLS_VERSION', NOW_TOOLS_VERSION) TOOLS_VERSION = CHERWIN_SCRIPT_CONFIG.get('TOOLS_VERSION', NOW_TOOLS_VERSION)
if CHECK_UPDATE_NEW(NOW_TOOLS_VERSION, TOOLS_VERSION, server_script_url, TOOLS_NAME): if CHECK_UPDATE_NEW(NOW_TOOLS_VERSION, TOOLS_VERSION, server_script_url, TOOLS_NAME):
print('更新脚本完成') print('更新脚本完成')
# print(f'重新检测[{TOOLS_NAME}]版本') # print(f'重新检测[{TOOLS_NAME}]版本')
@ -433,8 +433,9 @@ def YDXQ_SIGN():
sign_hash = hashlib.md5(sign_string.encode()).hexdigest() sign_hash = hashlib.md5(sign_string.encode()).hexdigest()
return sign_hash, n return sign_hash, n
def HXEK_SIGN(memberId): def HXEK_SIGN(memberId,appid):
appid = "wxa1f1fa3785a47c7d"
# appid = "wxa1f1fa3785a47c7d"
secret = 'damogic8888' secret = 'damogic8888'
# 获取GMT+8的当前时间戳 # 获取GMT+8的当前时间戳
timestamp = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) timestamp = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())

View File

@ -89,7 +89,6 @@ class RUN:
self.use_power_max = False self.use_power_max = False
def make_request(self, url, method='post', headers={}, data={}, params=None): def make_request(self, url, method='post', headers={}, data={}, params=None):
if headers == {}: if headers == {}:
headers = self.headers headers = self.headers
try: try:
@ -108,7 +107,7 @@ class RUN:
print("发生了未知错误❌:", e) print("发生了未知错误❌:", e)
def gen_sign(self): def gen_sign(self):
sign, random_int, timestamp = CHERWIN_TOOLS.HXEK_SIGN(self.memberId) sign, random_int, timestamp = CHERWIN_TOOLS.HXEK_SIGN(self.memberId,self.appid)
self.defualt_parmas['random'] = random_int self.defualt_parmas['random'] = random_int
self.defualt_parmas['sign'] = sign self.defualt_parmas['sign'] = sign
self.defualt_parmas['timestamp'] = timestamp self.defualt_parmas['timestamp'] = timestamp
@ -252,7 +251,7 @@ export SCRIPT_UPDATE = 'False' 关闭脚本自动更新,默认开启
@Author CHERWIN @Author CHERWIN
''') ''')
local_script_name = os.path.basename(__file__) local_script_name = os.path.basename(__file__)
local_version = '2024.05.22' local_version = '2024.05.26'
if IS_DEV: if IS_DEV:
import_Tools() import_Tools()
else: else:
@ -280,4 +279,4 @@ export SCRIPT_UPDATE = 'False' 关闭脚本自动更新,默认开启
for index, infos in enumerate(tokens): for index, infos in enumerate(tokens):
run_result = RUN(infos, index).main() run_result = RUN(infos, index).main()
if not run_result: continue if not run_result: continue
if send: send(f'{APP_NAME}挂机通知', send_msg + TIPS_HTML) # if send: send(f'{APP_NAME}挂机通知', send_msg + TIPS_HTML)