diff options
Diffstat (limited to 'example/jitter/mips32.py')
| -rwxr-xr-x | example/jitter/mips32.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/example/jitter/mips32.py b/example/jitter/mips32.py index 70181a2a..4aeb576f 100755 --- a/example/jitter/mips32.py +++ b/example/jitter/mips32.py @@ -1,9 +1,10 @@ #! /usr/bin/env python2 #-*- coding:utf-8 -*- +from __future__ import print_function from argparse import ArgumentParser -from miasm2.analysis import debugging -from miasm2.jitter.csts import * -from miasm2.analysis.machine import Machine +from miasm.analysis import debugging +from miasm.jitter.csts import * +from miasm.analysis.machine import Machine parser = ArgumentParser( description="""Sandbox raw binary with mips32 engine @@ -44,12 +45,16 @@ def jit_mips32_binary(args): trace_new_blocks=args.log_newbloc ) - myjit.vm.add_memory_page(0, PAGE_READ | PAGE_WRITE, open(filepath).read()) + myjit.vm.add_memory_page( + 0, + PAGE_READ | PAGE_WRITE, + open(filepath, 'rb').read() + ) myjit.add_breakpoint(0x1337BEEF, code_sentinelle) # for stack - myjit.vm.add_memory_page(0xF000, PAGE_READ | PAGE_WRITE, "\x00"*0x1000) + myjit.vm.add_memory_page(0xF000, PAGE_READ | PAGE_WRITE, b"\x00"*0x1000) myjit.cpu.SP = 0xF800 |