|
|
@@ -4,15 +4,16 @@ Real protocol (2026-09-15 reverse-engineered):
|
|
|
1. Box996Login (api.jiyuhz.cn) — RSA loginInfo + HMAC X-BOX-AUTHORIZATION
|
|
|
2. get_today_open (pc-api.996hezi.com) — today's servers
|
|
|
3. enter_game_client — the 启动 button
|
|
|
- 4. TCP game login (gfgame:12000) — BLOCKED on C++ frame encryption (Step 2: Frida)
|
|
|
+ 4. TCP game login (gfgame:12000) — frame layout implemented; game login body/state remains unverified
|
|
|
|
|
|
Usage (HTTP part works today):
|
|
|
async with Cq2Client(account="longwu988", password="...") as cli:
|
|
|
servers = await cli.launcher.box.get_today_open() # 今天开了几个区
|
|
|
await cli.launcher.enter_game(14414738) # 启动
|
|
|
|
|
|
-The TCP part (run_until_enter_game) raises NotImplementedError until the
|
|
|
-Frida frame-crypt hook lands (Step 2).
|
|
|
+The TCP part (run_until_enter_game) remains unavailable until a matching live
|
|
|
+session validates the CS2001 body, initial sequence, body codec, and state
|
|
|
+machine.
|
|
|
"""
|
|
|
from __future__ import annotations
|
|
|
|
|
|
@@ -55,7 +56,8 @@ class LauncherFacade:
|
|
|
"""High-level pre-game flow using the REAL 996box protocol.
|
|
|
|
|
|
HTTP portion (login → today's servers → EnterGameClient) is complete.
|
|
|
- TCP portion (wait_for_game_ready) is blocked on frame encryption.
|
|
|
+ TCP wire framing is implemented, but its login payload and session state
|
|
|
+ remain unverified.
|
|
|
"""
|
|
|
|
|
|
def __init__(self, box: Box996Login) -> None:
|
|
|
@@ -78,10 +80,11 @@ class LauncherFacade:
|
|
|
server_name: str = "玖扬复古176",
|
|
|
zone_index: int = 0,
|
|
|
) -> GameLaunchInfo:
|
|
|
- """Full flow incl. TCP connect — BLOCKED on frame encryption (Step 2).
|
|
|
+ """Full flow incl. TCP connect — blocked on unverified game login data.
|
|
|
|
|
|
HTTP parts (find server, EnterGameClient) work; the TCP game login
|
|
|
- requires the C++ frame crypt algorithm (Frida hook, pending).
|
|
|
+ requires a validated CS2001 body, production initial sequence, body
|
|
|
+ codec, and state machine.
|
|
|
"""
|
|
|
servers = await self.box.get_today_open()
|
|
|
if not servers:
|
|
|
@@ -89,7 +92,8 @@ class LauncherFacade:
|
|
|
target = servers[min(zone_index, len(servers) - 1)]
|
|
|
await self.box.enter_game_client(serverid=target.serverid)
|
|
|
raise NotImplementedError(
|
|
|
- "TCP game login blocked on C++ frame encryption — run Step 2 (Frida hook) first. "
|
|
|
+ "TCP wire framing is implemented, but game login requires a validated "
|
|
|
+ "CS2001 body, initial sequence, body codec, and state machine. "
|
|
|
"HTTP parts completed: getTodayOpen + EnterGameClient."
|
|
|
)
|
|
|
|
|
|
@@ -164,8 +168,8 @@ class Cq2Client:
|
|
|
async def run_newbie_flow(self, *, resume_from: str | None = None) -> FlowResult:
|
|
|
"""Run the 13 newbie tasks. Requires run_until_enter_game first (Step 2)."""
|
|
|
assert self.task is not None, (
|
|
|
- "TCP session not established. Step 2 (Frida frame crypt) is required "
|
|
|
- "before run_newbie_flow can work."
|
|
|
+ "TCP session not established. A validated game-login protocol is required "
|
|
|
+ "before run_newbie_flow can work."
|
|
|
)
|
|
|
ctx = self.task.ctx
|
|
|
completed: list[str] = []
|