mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-22 22:53:04 +00:00
1ae60ad715
Signed-off-by: Hector Martin <marcan@marcan.st>
23 lines
519 B
Python
Executable file
23 lines
519 B
Python
Executable file
#!/usr/bin/env python3
|
|
|
|
import argparse, pathlib
|
|
|
|
parser = argparse.ArgumentParser(description='Run a Mach-O payload under the hypervisor')
|
|
parser.add_argument('payload', type=pathlib.Path)
|
|
args = parser.parse_args()
|
|
|
|
from proxy import *
|
|
from proxyutils import *
|
|
from utils import *
|
|
from hv import HV
|
|
|
|
iface = UartInterface()
|
|
p = M1N1Proxy(iface, debug=False)
|
|
bootstrap_port(iface, p)
|
|
u = ProxyUtils(p, heap_size = 128 * 1024 * 1024)
|
|
|
|
hv = HV(iface, p, u)
|
|
|
|
hv.init()
|
|
hv.load_macho(args.payload.read_bytes())
|
|
hv.start()
|