docs/code(huya): 设备标识符命名规范落地 - 全库HDID32/GUID32/DEVID40前缀化去混
- docs/HUYA_ID_NOMENCLATURE.md: 规范总表 + 三条强制规则 + 代码变量对应 - 4 篇主文档头部去混声明 + §11.x 被证伪假设行标注更正 - 代码: GOLDEN_HDID→GOLDEN_HDID32, device_profile.HDID→HDID32, wup_encoder/app_login 注释前缀化 - 后续所有表述必须以 GUID32(doLaunch) / HDID32(登录t1.t0) / DEVID40(t5) 前缀书写
This commit is contained in:
@@ -31,7 +31,7 @@ try:
|
||||
except Exception: # pragma: no cover
|
||||
HAVE_REG = False
|
||||
|
||||
GOLDEN_HDID = "ed0db8334cadd236c00cadf7e11ab5a5" # 金样本 hdid (对照基线)
|
||||
GOLDEN_HDID32 = "ed0db8334cadd236c00cadf7e11ab5a5" # 金样本 HDID32 (登录t1.t0设备证书, 对照基线)
|
||||
URL = "https://wup.huya.com"
|
||||
|
||||
|
||||
@@ -66,8 +66,8 @@ def full_control_login(account: str, password: str) -> str:
|
||||
return "REJECTED:no-reg-chain"
|
||||
t1, t2, t5 = gen_fresh_identity()
|
||||
print(f"[reg] t1={t1} t2={t2[:16]}... t5={t5}")
|
||||
out = login_with_registered(t2, t5, account, password, golden_hdid=GOLDEN_HDID)
|
||||
print(f"[login] 金样本hdid={GOLDEN_HDID} -> {_brief(out)}")
|
||||
out = login_with_registered(t2, t5, account, password, golden_hdid=GOLDEN_HDID32)
|
||||
print(f"[login] 金样本HDID32={GOLDEN_HDID32} -> {_brief(out)}")
|
||||
return out
|
||||
|
||||
|
||||
|
||||
@@ -12,8 +12,9 @@
|
||||
- ★(2026-08-27 突破) 服务端不校验 dfpReport 加密体(cw)内容: 随机 4146B cw 照样
|
||||
200 + 签发新 t2/t5。t5(device_id) = 服务端从 cw 解出的 40hex hdid, 随机 cw 时
|
||||
为随机值但服务端宽容。-> 无需真机加密体, python 零设备注册链达成 (--gen)。
|
||||
- 唯一不可铸造: WUP 登录帧 32hex hdid (libhydeviceid.so 本地生成 + native
|
||||
setDeviceInfo 上报, 不走 HTTP) -> 多账号必须复用金样本 hdid (APP_SIGN_NOT_MATCH 硬错)。
|
||||
- 唯一不可铸造: WUP 登录帧 32hex HDID32 (登录t1.t0设备证书; libhydeviceid.so 本地
|
||||
生成 + native setDeviceInfo 上报, 不走 HTTP; 与 GUID32(doLaunch sGuid) 两套体系,
|
||||
见 docs/HUYA_ID_NOMENCLATURE.md) -> 多账号必须复用金样本 HDID32 (APP_SIGN_NOT_MATCH 硬错)。
|
||||
|
||||
用途:
|
||||
登录前注册链拿"新鲜 action" + [重放|随机] dfpReport 作为 safedeviceid,
|
||||
@@ -45,7 +46,7 @@ WSAPI = "https://wsapi.huya.com"
|
||||
WUP = "https://wup.huya.com"
|
||||
UA = "okhttp/3.14.9"
|
||||
GOLDEN_BIN = HERE.parent / "evidence" / "wup_passwordlogin_taf.bin"
|
||||
GOLDEN_HDID = "ed0db8334cadd236c00cadf7e11ab5a5" # libhydeviceid.so 设备ID, 不可铸造
|
||||
GOLDEN_HDID32 = "ed0db8334cadd236c00cadf7e11ab5a5" # HDID32 (登录帧t1.t0设备证书, 纯代码不可铸)
|
||||
# 抓包真机加密体(dfpReport 请求) —— 设备身份锚, 加密算法未破解, 只能重放
|
||||
DFP_CHAIN_PKL = "/tmp/dfp_chain.pkl"
|
||||
EVIDENCE_CHAIN = HERE.parent / "evidence" / "dfp_chain_golden.json"
|
||||
@@ -178,9 +179,9 @@ def fresh_action() -> str:
|
||||
|
||||
def login_with_registered(action: str, t5_device_id: str,
|
||||
account: str, password: str,
|
||||
golden_hdid: str = GOLDEN_HDID,
|
||||
golden_hdid: str = GOLDEN_HDID32,
|
||||
fingerprint: str | None = None) -> str:
|
||||
"""用注册链下发的 action/device_id + 金样本 hdid 登录, 返回 cred hex."""
|
||||
"""用注册链下发的 ACTION(注册链t2)/DEVID40(注册链t5) + 金样本 HDID32(登录t1.t0) 登录, 返回 cred hex."""
|
||||
from huya_wup_encoder import build_password_login_wup
|
||||
from app_login_flow import parse_cred, parse_risk_url
|
||||
|
||||
|
||||
Reference in New Issue
Block a user