about summary refs log tree commit diff stats
path: root/example
diff options
context:
space:
mode:
authorserpilliere <devnull@localhost>2011-10-19 11:35:10 +0200
committerserpilliere <devnull@localhost>2011-10-19 11:35:10 +0200
commit99d52112060b795d26a27f70135aaedbc79d2c8c (patch)
tree39b92162002214b59d77083d6b215b24c6a0dc3c /example
parentca1c0faf36e780922b04d3cf844a193529974bbd (diff)
downloadmiasm-99d52112060b795d26a27f70135aaedbc79d2c8c.tar.gz
miasm-99d52112060b795d26a27f70135aaedbc79d2c8c.zip
fix eop detection
Diffstat (limited to 'example')
-rw-r--r--example/unpack_upx.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/example/unpack_upx.py b/example/unpack_upx.py
index 4d66be58..765ff4d8 100644
--- a/example/unpack_upx.py
+++ b/example/unpack_upx.py
@@ -55,7 +55,7 @@ decomp_buf_len_in = decomp_func - decomp_buf_ad_in
 decomp_buf_len_out = decomp_buf_ad_in - decomp_buf_ad_out

 print "in l", hex(decomp_buf_len_in), "out l", hex(decomp_buf_len_out)

 

-dont_dis = [(decomp_buf_ad_out, decomp_buf_ad_in)]

+dont_dis = asmbloc.interval([(decomp_buf_ad_out, decomp_buf_ad_in)])

 

 g = asmbloc.bloc2graph(all_bloc)

 open("graph.txt" , "w").write(g)

@@ -68,7 +68,8 @@ all_bloc = asmbloc.dis_bloc_all(x86_mn, in_str, decomp_func, job_done, symbol_po
 

 end_label = None

 for b in all_bloc:

-    if len(b.bto) == 1 and asmbloc.getblocby_label(all_bloc, b.bto[0].label)== None:

+    if len(b.bto) == 1 and abs(b.label.offset - b.bto[0].label.offset) > 0x1000:

+        # asmbloc.getblocby_label(all_bloc, b.bto[0].label)== None:

         end_label = b.bto[0].label.offset

         break

 if not end_label: