diff options
| author | serpilliere <devnull@localhost> | 2014-08-21 10:57:44 +0200 |
|---|---|---|
| committer | serpilliere <devnull@localhost> | 2014-08-21 10:57:44 +0200 |
| commit | 3e889c0369e3fbc71ec17e094819305083b7d056 (patch) | |
| tree | cece2e394e5c4a2e173a89f61b87aa9b897bcb09 /example/unpack_upx.py | |
| parent | 3931f27b69456b74041891a0636f881f44cbae9e (diff) | |
| download | miasm-3e889c0369e3fbc71ec17e094819305083b7d056.tar.gz miasm-3e889c0369e3fbc71ec17e094819305083b7d056.zip | |
fix unpack upx example with machine
Diffstat (limited to 'example/unpack_upx.py')
| -rw-r--r-- | example/unpack_upx.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/example/unpack_upx.py b/example/unpack_upx.py index 14eac9ef..05e3f4b7 100644 --- a/example/unpack_upx.py +++ b/example/unpack_upx.py @@ -10,13 +10,12 @@ from elfesteem import * from elfesteem.strpatchwork import StrPatchwork from miasm2.core import asmbloc -from miasm2.arch.x86.arch import mn_x86 -from miasm2.arch.x86.disasm import dis_x86_32 -from miasm2.jitter.jitload import jitter_x86_32, vm_load_pe, preload_pe, libimp +from miasm2.jitter.jitload import vm_load_pe, preload_pe, libimp from miasm2.jitter.jitload import bin_stream_vm from miasm2.jitter.csts import * from miasm2.jitter.os_dep import win_api_x86_32 +from miasm2.analysis.machine import Machine # Debug settings # from pdb import pm @@ -56,7 +55,8 @@ else: logging.basicConfig(level=logging.WARNING) # Init arch -myjit = jitter_x86_32(jit_type=args.jitter) +machine = Machine("x86_32") +myjit = machine.jitter(args.jitter) myjit.init_stack() # Log level (if available with jitter engine) @@ -74,7 +74,7 @@ if args.verbose is True: ep = e.rva2virt(e.Opthdr.AddressOfEntryPoint) # Ensure there is one and only one leave (for OEP discovering) -mdis = dis_x86_32(myjit.bs) +mdis = machine.dis_engine(myjit.bs) mdis.dont_dis_nulstart_bloc = True ab = mdis.dis_multibloc(ep) |