class documentation

class Taint(object):

View In Hierarchy

Represent a started taint in the backend, allowing to retrieve the taint results.

Warnings

This object is not meant to be constructed directly. Use reven2.preview.taint.Tainter instead.

Examples

>>> trace = reven_server.trace()
>>> tainter = reven2.preview.taint.Tainter(trace)
>>> taint = tainter.simple_taint("rax")
>>> # At this point taint object can be used to retrieve results
>>> # get taint status
>>> taint.progress().status
ProgressStatus.Running
Method __init__ Undocumented
Method __repr__ Undocumented
Method __str__ Undocumented
Method accesses Get a view of the taint accesses. See TaintAccessView and TaintResultView
Method cancel Cancel this taint.
Method progress Get the current taint progress information. See Progress
Method state_at Get the taint state corresponding to a given context.
Method states Get a view of the taint states. See TaintStateView and TaintResultView
Method warnings Get a view of the taint warnings. See TaintWarningView and TaintResultView
Instance Variable _taint_data Undocumented
Instance Variable _trace Undocumented
def __init__(self, trace, taint_data):

Undocumented

Parameters
trace:_TraceUndocumented
taint_data:_TaintDataUndocumented
def __repr__(self):

Undocumented

def __str__(self):

Undocumented

def accesses(self, changes_only=False, fetch_count=100):

Get a view of the taint accesses. See TaintAccessView and TaintResultView

Information

Parameters
changes_only:boolbool, if True the view will filter accesses that do not change the taint state.
fetch_count:int

integer Technical parameter indicating how many accesses should be fetched from the server per query. Modifying this parameter allows to fine-tune performance according to the current use-case:

  • If you intend to make a lot of queries that you expect to return only a few accesses, then you should use a small value (e.g., 20)
  • If you intend to make a few queries that you expect to return a lot of accesses, then you should use a large value (e.g., 1000)
  • The default value should provide sufficient performance in most cases.

NOTE: Modifying this parameter does not modify the results of the query.

Returns
TaintAccessViewA TaintAccessView instance.
def cancel(self):

Cancel this taint.

Cancelling the taint causes the taint to stop producing results if the taint isn't finished yet.

Cancelling the taint does not discard already computed results, that remain accessible using TaintResultView.

If the taint is already finished when calling Taint.cancel, cancelling the taint has no effect.

def progress(self):

Get the current taint progress information. See Progress

Returns
ProgressUndocumented
def state_at(self, context):

Get the taint state corresponding to a given context.

Warnings

This function is a blocking function, it will return when the state is ready. If you need a non-blocking function try using states().filter_be_context_range(context).available()

Examples

>>> taint.state_at(trace.context_before(10))
TaintState(context=Context before #10)

Information

Parameters
context:_Contextreven2.trace.Context at which the taint state is requested
Returns
_Optional[TaintState]A TaintState instance if context is in the tainted context range or None otherwise.
def states(self, fetch_count=100):

Get a view of the taint states. See TaintStateView and TaintResultView

Information

Parameters
fetch_count:int

integer Technical parameter indicating how many states should be fetched from the server per query. Modifying this parameter allows to fine-tune performance according to the current use-case:

  • If you intend to make a lot of queries that you expect to return only a few states, then you should use a small value (e.g., 20)
  • If you intend to make a few queries that you expect to return a lot of states, then you should use a large value (e.g., 1000)
  • The default value should provide sufficient performance in most cases.

NOTE: Modifying this parameter does not modify the results of the query.

Returns
TaintStateViewA TaintStateView instance.
def warnings(self, fetch_count=100):

Get a view of the taint warnings. See TaintWarningView and TaintResultView

Information

Parameters
fetch_count:int

integer Technical parameter indicating how many warnings should be fetched from the server per query. Modifying this parameter allows to fine-tune performance according to the current use-case:

  • If you intend to make a lot of queries that you expect to return only a few warnings, then you should use a small value (e.g., 20)
  • If you intend to make a few queries that you expect to return a lot of warnings, then you should use a large value (e.g., 1000)
  • The default value should provide sufficient performance in most cases.

NOTE: Modifying this parameter does not modify the results of the query.

Returns
TaintWarningViewA TaintWarningView instance.
_taint_data =

Undocumented

_trace =

Undocumented