diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2015-03-27 14:31:24 +0100 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2015-04-01 23:47:37 +0200 |
| commit | f9c49e92dada2aa51ca594f435f962617796c116 (patch) | |
| tree | 20d40a13793f3ce6d476f0997ddcc35ef975de9c /example | |
| parent | 22777cc19e6e1f43fbbfb908e5d4d4cd7c76b391 (diff) | |
| download | miasm-f9c49e92dada2aa51ca594f435f962617796c116.tar.gz miasm-f9c49e92dada2aa51ca594f435f962617796c116.zip | |
Clean: remove unecessary ast_parser modification
Diffstat (limited to 'example')
| -rw-r--r-- | example/asm/shellcode.py | 9 | ||||
| -rw-r--r-- | example/expression/asm_to_ir.py | 7 |
2 files changed, 0 insertions, 16 deletions
diff --git a/example/asm/shellcode.py b/example/asm/shellcode.py index 7bf76093..3b22e801 100644 --- a/example/asm/shellcode.py +++ b/example/asm/shellcode.py @@ -58,15 +58,6 @@ else: virt = st output = st -# Fix the AST parser -def my_ast_int2expr(a): - return m2_expr.ExprInt_fromsize(size, a) - -def my_ast_id2expr(t): - return reg_and_id.get(t, m2_expr.ExprId(t, size=size)) - -my_var_parser = parse_ast(my_ast_id2expr, my_ast_int2expr) -base_expr.setParseAction(my_var_parser) # Get and parse the source code with open(args.source) as fstream: diff --git a/example/expression/asm_to_ir.py b/example/expression/asm_to_ir.py index ccb7202e..942e5e19 100644 --- a/example/expression/asm_to_ir.py +++ b/example/expression/asm_to_ir.py @@ -7,13 +7,6 @@ from miasm2.arch.x86.ira import ir_a_x86_32 from pdb import pm -def my_ast_int2expr(a): - return ExprInt32(a) - -my_var_parser = parse_ast(ast_id2expr, my_ast_int2expr) -base_expr.setParseAction(my_var_parser) - - # First, asm code blocs, symbol_pool = parse_asm.parse_txt(mn_x86, 32, ''' main: |