fix(towercore): align native selector gate
- Make the authorization gate inspect the same selector record consumed by read handlers. - Retain native 0x0203 rejection for both opcode 0x21 and 0x23.
This commit is contained in:
1 parent
3cd120414f
commit
500ed28038
1 file changed
+11
-7
@@ -7,13 +7,17 @@ from pathlib import Path
|
||||
|
||||
path = Path("/towercore")
|
||||
data = bytearray(path.read_bytes())
|
||||
offset = 0x29324
|
||||
original = bytes.fromhex("03 00 55 10")
|
||||
replacement = bytes.fromhex("03 00 00 10")
|
||||
actual = bytes(data[offset : offset + len(original)])
|
||||
if actual != original:
|
||||
raise SystemExit(f"unexpected bytes at {offset:#x}: {actual.hex()}")
|
||||
data[offset : offset + len(original)] = replacement
|
||||
patches = (
|
||||
(0x292E8, bytes.fromhex("a8 01 b7 93"), bytes.fromhex("9c 01 b7 93")),
|
||||
(0x292F0, bytes.fromhex("b0 01 a5 8f"), bytes.fromhex("a4 01 a5 8f")),
|
||||
(0x292FC, bytes.fromhex("ac 01 a4 8f"), bytes.fromhex("a0 01 a4 8f")),
|
||||
(0x29324, bytes.fromhex("03 00 55 10"), bytes.fromhex("03 00 00 10")),
|
||||
)
|
||||
for offset, original, replacement in patches:
|
||||
actual = bytes(data[offset : offset + len(original)])
|
||||
if actual != original:
|
||||
raise SystemExit(f"unexpected bytes at {offset:#x}: {actual.hex()}")
|
||||
data[offset : offset + len(original)] = replacement
|
||||
path.write_bytes(data)
|
||||
PY
|
||||
|
||||
|
||||
Reference in new issue
Block a user