移除无法使用的旧版salt

This commit is contained in:
Womsxd 2022-08-05 12:25:10 +08:00
parent eb34dadb75
commit b17d3bf8f0
No known key found for this signature in database
GPG Key ID: 0FE76418EE689B68
7 changed files with 7 additions and 12 deletions

View File

@ -12,7 +12,7 @@ from account import get_account_list
class Genshin:
def __init__(self) -> None:
self.headers = setting.headers
self.headers['DS'] = tools.get_ds(web=True, web_old=False)
self.headers['DS'] = tools.get_ds(web=True)
self.headers['Referer'] = 'https://webstatic.mihoyo.com/bbs/event/signin-ys/index.html?bbs_auth_required=true'\
f'&act_id={setting.genshin_Act_id}&utm_source=bbs&utm_medium=mys&utm_campaign=icon'
self.headers['Cookie'] = config.config["account"]["cookie"]

View File

@ -12,7 +12,7 @@ from account import get_account_list
class Honkai2:
def __init__(self) -> None:
self.headers = setting.headers
self.headers['DS'] = tools.get_ds(web=True, web_old=False)
self.headers['DS'] = tools.get_ds(web=True)
self.headers['Referer'] = 'https://webstatic.mihoyo.com/bbs/event/signin/bh2/index.html?bbs_auth_required' \
f'=true&act_id={setting.honkai2_Act_id}&bbs_presentation_style=fullscreen' \
'&utm_source=bbs&utm_medium=mys&utm_campaign=icon'

View File

@ -12,7 +12,7 @@ from account import get_account_list
class Honkai3rd:
def __init__(self) -> None:
self.headers = setting.headers
self.headers['DS'] = tools.get_ds(web=True, web_old=False)
self.headers['DS'] = tools.get_ds(web=True)
self.headers['Referer'] = 'https://webstatic.mihoyo.com/bbs/event/signin/bh3/index.html?bbs_auth_required' \
f'=true&act_id={setting.honkai3rd_Act_id}&bbs_presentation_style=fullscreen' \
'&utm_source=bbs&utm_medium=mys&utm_campaign=icon'

View File

@ -15,7 +15,7 @@ Have_coins = 0
class Mihoyobbs:
def __init__(self):
self.headers = {
"DS": tools.get_ds(web=False, web_old=False),
"DS": tools.get_ds(web=False),
"cookie": f'stuid={config.config["account"]["stuid"]};stoken={config.config["account"]["stoken"]}',
"x-rpc-client_type": setting.mihoyobbs_Client_type,
"x-rpc-app_version": setting.mihoyobbs_Version,

View File

@ -1,10 +1,8 @@
# 米游社的Salt
mihoyobbs_Salt = "z8DRIUjNDT7IT5IZXvrUAxyupA1peND9"
mihoyobbs_Salt_web = "9nQiU3AV0rJSIBWgdynfoGMGKaklfbM7"
mihoyobbs_Salt_web_old = "h8w582wxwgqvahcdkpvdhbh2w9casgfl"
# 米游社的版本
mihoyobbs_Version = "2.34.1" # Slat和Version相互对应
mihoyobbs_Version_old = "2.3.0"
# 米游社的客户端类型
mihoyobbs_Client_type = "2" # 1为ios 2为安卓
mihoyobbs_Client_type_web = "5" # 4为pc web 5为mobile web

View File

@ -12,7 +12,7 @@ from account import get_account_list
class Tears_of_themis:
def __init__(self) -> None:
self.headers = setting.headers
self.headers['DS'] = tools.get_ds(web=True, web_old=False)
self.headers['DS'] = tools.get_ds(web=True)
self.headers['Referer'] = 'https://webstatic.mihoyo.com/bbs/event/signin/nxx/index.html?bbs_auth_required' \
'=true&bbs_presentation_style=fullscreen' \
f'act_id={setting.tearsofthemis_Act_id}'

View File

@ -25,12 +25,9 @@ def timestamp() -> int:
# 获取请求Header里的DS 当web为true则生成网页端的DS
def get_ds(web: bool, web_old: bool) -> str:
def get_ds(web: bool) -> str:
if web:
if web_old:
n = setting.mihoyobbs_Salt_web_old
else:
n = setting.mihoyobbs_Salt_web
n = setting.mihoyobbs_Salt_web
else:
n = setting.mihoyobbs_Salt
i = str(timestamp())