diff --git a/segafs/makesegafs.py b/segafs/makesegafs.py index 2a4ae4d..85614d7 100644 --- a/segafs/makesegafs.py +++ b/segafs/makesegafs.py @@ -129,7 +129,7 @@ BootID = Struct( "derive_iv" / Int8ul, "game_id" / Bytes(4), "game_timestamp" / Timestamp, - "game_version" / IfThenElse(lambda ctx: ctx.type == 0x0201, Bytes(4), Version), + "game_version" / IfThenElse(lambda ctx: ctx.type == 0x02, Bytes(4), Version), "block_count" / Int64ul, "block_size" / Int64ul, "header_block_count" / Int64ul, @@ -149,7 +149,7 @@ def get_page_iv(iv: bytes, offset: int): iv = secrets.token_bytes(16) -if BOOTID["type"] == 0x0201: +if BOOTID["type"] == 0x02: iv = bytes(x ^ EXFAT_HEADER[i] ^ OPTION_IV[i] for (i, x) in enumerate(iv)) print(f"Generated IV: {iv.hex()}")