diff options
Diffstat (limited to 'example/jitter')
| -rw-r--r-- | example/jitter/sandbox_call.py | 3 | ||||
| -rw-r--r-- | example/jitter/unpack_upx.py | 9 |
2 files changed, 7 insertions, 5 deletions
diff --git a/example/jitter/sandbox_call.py b/example/jitter/sandbox_call.py index dc64af15..7a9fd946 100644 --- a/example/jitter/sandbox_call.py +++ b/example/jitter/sandbox_call.py @@ -15,7 +15,8 @@ sb = Sandbox_Linux_arml(options.filename, options, globals()) with open(options.filename, "rb") as fdesc: cont = Container.from_stream(fdesc) - addr_to_call = cont.symbol_pool.getby_name("md5_starts").offset + loc_key = cont.symbol_pool.getby_name("md5_starts") + addr_to_call = cont.symbol_pool.loc_key_to_offset(loc_key) # Calling md5_starts(malloc(0x64)) addr = linobjs.heap.alloc(sb.jitter, 0x64) 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() |