about summary refs log tree commit diff stats
path: root/example/jitter/unpack_upx.py
diff options
context:
space:
mode:
authorCamille Mougey <camille.mougey@cea.fr>2015-10-19 17:16:43 +0200
committerCamille Mougey <camille.mougey@cea.fr>2015-10-19 17:16:43 +0200
commitb812647d9f85ae326411357cf3490e2db914bf03 (patch)
treee009f810b7ae276d64b23d330b62b311053e7468 /example/jitter/unpack_upx.py
parent861e0dc047b3a6675aa8a9b131a53cb6d4dd033f (diff)
downloadfocaccia-miasm-b812647d9f85ae326411357cf3490e2db914bf03.tar.gz
focaccia-miasm-b812647d9f85ae326411357cf3490e2db914bf03.zip
UnpackUPX: stop execution properly
Diffstat (limited to 'example/jitter/unpack_upx.py')
-rw-r--r--example/jitter/unpack_upx.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/example/jitter/unpack_upx.py b/example/jitter/unpack_upx.py
index 08b733a4..2d0a02ea 100644
--- a/example/jitter/unpack_upx.py
+++ b/example/jitter/unpack_upx.py
@@ -81,6 +81,9 @@ def update_binary(jitter):
         sdata = sb.jitter.vm.get_mem(sb.pe.rva2virt(s.addr), s.rawsize)
         sb.pe.virt[sb.pe.rva2virt(s.addr)] = sdata
 
+    # Stop execution
+    jitter.run = False
+    return False
 
 # Set callbacks
 sb.jitter.add_breakpoint(end_label, update_binary)