Exemple #1
0
    def setUp(self):
        self._arch_info = X86ArchitectureInformation(ARCH_X86_MODE_32)

        self._emulator = ReilEmulator(self._arch_info)

        self._asm_parser = X86Parser()
        self._translator = X86Translator()
    def __init__(self, architecture_mode=ARCH_X86_MODE_32):
        super(X86Disassembler, self).__init__()

        arch_mode_map = {
            ARCH_X86_MODE_32 : CS_MODE_32,
            ARCH_X86_MODE_64 : CS_MODE_64
        }

        self._parser = X86Parser(architecture_mode)
        self._disassembler = Cs(CS_ARCH_X86, arch_mode_map[architecture_mode])
Exemple #3
0
    def setUp(self):
        self._arch_info = X86ArchitectureInformation(ARCH_X86_MODE_32)

        self._emulator = ReilEmulator(self._arch_info.address_size)

        self._emulator.set_arch_registers(self._arch_info.registers_gp_all)
        self._emulator.set_arch_registers_size(self._arch_info.registers_size)
        self._emulator.set_reg_access_mapper(self._arch_info.alias_mapper)

        self._asm_parser = X86Parser()
        self._translator = X86Translator()
Exemple #4
0
    def setUp(self):
        self._arch_info = X86ArchitectureInformation(ARCH_X86_MODE_32)

        self._smt_solver = SmtSolver()

        self._smt_translator = SmtTranslator(self._smt_solver,
                                             self._arch_info.address_size)
        self._smt_translator.set_arch_alias_mapper(
            self._arch_info.alias_mapper)
        self._smt_translator.set_arch_registers_size(
            self._arch_info.registers_size)

        self._x86_parser = X86Parser(architecture_mode=ARCH_X86_MODE_32)

        self._x86_translator = X86Translator(
            architecture_mode=ARCH_X86_MODE_32)

        self._code_analyzer = CodeAnalyzer(self._smt_solver,
                                           self._smt_translator,
                                           self._arch_info)
Exemple #5
0
 def setUp(self):
     self._parser = X86Parser(ARCH_X86_MODE_64)
 def setUp(self):
     self._parser = X86Parser()
     self._translator = X86Translator()