diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2020-08-31 09:27:56 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-31 09:27:56 +0200 |
| commit | 06239dde95cd984548deb40e9945d8bd85d83425 (patch) | |
| tree | 2fb59bca2aada9280fb1aecd2ebdd633a23cdc4b /example/jitter/unpack_upx.py | |
| parent | 5d8beb271d9890241a6d61dd476fab26ca37ebbf (diff) | |
| parent | 24ce193b8bad352853a9c5589f6fdcf5177d5466 (diff) | |
| download | miasm-06239dde95cd984548deb40e9945d8bd85d83425.tar.gz miasm-06239dde95cd984548deb40e9945d8bd85d83425.zip | |
Merge pull request #1274 from serpilliere/dont_gen_locationdb
Avoid generate default locationdb
Diffstat (limited to 'example/jitter/unpack_upx.py')
| -rw-r--r-- | example/jitter/unpack_upx.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/example/jitter/unpack_upx.py b/example/jitter/unpack_upx.py index 2527f0c4..59f7389a 100644 --- a/example/jitter/unpack_upx.py +++ b/example/jitter/unpack_upx.py @@ -3,6 +3,7 @@ import os import logging from miasm.analysis.sandbox import Sandbox_Win_x86_32 from miasm.jitter.loader.pe import vm2pe +from miasm.core.locationdb import LocationDB from miasm.os_dep.common import get_win_str_a @@ -41,8 +42,11 @@ parser.add_argument("--graph", options = parser.parse_args() options.load_hdr = True -sb = Sandbox_Win_x86_32(options.filename, options, globals(), - parse_reloc=False) +loc_db = LocationDB() +sb = Sandbox_Win_x86_32( + loc_db, options.filename, options, globals(), + parse_reloc=False +) if options.verbose is True: @@ -54,7 +58,7 @@ if options.verbose is True: print(sb.jitter.vm) # Ensure there is one and only one leave (for OEP discovering) -mdis = sb.machine.dis_engine(sb.jitter.bs) +mdis = sb.machine.dis_engine(sb.jitter.bs, loc_db=loc_db) mdis.dont_dis_nulstart_bloc = True asmcfg = mdis.dis_multiblock(sb.entry_point) |