def reset(self): triton.resetEngines() triton.clearPathConstraints() triton.setArchitecture(self.arch) triton.enableMode(triton.MODE.ALIGNED_MEMORY, True) triton.enableMode(triton.MODE.ONLY_ON_SYMBOLIZED, True) triton.addCallback(self.memoryCaching, triton.CALLBACK.GET_CONCRETE_MEMORY_VALUE) triton.addCallback(self.constantFolding, triton.CALLBACK.SYMBOLIC_SIMPLIFICATION) for r in self.regs: if r in self.triton_regs: triton.setConcreteRegisterValue( triton.Register( self.triton_regs[r], self.regs[r] & ((1 << self.triton_regs[r].getBitSize()) - 1))) for m in cache: self.write_mem(m['start'], m["data"]) for address in self.inputs: self.inputs[address] = triton.convertMemoryToSymbolicVariable( triton.MemoryAccess(address, triton.CPUSIZE.BYTE))
def reset(self): triton.resetEngines() triton.clearPathConstraints() triton.setArchitecture(self.arch) triton.enableMode(triton.MODE.ALIGNED_MEMORY, True) triton.enableMode(triton.MODE.ONLY_ON_SYMBOLIZED, True) triton.addCallback(self.memoryCaching, triton.CALLBACK.GET_CONCRETE_MEMORY_VALUE) triton.addCallback(self.constantFolding, triton.CALLBACK.SYMBOLIC_SIMPLIFICATION) for r in self.regs: if r in self.triton_regs: triton.setConcreteRegisterValue( triton.Register(self.triton_regs[r], self.regs[r] & ((1 << self.triton_regs[r].getBitSize()) - 1)) ) for m in cache: self.write_mem(m['start'], m["data"]) for address in self.inputs: self.inputs[address] = triton.convertMemoryToSymbolicVariable( triton.MemoryAccess( address, triton.CPUSIZE.BYTE ) )
def setUp(self): """Define the arch and modes.""" setArchitecture(ARCH.X86_64) enableMode(MODE.AST_DICTIONARIES, True) super(TestSymboliqueEngineConcreteAst, self).setUp()
def setUp(self): """Define the arch and modes.""" setArchitecture(ARCH.X86_64) enableMode(MODE.ALIGNED_MEMORY, True) enableMode(MODE.AST_DICTIONARIES, True) super(TestSymboliqueEngineAlignedAst, self).setUp()
def setUp(self): """Define the arch and modes.""" setArchitecture(ARCH.X86_64) enableMode(MODE.ALIGNED_MEMORY, True) enableMode(MODE.ONLY_ON_SYMBOLIZED, True) super(TestSymboliqueEngineAlignedOnlySym, self).setUp()