mirror of
https://github.com/elliotnunn/boot3.git
synced 2024-05-28 15:41:27 +00:00
7a833cffa1
This commit includes both the means to graft an IDA disassembly onto Boot3.a, and the results of that disassembly.
26 lines
409 B
Python
Executable File
26 lines
409 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
CI, CO = b'RESUME', b'YIELD'
|
|
|
|
from sys import argv, stdout
|
|
|
|
a, b = argv[1:]
|
|
|
|
with open(a, 'rb') as a, open(b, 'rb') as b:
|
|
which = False
|
|
ibins = [a, b]
|
|
try:
|
|
while True:
|
|
l = next(ibins[which])
|
|
stdout.buffer.write(l)
|
|
|
|
if CO in l:
|
|
which = not which
|
|
for cil in ibins[which]:
|
|
if CI in cil:
|
|
stdout.buffer.write(cil)
|
|
break
|
|
|
|
except StopIteration:
|
|
pass
|