8#ifndef TRITON_TAINTENGINE_H
9#define TRITON_TAINTENGINE_H
11#include <unordered_set>
82 TRITON_EXPORT
const std::unordered_set<triton::uint64>&
getTaintedMemory(
void)
const;
85 TRITON_EXPORT std::unordered_set<const triton::arch::Register*>
getTaintedRegisters(
void)
const;
This interface is used as abstract CPU interface. All CPU must use this interface.
This class is used to represent a memory access.
This class is used as operand wrapper.
This class is used when an instruction has a register operand.
The symbolic engine class.
std::unordered_set< triton::arch::register_e > taintedRegisters
The set of tainted registers. Currently it is an over approximation of the taint.
TRITON_EXPORT bool taintRegister(const triton::arch::Register ®)
Taints a register. Returns TAINTED if the register has been tainted correctly. Otherwise it returns t...
TRITON_EXPORT bool setTaint(const triton::arch::OperandWrapper &op, bool flag)
Sets the flag (taint or untaint) to an abstract operand (Register or Memory).
TRITON_EXPORT bool setTaintMemory(const triton::arch::MemoryAccess &mem, bool flag)
Sets the flag (taint or untaint) to a memory.
TRITON_EXPORT bool untaintMemory(triton::uint64 addr)
Untaints an address. Returns !TAINTED if the address has been untainted correctly....
TRITON_EXPORT bool isTainted(const triton::arch::OperandWrapper &op) const
Abstract taint verification. Returns true if the operand is tainted.
TRITON_EXPORT std::unordered_set< const triton::arch::Register * > getTaintedRegisters(void) const
Returns the tainted registers.
TRITON_EXPORT bool isMemoryTainted(triton::uint64 addr, triton::uint32 size=1) const
Returns true if the addr is tainted.
std::unordered_set< triton::uint64 > taintedMemory
The set of tainted addresses.
TRITON_EXPORT bool taintUnion(const triton::arch::OperandWrapper &op1, const triton::arch::OperandWrapper &op2)
Abstract union tainting.
TRITON_EXPORT bool setTaintRegister(const triton::arch::Register ®, bool flag)
Sets the flag (taint or untaint) to a register.
TRITON_EXPORT bool taintAssignment(const triton::arch::OperandWrapper &op1, const triton::arch::OperandWrapper &op2)
Abstract assignment tainting.
TRITON_EXPORT TaintEngine(const triton::modes::SharedModes &modes, triton::engines::symbolic::SymbolicEngine *symbolicEngine, triton::arch::CpuInterface &cpu)
Constructor.
TRITON_EXPORT bool untaintRegister(const triton::arch::Register ®)
Untaints a register. Returns !TAINTED if the register has been untainted correctly....
TRITON_EXPORT bool taintMemory(triton::uint64 addr)
Taints an address. Returns TAINTED if the address has been tainted correctly. Otherwise it returns th...
TRITON_EXPORT bool isRegisterTainted(const triton::arch::Register ®) const
Returns true if the register is tainted.
TRITON_EXPORT const std::unordered_set< triton::uint64 > & getTaintedMemory(void) const
Returns the tainted addresses.
TRITON_EXPORT TaintEngine & operator=(const TaintEngine &other)
Copies a TaintEngine.
std::shared_ptr< triton::modes::Modes > SharedModes
Shared Modes.
const bool TAINTED
Defines a tainted item.
const bool UNTAINTED
Defines an untainted item.
std::uint64_t uint64
unisgned 64-bits
std::uint32_t uint32
unisgned 32-bits