diff options
| author | Camille Mougey <camille.mougey@cea.fr> | 2015-01-07 17:47:46 +0100 |
|---|---|---|
| committer | Camille Mougey <camille.mougey@cea.fr> | 2015-01-23 17:24:42 +0100 |
| commit | bc8e9908fff38cdca1ab8d92679a85941d35e101 (patch) | |
| tree | 57442c1fcb97722c1a0a2e696dce2204a0a3de5b /example | |
| parent | 812e32123dfc0e0aafc606dbc2e154d87f047579 (diff) | |
| download | miasm-bc8e9908fff38cdca1ab8d92679a85941d35e101.tar.gz miasm-bc8e9908fff38cdca1ab8d92679a85941d35e101.zip | |
Example/Asm_x86_32_enc: Reorganize and remove unused imports
Diffstat (limited to '')
| -rw-r--r-- | example/asm_box_x86_32_enc.py | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/example/asm_box_x86_32_enc.py b/example/asm_box_x86_32_enc.py index b06fa1ea..7ca54929 100644 --- a/example/asm_box_x86_32_enc.py +++ b/example/asm_box_x86_32_enc.py @@ -1,14 +1,13 @@ #! /usr/bin/env python +from pdb import pm + +from elfesteem import pe_init +from miasm2.core import asmbloc from miasm2.core.cpu import parse_ast -from miasm2.arch.x86.arch import mn_x86, base_expr, variable -from miasm2.core.bin_stream import bin_stream +from miasm2.arch.x86.arch import mn_x86, base_expr from miasm2.core import parse_asm -from miasm2.expression.expression import * -from elfesteem import * -from pdb import pm -from miasm2.core import asmbloc -import struct +import miasm2.expression.expression as m2_expr e = pe_init.PE() s_text = e.SHList.add_section(name="text", addr=0x1000, rawsize=0x1000) @@ -23,11 +22,11 @@ reg_and_id = dict(mn_x86.regs.all_regs_ids_byname) def my_ast_int2expr(a): - return ExprInt32(a) + return m2_expr.ExprInt32(a) def my_ast_id2expr(t): - return reg_and_id.get(t, ExprId(t, size=32)) + return reg_and_id.get(t, m2_expr.ExprId(t, size=32)) my_var_parser = parse_ast(my_ast_id2expr, my_ast_int2expr) base_expr.setParseAction(my_var_parser) |