16771b0b33
Three diagnostics from chasing a FUT error that four server-side fixes failed to resolve, kept because the technique generalises. client-error-string.py recovers FIFA's on-screen message from /proc/<pid>/mem, read-only, scanning ASCII and UTF-16LE (FIFA UI strings are wide). This ended the guessing: the dialog reads "An error occurred downloading the FUT Squad Update. Please try again." -- a CONTENT DOWNLOAD failure, not the player's lineup. Every squad fix before it was aimed at the wrong subsystem, because "squad update" in FIFA means the roster update, and the server-side symptom (a squad the client would not accept) was consistent with both readings. When the server says 200 and the client says no, the client's own words are the cheapest evidence available and should have been the FIRST thing recovered, not the fifth. hub-dump.py + hub-diff-prod-staging.py diff every hub route between production (known-good, same client accepts it) and staging, comparing key presence and JSON types rather than values, since values legitimately differ. Result: 0 structural differences across 14 routes, which retired the whole "a missing field breaks bootstrap" line of investigation in one run instead of one restart at a time. Also ruled out with evidence: cert gates ARE patched (autopatch logs "pid 56298: PATCHED cert gates", and the gate bytes read back as the patched patterns); the roster server serves the FUT Squad Update fine (TLS1.2 AES256-GCM-SHA384, HTTP/1.0 200, application/xml) once probed with ALL:@SECLEVEL=0 -- a default modern context gets SSLV3_ALERT_HANDSHAKE_FAILURE and would have been a false alarm; production and staging Blaze advertise identical roster/POW hosts; the Blaze session is healthy and answering PINGs; and the squad round-trips exactly through PUT/GET.
57 lines
2.0 KiB
Python
Executable File
57 lines
2.0 KiB
Python
Executable File
#!/usr/bin/env python3
|
|
"""Dump every FUT-hub route from one UTAS to a directory, for prod-vs-staging shape diffing.
|
|
|
|
Usage: dump_hub.py <port> <outdir>
|
|
"""
|
|
import json
|
|
import os
|
|
import socket
|
|
import sys
|
|
|
|
ROUTES = {
|
|
"user_accountinfo": "/ut/game/fifa17/user/accountinfo",
|
|
"squad_active": "/ut/game/fifa17/squad/active",
|
|
"squad_0": "/ut/game/fifa17/squad/0",
|
|
"club": "/ut/game/fifa17/club?count=20",
|
|
"club_stats_staff": "/ut/game/fifa17/club/stats/staff",
|
|
"club_stats_club": "/ut/game/fifa17/club/stats/club",
|
|
"clientdata_store": "/ut/game/fifa17/clientdata/store",
|
|
"purchased_items": "/ut/game/fifa17/purchased/items",
|
|
"tradepile": "/ut/game/fifa17/tradePile",
|
|
"tradepile_counts": "/ut/game/fifa17/tradePile/counts",
|
|
"watchlist": "/ut/game/fifa17/watchList",
|
|
"trade_status": "/ut/game/fifa17/trade/status",
|
|
"usermassinfo": "/ut/game/fifa17/userMassInfo",
|
|
"settings": "/ut/game/fifa17/settings",
|
|
}
|
|
|
|
port, outdir = int(sys.argv[1]), sys.argv[2]
|
|
os.makedirs(outdir, exist_ok=True)
|
|
|
|
for name, path in ROUTES.items():
|
|
try:
|
|
s = socket.create_connection(("127.0.0.1", port), timeout=25)
|
|
s.sendall((f"GET {path} HTTP/1.1\r\nHost: x\r\n"
|
|
"X-OpenFUT-Game: fifa17\r\nConnection: close\r\n\r\n").encode())
|
|
buf = b""
|
|
while True:
|
|
c = s.recv(65536)
|
|
if not c:
|
|
break
|
|
buf += c
|
|
s.close()
|
|
head, _, body = buf.partition(b"\r\n\r\n")
|
|
status = head.split(b" ")[1].decode()
|
|
rec = {"status": status}
|
|
try:
|
|
rec["body"] = json.loads(body)
|
|
except Exception:
|
|
rec["body"] = None
|
|
rec["raw"] = body[:200].decode(errors="replace")
|
|
with open(os.path.join(outdir, f"{name}.json"), "w") as f:
|
|
json.dump(rec, f)
|
|
n = len(json.dumps(rec.get("body"))) if rec.get("body") is not None else 0
|
|
print(f" {status} {name:<18} {n} bytes")
|
|
except Exception as e:
|
|
print(f" ERR {name:<18} {type(e).__name__}: {e}")
|