From c3705427613adedc4372d74761a5d37578460eb8 Mon Sep 17 00:00:00 2001 From: Hay1tsme Date: Fri, 10 Nov 2023 15:52:55 -0500 Subject: [PATCH] sao: fix req header --- titles/sao/handlers/base.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/titles/sao/handlers/base.py b/titles/sao/handlers/base.py index afaa2cb..16bc3a9 100644 --- a/titles/sao/handlers/base.py +++ b/titles/sao/handlers/base.py @@ -8,13 +8,15 @@ from csv import * class SaoRequestHeader: def __init__(self, data: bytes) -> None: - collection = struct.unpack_from("!H6xIII16sI", data) + collection = struct.unpack_from("!HHIIII16sI", data) self.cmd: int = collection[0] - self.vendor_id: int = collection[1] - self.game_id: int = collection[2] - self.version_id: int = collection[3] - self.hash: str = collection[4] - self.data_len: str = collection[5] + self.err_status = collection[1] + self.error_type = collection[2] + self.vendor_id: int = collection[3] + self.game_id: int = collection[4] + self.version_id: int = collection[5] + self.hash: str = collection[6] + self.data_len: str = collection[7] class SaoBaseRequest: def __init__(self, header: SaoRequestHeader, data: bytes) -> None: