diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2019-02-27 20:12:54 +0100 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2019-03-05 16:52:51 +0100 |
| commit | 944806c506446c918eb74c17a605f5f56d4b75e0 (patch) | |
| tree | ba1d989b03bf8b5544c362a9f61b4e8d3284650f /example/jitter | |
| parent | 02bbb30efea4980c9d133947cbbf69fb599071ad (diff) | |
| download | miasm-944806c506446c918eb74c17a605f5f56d4b75e0.tar.gz miasm-944806c506446c918eb74c17a605f5f56d4b75e0.zip | |
Rename miasm2 to miasm
Diffstat (limited to 'example/jitter')
| -rwxr-xr-x | example/jitter/arm.py | 2 | ||||
| -rwxr-xr-x | example/jitter/arm_sc.py | 6 | ||||
| -rwxr-xr-x | example/jitter/example_types.py | 14 | ||||
| -rwxr-xr-x | example/jitter/mips32.py | 6 | ||||
| -rwxr-xr-x | example/jitter/msp430.py | 6 | ||||
| -rw-r--r-- | example/jitter/run_with_linuxenv.py | 6 | ||||
| -rw-r--r-- | example/jitter/sandbox_call.py | 8 | ||||
| -rw-r--r-- | example/jitter/sandbox_elf_aarch64l.py | 4 | ||||
| -rw-r--r-- | example/jitter/sandbox_elf_ppc32.py | 6 | ||||
| -rw-r--r-- | example/jitter/sandbox_pe_x86_32.py | 2 | ||||
| -rw-r--r-- | example/jitter/sandbox_pe_x86_64.py | 2 | ||||
| -rw-r--r-- | example/jitter/test_x86_32_seh.py | 6 | ||||
| -rw-r--r-- | example/jitter/trace.py | 6 | ||||
| -rw-r--r-- | example/jitter/unpack_upx.py | 4 | ||||
| -rw-r--r-- | example/jitter/x86_32.py | 4 |
15 files changed, 41 insertions, 41 deletions
diff --git a/example/jitter/arm.py b/example/jitter/arm.py index 86772874..daea2428 100755 --- a/example/jitter/arm.py +++ b/example/jitter/arm.py @@ -4,7 +4,7 @@ from __future__ import print_function import logging from pdb import pm -from miasm2.analysis.sandbox import Sandbox_Linux_arml +from miasm.analysis.sandbox import Sandbox_Linux_arml # Get arguments parser = Sandbox_Linux_arml.parser(description="""Sandbox an elf binary with arm diff --git a/example/jitter/arm_sc.py b/example/jitter/arm_sc.py index b81d3784..8d5b5677 100755 --- a/example/jitter/arm_sc.py +++ b/example/jitter/arm_sc.py @@ -1,8 +1,8 @@ #! /usr/bin/env python2 #-*- coding:utf-8 -*- -from miasm2.core.utils import int_to_byte -from miasm2.analysis.sandbox import Sandbox_Linux_armb_str -from miasm2.analysis.sandbox import Sandbox_Linux_arml_str +from miasm.core.utils import int_to_byte +from miasm.analysis.sandbox import Sandbox_Linux_armb_str +from miasm.analysis.sandbox import Sandbox_Linux_arml_str from elfesteem.strpatchwork import StrPatchwork from pdb import pm diff --git a/example/jitter/example_types.py b/example/jitter/example_types.py index d0751bbd..653adaf9 100755 --- a/example/jitter/example_types.py +++ b/example/jitter/example_types.py @@ -1,16 +1,16 @@ #! /usr/bin/env python2 -"""This script is just a short example of common usages for miasm2.core.types. +"""This script is just a short example of common usages for miasm.core.types. For a more complete view of what is possible, tests/core/types.py covers most of the module possibilities, and the module doc gives useful information as well. """ from __future__ import print_function -from miasm2.core.utils import iterbytes -from miasm2.analysis.machine import Machine -from miasm2.core.types import MemStruct, Self, Void, Str, Array, Ptr, \ +from miasm.core.utils import iterbytes +from miasm.analysis.machine import Machine +from miasm.core.types import MemStruct, Self, Void, Str, Array, Ptr, \ Num, Array, set_allocator -from miasm2.os_dep.common import heap +from miasm.os_dep.common import heap # Instantiate a heap my_heap = heap() @@ -152,7 +152,7 @@ print("module in the first part, and how to play with some casts in the second." print() # A random jitter -# You can also use miasm2.jitter.VmMngr.Vm(), but it does not happen in real +# You can also use miasm.jitter.VmMngr.Vm(), but it does not happen in real # life scripts, so here is the usual way: jitter = Machine("x86_32").jitter("python") vm = jitter.vm @@ -255,6 +255,6 @@ print("An argv instance:", repr(argv)) print("argv values:", repr([val.deref.val for val in argv[:-1]])) print() -print("See test/core/types.py and the miasm2.core.types module doc for ") +print("See test/core/types.py and the miasm.core.types module doc for ") print("more information.") diff --git a/example/jitter/mips32.py b/example/jitter/mips32.py index 2eb06c87..4aeb576f 100755 --- a/example/jitter/mips32.py +++ b/example/jitter/mips32.py @@ -2,9 +2,9 @@ #-*- coding:utf-8 -*- from __future__ import print_function from argparse import ArgumentParser -from miasm2.analysis import debugging -from miasm2.jitter.csts import * -from miasm2.analysis.machine import Machine +from miasm.analysis import debugging +from miasm.jitter.csts import * +from miasm.analysis.machine import Machine parser = ArgumentParser( description="""Sandbox raw binary with mips32 engine diff --git a/example/jitter/msp430.py b/example/jitter/msp430.py index 1ecb4cef..972a1fdc 100755 --- a/example/jitter/msp430.py +++ b/example/jitter/msp430.py @@ -2,9 +2,9 @@ #-*- coding:utf-8 -*- from __future__ import print_function from argparse import ArgumentParser -from miasm2.analysis import debugging -from miasm2.jitter.csts import * -from miasm2.analysis.machine import Machine +from miasm.analysis import debugging +from miasm.jitter.csts import * +from miasm.analysis.machine import Machine parser = ArgumentParser( description="""Sandbox raw binary with msp430 engine diff --git a/example/jitter/run_with_linuxenv.py b/example/jitter/run_with_linuxenv.py index fda76f9a..e2869699 100644 --- a/example/jitter/run_with_linuxenv.py +++ b/example/jitter/run_with_linuxenv.py @@ -4,9 +4,9 @@ import re from elfesteem import elf as elf_csts -from miasm2.os_dep.linux import environment, syscall -from miasm2.analysis.machine import Machine -from miasm2.analysis.binary import Container +from miasm.os_dep.linux import environment, syscall +from miasm.analysis.machine import Machine +from miasm.analysis.binary import Container parser = ArgumentParser("Run an ELF in a Linux-like environment") parser.add_argument("target", help="Target ELF") diff --git a/example/jitter/sandbox_call.py b/example/jitter/sandbox_call.py index 3eb0b86e..7d400b7d 100644 --- a/example/jitter/sandbox_call.py +++ b/example/jitter/sandbox_call.py @@ -1,10 +1,10 @@ """This example illustrate the Sandbox.call API, for direct call of a given function""" -from miasm2.analysis.sandbox import Sandbox_Linux_arml -from miasm2.analysis.binary import Container -from miasm2.os_dep.linux_stdlib import linobjs -from miasm2.core.utils import hexdump +from miasm.analysis.sandbox import Sandbox_Linux_arml +from miasm.analysis.binary import Container +from miasm.os_dep.linux_stdlib import linobjs +from miasm.core.utils import hexdump # Parse arguments parser = Sandbox_Linux_arml.parser(description="ELF sandboxer") diff --git a/example/jitter/sandbox_elf_aarch64l.py b/example/jitter/sandbox_elf_aarch64l.py index 0f028876..472b2354 100644 --- a/example/jitter/sandbox_elf_aarch64l.py +++ b/example/jitter/sandbox_elf_aarch64l.py @@ -1,7 +1,7 @@ import logging from pdb import pm -from miasm2.analysis.sandbox import Sandbox_Linux_aarch64l -from miasm2.jitter.jitload import log_func +from miasm.analysis.sandbox import Sandbox_Linux_aarch64l +from miasm.jitter.jitload import log_func # Insert here user defined methods diff --git a/example/jitter/sandbox_elf_ppc32.py b/example/jitter/sandbox_elf_ppc32.py index 04ecfd9e..829381fc 100644 --- a/example/jitter/sandbox_elf_ppc32.py +++ b/example/jitter/sandbox_elf_ppc32.py @@ -1,8 +1,8 @@ import os from pdb import pm -from miasm2.analysis.sandbox import Sandbox_Linux_ppc32b -from miasm2.jitter.csts import * -from miasm2.jitter.jitload import log_func +from miasm.analysis.sandbox import Sandbox_Linux_ppc32b +from miasm.jitter.csts import * +from miasm.jitter.jitload import log_func import logging # Insert here user defined methods diff --git a/example/jitter/sandbox_pe_x86_32.py b/example/jitter/sandbox_pe_x86_32.py index 3a627b19..263fad94 100644 --- a/example/jitter/sandbox_pe_x86_32.py +++ b/example/jitter/sandbox_pe_x86_32.py @@ -1,5 +1,5 @@ from pdb import pm -from miasm2.analysis.sandbox import Sandbox_Win_x86_32 +from miasm.analysis.sandbox import Sandbox_Win_x86_32 # Insert here user defined methods diff --git a/example/jitter/sandbox_pe_x86_64.py b/example/jitter/sandbox_pe_x86_64.py index 773c54b9..4d8f00ce 100644 --- a/example/jitter/sandbox_pe_x86_64.py +++ b/example/jitter/sandbox_pe_x86_64.py @@ -1,5 +1,5 @@ from pdb import pm -from miasm2.analysis.sandbox import Sandbox_Win_x86_64 +from miasm.analysis.sandbox import Sandbox_Win_x86_64 # Insert here user defined methods diff --git a/example/jitter/test_x86_32_seh.py b/example/jitter/test_x86_32_seh.py index e7f8cff4..595b9586 100644 --- a/example/jitter/test_x86_32_seh.py +++ b/example/jitter/test_x86_32_seh.py @@ -1,8 +1,8 @@ import os from pdb import pm -from miasm2.analysis.sandbox import Sandbox_Win_x86_32 -from miasm2.os_dep import win_api_x86_32_seh -from miasm2.jitter.csts import * +from miasm.analysis.sandbox import Sandbox_Win_x86_32 +from miasm.os_dep import win_api_x86_32_seh +from miasm.jitter.csts import * def deal_exception_access_violation(jitter): jitter.pc = win_api_x86_32_seh.fake_seh_handler(jitter, win_api_x86_32_seh.EXCEPTION_ACCESS_VIOLATION) diff --git a/example/jitter/trace.py b/example/jitter/trace.py index 9f025bfd..46b313c1 100644 --- a/example/jitter/trace.py +++ b/example/jitter/trace.py @@ -11,9 +11,9 @@ from __future__ import print_function import os import time from pdb import pm -from miasm2.analysis.sandbox import Sandbox_Linux_arml -from miasm2.jitter.emulatedsymbexec import EmulatedSymbExec -from miasm2.jitter.jitcore_python import JitCore_Python +from miasm.analysis.sandbox import Sandbox_Linux_arml +from miasm.jitter.emulatedsymbexec import EmulatedSymbExec +from miasm.jitter.jitcore_python import JitCore_Python # Function called at each instruction instr_count = 0 diff --git a/example/jitter/unpack_upx.py b/example/jitter/unpack_upx.py index 5d862dd1..0a41d038 100644 --- a/example/jitter/unpack_upx.py +++ b/example/jitter/unpack_upx.py @@ -3,7 +3,7 @@ import os import logging from pdb import pm from elfesteem import pe -from miasm2.analysis.sandbox import Sandbox_Win_x86_32 +from miasm.analysis.sandbox import Sandbox_Win_x86_32 # User defined methods @@ -93,7 +93,7 @@ sb.jitter.add_breakpoint(end_offset, update_binary) sb.run() # Rebuild PE -# Alternative solution: miasm2.jitter.loader.pe.vm2pe(sb.jitter, out_fname, +# Alternative solution: miasm.jitter.loader.pe.vm2pe(sb.jitter, out_fname, # libs=sb.libs, e_orig=sb.pe) new_dll = [] diff --git a/example/jitter/x86_32.py b/example/jitter/x86_32.py index 2a73a2ad..c2273b69 100644 --- a/example/jitter/x86_32.py +++ b/example/jitter/x86_32.py @@ -1,6 +1,6 @@ from argparse import ArgumentParser -from miasm2.jitter.csts import PAGE_READ, PAGE_WRITE -from miasm2.analysis.machine import Machine +from miasm.jitter.csts import PAGE_READ, PAGE_WRITE +from miasm.analysis.machine import Machine from pdb import pm |