about summary refs log tree commit diff stats
path: root/example/unpack_upx.py
diff options
context:
space:
mode:
authorserpilliere <serpilliere@users.noreply.github.com>2014-12-04 08:25:57 +0100
committerserpilliere <serpilliere@users.noreply.github.com>2014-12-04 08:25:57 +0100
commitf1ef12bb57495d01281bde28869134452e598af4 (patch)
tree93d4acc39b1d57cee195aa3f587ff636924889ee /example/unpack_upx.py
parente52881b8dee1dbbf6c09c03fbc738d5ac89fe811 (diff)
parent2ce28c9d3ac0b20b1b6ceb19ddccdac3f187b679 (diff)
downloadmiasm-f1ef12bb57495d01281bde28869134452e598af4.tar.gz
miasm-f1ef12bb57495d01281bde28869134452e598af4.zip
Merge pull request #13 from commial/refactoring
Refactoring
Diffstat (limited to 'example/unpack_upx.py')
-rw-r--r--example/unpack_upx.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/example/unpack_upx.py b/example/unpack_upx.py
index 3dcfdb33..313f75a2 100644
--- a/example/unpack_upx.py
+++ b/example/unpack_upx.py
@@ -1,10 +1,9 @@
-from pdb import pm
 import os
-from miasm2.analysis.sandbox import Sandbox_Win_x86_32
 import logging
-from miasm2.core import asmbloc
-from elfesteem.strpatchwork import StrPatchwork
+from pdb import pm
 from elfesteem import pe
+from miasm2.analysis.sandbox import Sandbox_Win_x86_32
+from miasm2.core import asmbloc
 
 filename = os.environ.get('PYTHONSTARTUP')
 if filename and os.path.isfile(filename):
@@ -89,12 +88,11 @@ def update_binary(jitter):
 # Set callbacks
 sb.jitter.add_breakpoint(end_label, update_binary)
 
-
+# Run
 sb.run()
 
-regs = sb.jitter.cpu.get_gpreg()
+# Rebuild PE
 new_dll = []
-# XXXXX
 
 sb.pe.SHList.align_sections(0x1000, 0x1000)
 logging.info(repr(sb.pe.SHList))