about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCamille Mougey <commial@gmail.com>2018-08-23 16:53:06 +0200
committerGitHub <noreply@github.com>2018-08-23 16:53:06 +0200
commit2ae7ffe2459adb872c27b434810f5f5673d8d68d (patch)
tree1bc3d0c3396f4efa27b35a62cf6347a568532365
parent256783dc0292e443a7de496784a0f7a039770ce4 (diff)
parent7816dbf4cdcaeacdfc6ac6b69b10aa8af098214c (diff)
downloadmiasm-2ae7ffe2459adb872c27b434810f5f5673d8d68d.tar.gz
miasm-2ae7ffe2459adb872c27b434810f5f5673d8d68d.zip
Merge pull request #830 from serpilliere/fix_example_jit
Example: fix upx unpack
-rw-r--r--example/jitter/unpack_upx.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/example/jitter/unpack_upx.py b/example/jitter/unpack_upx.py
index 665fa15a..6bcef1ab 100644
--- a/example/jitter/unpack_upx.py
+++ b/example/jitter/unpack_upx.py
@@ -55,12 +55,11 @@ mdis = sb.machine.dis_engine(sb.jitter.bs)
 mdis.dont_dis_nulstart_bloc = True
 asmcfg = mdis.dis_multiblock(sb.entry_point)
 
-leaves = list(asmcfg.get_bad_blocks_predecessors())
+leaves = list(asmcfg.get_bad_blocks())
 assert(len(leaves) == 1)
 l = leaves.pop()
 logging.info(l)
-
-end_offset = mdis.loc_db.get_location_offset(l)
+end_offset = mdis.loc_db.get_location_offset(l.loc_key)
 
 logging.info('final offset')
 logging.info(hex(end_offset))