smallworld.hinting¶
- class smallworld.hinting.Hint(message: str)¶
Base class for all Hints.
- Parameters:
message – A message for this Hint.
- message: str¶
A detailed description.
- class smallworld.hinting.DynamicRegisterValueHint(message: str, pc: int, time: int, instruction_num: int, exec_id: int, dynamic_value: int, color: int, size: int, use: bool, new: bool, reg_name: str)¶
Represents a concrete register value encountered during analysis, either used or defined by some instruction.
- Parameters:
reg_name – name of the register
dynamic_value – this is the actual value as bytes
use – True if its a “use” of this value, else its a “def”
capstone_instruction – the instruction in capstone parlance
pc – program counter of that instruction
instruction_num – for micro-execution the instr count
info – extra info about use or def if available
- message: str¶
A detailed description.
- class smallworld.hinting.DynamicMemoryValueHint(message: str, pc: int, time: int, instruction_num: int, exec_id: int, dynamic_value: int, color: int, size: int, use: bool, new: bool, address: int, base: str, index: str, scale: int, offset: int)¶
Represents a concrete memory value encountered during analysis, either used or defined by some instruction.
- Parameters:
address – memory address of this value
base – base address (if known, else 0)
index – index (if known, else 0)
scale – scale (if known, else 0)
offset – offset (if known, else 0)
dynamic_value – this is the actual value as bytes
use – True if its a “use” of this value, else its a “def”
capstone_instruction – the instruction in capstone parlance
pc – program counter of that instruction
instruction_num – for micro-execution the instr count
info – extra info about use or def if available
- message: str¶
A detailed description.
Represents a load or store that was unavailable memory.
- Parameters:
is_read – true if a load else a store
size – size of read/write in bytes
base_reg_name – name of base register (if known)
base_reg_val – value of base register (if known)
index_reg_name – name of index register (if known)
index_reg_val – value of index register (if known)
offset – offset (if known, else 0)
scale – scale (if known, else 0)
address – memory address of this value
instruction – a smallworld instruction
pc – program counter of that instruction
instruction_num – for micro-execution the instr count
A detailed description.
- class smallworld.hinting.DynamicRegisterValueSummaryHint(message: str, pc: int, color: int, size: int, use: bool, new: bool, count: int, dynamic_values: List[int], num_micro_executions: int, reg_name: str)¶
- message: str¶
A detailed description.
- class smallworld.hinting.DynamicMemoryValueSummaryHint(message: str, pc: int, color: int, size: int, use: bool, new: bool, count: int, dynamic_values: List[int], num_micro_executions: int, base: str, index: str, scale: int, offset: int, addresses: List[int])¶
- message: str¶
A detailed description.
A detailed description.
- class smallworld.hinting.EmulationException(message: str, pc: int, instruction_num: int, exception: str)¶
Something went wrong emulating this instruction
- message: str¶
A detailed description.
- class smallworld.hinting.CoverageHint(message: str, coverage: Dict[int, int])¶
Holds the a map of program counter to hit counter for an execution.
- Parameters:
coverage – A map from program counter to hit count
- message: str¶
A detailed description.
- class smallworld.hinting.ControlFlowHint(message: str, from_instruction: Any, to_instruction: Any)¶
Represents control flow going from the from_instruction to the to_instruction.
- Parameters:
from_instruction – The from instruction
to_instruction – The to instruction
- message: str¶
A detailed description.
- class smallworld.hinting.ReachableCodeHint(message: str, address: int)¶
Indicates that we can get to a given program counter with symbolic execution.
- Parameters:
address – The address we can reach
- message: str¶
A detailed description.
- class smallworld.hinting.DefUseGraphHint(message: str, graph: networkx.classes.multidigraph.MultiDiGraph)¶
- message: str¶
A detailed description.
- class smallworld.hinting.TraceExecutionHint(message: str, trace: List[smallworld.analyses.trace_execution_types.TraceElement], trace_digest: str, seed: int, emu_result: smallworld.analyses.trace_execution_types.TraceRes, exception: Exception | None, exception_class: str)¶
- message: str¶
A detailed description.
- class smallworld.hinting.BranchesHint(message: str, branches: List[int])¶
- message: str¶
A detailed description.
- class smallworld.hinting.CoverageFrontierHint(message: str, coverage_frontier: List[int], edges: List[Tuple[int, List[int]]], branches: List[int], num_traces: int)¶
- message: str¶
A detailed description.
- class smallworld.hinting.LoopHint(message: str, head: int, strands: List[List[int]])¶
- message: str¶
A detailed description.
- class smallworld.hinting.HintSubclassFilter(hint: Type[Hint], *args, **kwargs)¶
A custom logging filter based on Hint class.
- filter(record)¶
Determine if the specified record is to be logged.
Returns True if the record should be logged, or False otherwise. If deemed appropriate, the record may be modified in-place.