mirror of
https://github.com/Genshin-bots/gsuid_core.git
synced 2025-05-12 06:55:49 +08:00
update salt ver
This commit is contained in:
parent
2abe65c5b5
commit
977ee05eca
@ -21,6 +21,7 @@ from gsuid_core.utils.plugins_config.gs_config import core_plugins_config
|
||||
from .api import _API
|
||||
from .tools import (
|
||||
random_hex,
|
||||
mys_version,
|
||||
random_text,
|
||||
get_ds_token,
|
||||
generate_os_ds,
|
||||
@ -70,7 +71,7 @@ RECOGNIZE_SERVER = {
|
||||
|
||||
class BaseMysApi:
|
||||
proxy_url: Optional[str] = proxy_url if proxy_url else None
|
||||
mysVersion = '2.44.1'
|
||||
mysVersion = mys_version
|
||||
_HEADER = {
|
||||
'x-rpc-app_version': mysVersion,
|
||||
'User-Agent': (
|
||||
@ -619,7 +620,7 @@ class MysApi(BaseMysApi):
|
||||
HEADER = copy.deepcopy(self._HEADER)
|
||||
HEADER['Cookie'] = ck
|
||||
HEADER['x-rpc-device_id'] = random_hex(32)
|
||||
HEADER['x-rpc-app_version'] = '2.44.1'
|
||||
HEADER['x-rpc-app_version'] = mys_version
|
||||
HEADER['x-rpc-client_type'] = '5'
|
||||
HEADER['X_Requested_With'] = 'com.mihoyo.hyperion'
|
||||
HEADER['DS'] = get_web_ds_token(True)
|
||||
@ -1052,7 +1053,7 @@ class MysApi(BaseMysApi):
|
||||
HEADER['Cookie'] = stoken
|
||||
HEADER['DS'] = get_web_ds_token(True)
|
||||
HEADER['User-Agent'] = 'okhttp/4.8.0'
|
||||
HEADER['x-rpc-app_version'] = '2.44.1'
|
||||
HEADER['x-rpc-app_version'] = mys_version
|
||||
HEADER['x-rpc-sys_version'] = '12'
|
||||
HEADER['x-rpc-client_type'] = '5'
|
||||
HEADER['x-rpc-channel'] = 'mihoyo'
|
||||
|
@ -6,10 +6,11 @@ import string
|
||||
import hashlib
|
||||
from typing import Any, Dict, Optional
|
||||
|
||||
mys_version="2.60.1"
|
||||
_S = {
|
||||
'2.44.1': {
|
||||
'LK2': 'IEIZiKYaput2OCKQprNuGsog1NZc1FkS',
|
||||
'K2': 'dZAwGk4e9aC0MXXItkwnHamjA1x30IYw',
|
||||
'2.60.1': {
|
||||
"K2": "AcpNVhfh0oedCobdCyFV8EE1jMOVDy9q",
|
||||
"LK2": "1OJyMNCqFlstEQqqMOv0rKCIdTOoJhNt",
|
||||
'22': 't0qEgfub6cvueAPgR5m9aQWWVciEer7v',
|
||||
'25': 'xV8v4Qu54lUKrEYFZkJhB8cuOh9Asafs',
|
||||
},
|
||||
@ -65,12 +66,12 @@ def get_ds_token(
|
||||
b: Optional[Dict[str, Any]] = None,
|
||||
salt_id: str = '25',
|
||||
):
|
||||
salt = _S['2.44.1'][salt_id]
|
||||
salt = _S[mys_version][salt_id]
|
||||
return _random_int_ds(salt, q, b)
|
||||
|
||||
|
||||
def get_web_ds_token(web=False):
|
||||
return _random_str_ds(_S['2.44.1']['LK2'] if web else _S['2.44.1']['K2'])
|
||||
return _random_str_ds(_S[mys_version]['LK2'] if web else _S[mys_version]['K2'])
|
||||
|
||||
|
||||
def generate_os_ds(salt: str = '') -> str:
|
||||
|
Loading…
x
Reference in New Issue
Block a user