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 progress Get the current taint progress information. See Progress
Method changes Get a view of the taint changes. See TaintChangeView and TaintResultView
Method accesses Get a view of the taint accesses. See TaintAccessView and TaintResultView
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
Method state_at Get the taint state corresponding to a given context.
Method cancel Cancel this taint.
Method __repr__ Undocumented
Method __str__ Undocumented
Instance Variable _trace Undocumented
Instance Variable _taint_data Undocumented
def __init__(self, trace, taint_data):

Undocumented

_trace =

Undocumented

_taint_data =

Undocumented

def progress(self):

Get the current taint progress information. See Progress

@deprecated('This method will be removed in favor to Taint.accesses')
def changes(self, fetch_count=100):

Get a view of the taint changes. See TaintChangeView and TaintResultView

Information

Parametersfetch_countinteger Technical parameter indicating how many changes 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 changes, 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 changes, 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.

ReturnsA TaintChangeView instance.
def accesses(self, changes_only=False, fetch_count=100):

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

Information

Parameterschanges_onlybool, if True the view will filter accesses that do not change the taint state.
fetch_countinteger 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.

ReturnsA TaintAccessView instance.
def states(self, fetch_count=100):

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

Information

Parametersfetch_countinteger 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.

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

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

Information

Parametersfetch_countinteger 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.

ReturnsA TaintWarningView instance.
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

Parameterscontextreven2.trace.Context at which the taint state is requested
ReturnsA TaintState instance if context is in the tainted context range or None otherwise.
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 __repr__(self):

Undocumented

def __str__(self):

Undocumented

API Documentation for reven2, generated by pydoctor 21.2.2 at 2021-04-08 12:32:07.