about summary refs log tree commit diff stats
path: root/example/jitter/unpack_upx.py
diff options
context:
space:
mode:
authorCamille Mougey <commial@gmail.com>2018-06-09 09:05:05 +0200
committerGitHub <noreply@github.com>2018-06-09 09:05:05 +0200
commit990060f21e515ff1a25246f8fdf0936a97ac698f (patch)
treeb10543391f9a66ddd5e3f6852c30d96b169b623d /example/jitter/unpack_upx.py
parentdadfaabc3fff5edb9bf4ef7e7e8c4cfc4baccb94 (diff)
parent61551fa78e9dd22ed1f982b4fe171fd6383c39a6 (diff)
downloadmiasm-990060f21e515ff1a25246f8fdf0936a97ac698f.tar.gz
miasm-990060f21e515ff1a25246f8fdf0936a97ac698f.zip
Merge pull request #751 from serpilliere/ExprLabel
Expr Loc
Diffstat (limited to 'example/jitter/unpack_upx.py')
-rw-r--r--example/jitter/unpack_upx.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/example/jitter/unpack_upx.py b/example/jitter/unpack_upx.py
index f9b0aed1..b86724d6 100644
--- a/example/jitter/unpack_upx.py
+++ b/example/jitter/unpack_upx.py
@@ -59,10 +59,11 @@ leaves = list(ab.get_bad_blocks_predecessors())
 assert(len(leaves) == 1)
 l = leaves.pop()
 logging.info(l)
-end_label = l.label.offset
 
-logging.info('final label')
-logging.info(end_label)
+end_loc_key = mdis.symbol_pool.loc_key_to_offset(l)
+
+logging.info('final loc_key')
+logging.info(end_loc_key)
 
 # Export CFG graph (dot format)
 if options.graph is True:
@@ -85,7 +86,7 @@ def update_binary(jitter):
     return False
 
 # Set callbacks
-sb.jitter.add_breakpoint(end_label, update_binary)
+sb.jitter.add_breakpoint(end_loc_key, update_binary)
 
 # Run
 sb.run()