diff options
| author | Camille Mougey <camille.mougey@cea.fr> | 2015-01-07 17:59:07 +0100 |
|---|---|---|
| committer | Camille Mougey <camille.mougey@cea.fr> | 2015-01-23 17:24:42 +0100 |
| commit | baaa641db2258d2f6ea3324426fcbb1c59df6cd5 (patch) | |
| tree | 6035a380cb9092a3f07c20a565b6f638d4a644da /example/asm_box_x86_64.py | |
| parent | d3a8f781deb22070147f59a2e3e2c86af6560723 (diff) | |
| download | miasm-baaa641db2258d2f6ea3324426fcbb1c59df6cd5.tar.gz miasm-baaa641db2258d2f6ea3324426fcbb1c59df6cd5.zip | |
Example/Asm_box_x86_64: Reorganize and remove unused imports
Diffstat (limited to 'example/asm_box_x86_64.py')
| -rw-r--r-- | example/asm_box_x86_64.py | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/example/asm_box_x86_64.py b/example/asm_box_x86_64.py index d48a1729..44aca56e 100644 --- a/example/asm_box_x86_64.py +++ b/example/asm_box_x86_64.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(wsize=64) 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 ExprInt64(a) + return m2_expr.ExprInt64(a) def my_ast_id2expr(t): - return reg_and_id.get(t, ExprId(t, size=64)) + return reg_and_id.get(t, m2_expr.ExprId(t, size=64)) my_var_parser = parse_ast(my_ast_id2expr, my_ast_int2expr) base_expr.setParseAction(my_var_parser) |