Trace

class tritondse.trace.QBDITrace[source]
QBDI_SCRIPT_FILEPATH = PosixPath('/opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/site-packages/tritondse/qbdi_trace.py')
property coverage: CoverageSingleRun

CoverageSingleRun associated with the trace.

Returns:

coverage object

static from_file(coverage_path: str) QBDITrace[source]

Load coverage from a file.

Parameters:

coverage_path (str.) – Path to the coverage file.

static run(strategy: CoverageStrategy, binary_path: str, args: List[str], output_path: str, dump_trace: bool = False, stdin_file=None, timeout=None, cwd=None) bool[source]

Run the binary passed as argument and return the coverage.

Parameters:
  • strategy (CoverageStrategy.) – Coverage strategy.

  • binary_path (str.) – Path to the binary.

  • args (str.) – List of arguments to pass to the binary.

  • dump_trace – Enable gather the trace

  • stdin_file – Path to the file that will act as stdin.

property trace: List[int]

List of addresses executed.

Returns:

list of addresses

class tritondse.trace.Trace[source]
property coverage: CoverageSingleRun

Coverage generated by the trace

Returns:

CoverageSingleRun object

static from_file(file: str | Path) QBDITrace[source]
get_coverage() CoverageSingleRun[source]

Return the execution coverage.

Returns:

CoverageSingleRun.

static run(strategy: CoverageStrategy, binary_path: str, args: List[str], output_path: str, dump_trace: bool = False, stdin_file=None) bool[source]

Run the binary passed as argument and return the coverage.

Parameters:
  • strategy (CoverageStrategy.) – Coverage strategy.

  • binary_path (str.) – Path to the binary.

  • args (str.) – List of arguments to pass to the binary.

  • dump_trace – Enable gather the trace

  • stdin_file – Path to the file that will act as stdin.

property strategy: CoverageStrategy

Return the coverage strategy with which this trace was generated with.

Returns:

CoverageStrategy

property trace: List[int]
exception tritondse.trace.TraceException[source]
class tritondse.trace.TritonTrace[source]
property coverage: CoverageSingleRun

Coverage generated by the trace

Returns:

CoverageSingleRun object

static from_file(file: str | Path) QBDITrace[source]
static run(strategy: CoverageStrategy, binary_path: str, args: List[str], output_path: str, dump_trace: bool = False, stdin_file=None) bool[source]

Run the binary passed as argument and return the coverage.

Parameters:
  • strategy (CoverageStrategy.) – Coverage strategy.

  • binary_path (str.) – Path to the binary.

  • args (str.) – List of arguments to pass to the binary.

  • dump_trace – Enable gather the trace

  • stdin_file – Path to the file that will act as stdin.