mirror of
https://gitea.tendokyu.moe/beerpsi/x.git
synced 2024-11-23 23:00:56 +01:00
Update segafs/makesegafs.py
This commit is contained in:
parent
fc8b5dc3d8
commit
fcde905a13
@ -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()}")
|
||||
|
Loading…
Reference in New Issue
Block a user