feat: goctf final
This commit is contained in:
commit
f205b802d5
128 files changed
+37794
No files matched your search
@@ -0,0 +1,17 @@
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
OFFSET = 0x75AC
|
||||
BEFORE = bytes.fromhex("84 c0 0f 84 5c 03 00 00 41 80 7e 0c 00 0f 84 ba 03 00 00")
|
||||
AFTER = bytes.fromhex("41 80 7e 0c 00 0f 84 c2 03 00 00 84 c0 0f 84 51 03 00 00")
|
||||
|
||||
|
||||
path = Path(sys.argv[1])
|
||||
with path.open("r+b") as binary:
|
||||
binary.seek(OFFSET)
|
||||
current = binary.read(len(BEFORE))
|
||||
if current != BEFORE:
|
||||
raise SystemExit("unexpected greenhouse-console build")
|
||||
binary.seek(OFFSET)
|
||||
binary.write(AFTER)
|
||||
Reference in new issue
Block a user