docs(huya): 记录 dfpReport 零设备生成突破与生成器工具
- 破解进度: 服务端不校验 cw 内容, 随机 4146B cw 即可 200 + 签发新 t2/t5 - 生成流程: 零设备注册链 getDfpConfig->selectOperator->dfpReport 打法 - tools/dfp_gen.py: cw/body 构建器 (TAF 4226B 结构) - tools/dfp_cli.py: 注册链 CLI - evidence: cw JSON 段/collection 段抓取样本
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env python3
|
||||
"""dfp_gen CLI: 零设备生成 dfpReport body 并发送"""
|
||||
import argparse, json, sys, time
|
||||
from dfp_gen import make_triple_json, build_cw, build_body, send_dfp, parse_resp
|
||||
|
||||
def main():
|
||||
ap = argparse.ArgumentParser(description="零设备 dfpReport 生成器")
|
||||
ap.add_argument("-n", "--count", type=int, default=1, help="生成次数")
|
||||
ap.add_argument("-o", "--out", help="保存 JSON 输出文件")
|
||||
ap.add_argument("--no-send", action="store_true", help="只生成不发送")
|
||||
args = ap.parse_args()
|
||||
results = []
|
||||
for i in range(args.count):
|
||||
hdid, did, appkey, jp = make_triple_json()
|
||||
cw = build_cw(jp)
|
||||
body = build_body(cw)
|
||||
r = {"hdid": hdid, "deviceId": did, "appkey": appkey,
|
||||
"body": body.hex(), "body_len": len(body)}
|
||||
if not args.no_send:
|
||||
resp = send_dfp(body)
|
||||
info = parse_resp(resp)
|
||||
r["http_ok"] = info["http_ok"]
|
||||
r["actionV"] = info["actionV"]
|
||||
r["token"] = info["token"]
|
||||
results.append(r)
|
||||
print(json.dumps(r, indent=1)[:600] + ("..." if len(json.dumps(r))>600 else ""))
|
||||
if args.out:
|
||||
json.dump(results, open(args.out, "w"), indent=1)
|
||||
print(f"\n已保存: {args.out}")
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user