diff options
Diffstat (limited to 'example')
| -rw-r--r-- | example/disasm/full.py | 5 | ||||
| -rw-r--r-- | example/expression/simplification_add.py | 5 | ||||
| -rw-r--r-- | example/expression/simplification_tools.py | 5 | ||||
| -rw-r--r-- | example/expression/solve_condition_stp.py | 6 | ||||
| -rw-r--r-- | example/jitter/sandbox_elf_aarch64l.py | 9 | ||||
| -rw-r--r-- | example/jitter/sandbox_pe_x86_32.py | 6 | ||||
| -rw-r--r-- | example/jitter/sandbox_pe_x86_64.py | 6 | ||||
| -rw-r--r-- | example/jitter/unpack_upx.py | 6 | ||||
| -rw-r--r-- | example/jitter/x86_32.py | 6 |
9 files changed, 1 insertions, 53 deletions
diff --git a/example/disasm/full.py b/example/disasm/full.py index 33903282..3bfb7658 100644 --- a/example/disasm/full.py +++ b/example/disasm/full.py @@ -1,4 +1,3 @@ -import os import logging from argparse import ArgumentParser from pdb import pm @@ -17,10 +16,6 @@ console_handler.setFormatter(logging.Formatter("%(levelname)-5s: %(message)s")) log.addHandler(console_handler) log.setLevel(logging.INFO) -filename = os.environ.get('PYTHONSTARTUP') -if filename and os.path.isfile(filename): - execfile(filename) - parser = ArgumentParser("Disassemble a binary") parser.add_argument('filename', help="File to disassemble") diff --git a/example/expression/simplification_add.py b/example/expression/simplification_add.py index 06b683fe..41720f3a 100644 --- a/example/expression/simplification_add.py +++ b/example/expression/simplification_add.py @@ -1,11 +1,6 @@ import miasm2.expression.expression as m2_expr from miasm2.expression.simplifications import expr_simp from pdb import pm -import os - -filename = os.environ.get('PYTHONSTARTUP') -if filename and os.path.isfile(filename): - execfile(filename) print """ Expression simplification demo: Adding a simplification: diff --git a/example/expression/simplification_tools.py b/example/expression/simplification_tools.py index 6a4ff715..258b5ce4 100644 --- a/example/expression/simplification_tools.py +++ b/example/expression/simplification_tools.py @@ -1,10 +1,5 @@ from miasm2.expression.expression import * from pdb import pm -import os - -filename = os.environ.get('PYTHONSTARTUP') -if filename and os.path.isfile(filename): - execfile(filename) print """ Expression simplification demo. diff --git a/example/expression/solve_condition_stp.py b/example/expression/solve_condition_stp.py index 0ca17faa..27b0512f 100644 --- a/example/expression/solve_condition_stp.py +++ b/example/expression/solve_condition_stp.py @@ -1,4 +1,3 @@ -import os import sys import subprocess from collections import defaultdict @@ -19,11 +18,6 @@ from miasm2.core import parse_asm from miasm2.arch.x86.disasm import dis_x86_32 as dis_engine -filename = os.environ.get('PYTHONSTARTUP') -if filename and os.path.isfile(filename): - execfile(filename) - - mn = mn_x86 parser = OptionParser(usage="usage: %prog [options] file") diff --git a/example/jitter/sandbox_elf_aarch64l.py b/example/jitter/sandbox_elf_aarch64l.py index 0a4c88db..0f028876 100644 --- a/example/jitter/sandbox_elf_aarch64l.py +++ b/example/jitter/sandbox_elf_aarch64l.py @@ -1,14 +1,7 @@ -import os +import logging from pdb import pm from miasm2.analysis.sandbox import Sandbox_Linux_aarch64l from miasm2.jitter.jitload import log_func -import logging - - -# Python auto completion -filename = os.environ.get('PYTHONSTARTUP') -if filename and os.path.isfile(filename): - execfile(filename) # Insert here user defined methods diff --git a/example/jitter/sandbox_pe_x86_32.py b/example/jitter/sandbox_pe_x86_32.py index 738e0778..3a627b19 100644 --- a/example/jitter/sandbox_pe_x86_32.py +++ b/example/jitter/sandbox_pe_x86_32.py @@ -1,12 +1,6 @@ -import os from pdb import pm from miasm2.analysis.sandbox import Sandbox_Win_x86_32 -# Python auto completion -filename = os.environ.get('PYTHONSTARTUP') -if filename and os.path.isfile(filename): - execfile(filename) - # Insert here user defined methods # Parse arguments diff --git a/example/jitter/sandbox_pe_x86_64.py b/example/jitter/sandbox_pe_x86_64.py index 8d9db88e..773c54b9 100644 --- a/example/jitter/sandbox_pe_x86_64.py +++ b/example/jitter/sandbox_pe_x86_64.py @@ -1,12 +1,6 @@ -import os from pdb import pm from miasm2.analysis.sandbox import Sandbox_Win_x86_64 -# Python auto completion -filename = os.environ.get('PYTHONSTARTUP') -if filename and os.path.isfile(filename): - execfile(filename) - # Insert here user defined methods # Parse arguments diff --git a/example/jitter/unpack_upx.py b/example/jitter/unpack_upx.py index d95c5a18..8160e51b 100644 --- a/example/jitter/unpack_upx.py +++ b/example/jitter/unpack_upx.py @@ -4,12 +4,6 @@ from pdb import pm from elfesteem import pe from miasm2.analysis.sandbox import Sandbox_Win_x86_32 - -filename = os.environ.get('PYTHONSTARTUP') -if filename and os.path.isfile(filename): - execfile(filename) - - # User defined methods def kernel32_GetProcAddress(jitter): diff --git a/example/jitter/x86_32.py b/example/jitter/x86_32.py index 91244bf6..1409d7aa 100644 --- a/example/jitter/x86_32.py +++ b/example/jitter/x86_32.py @@ -1,15 +1,9 @@ -import os from argparse import ArgumentParser from miasm2.jitter.csts import PAGE_READ, PAGE_WRITE from miasm2.analysis.machine import Machine from pdb import pm - -filename = os.environ.get('PYTHONSTARTUP') -if filename and os.path.isfile(filename): - execfile(filename) - parser = ArgumentParser(description="x86 32 basic Jitter") parser.add_argument("filename", help="x86 32 shellcode filename") parser.add_argument("-j", "--jitter", |