reven2.preview.taint.TaintState(object)
class documentationreven2.preview.taint
(View In Hierarchy)
A taint state lists all data that is currently tainted at a given Context
.
A taint state is composed of:
reven2.trace.Context
associated to the state
TaintedRegisterSlice
or TaintedMemories
to MarkerIterator
indicating what is currently tainted
This object is not meant to be constructed directly. It is created by
TaintStateView
>>> states = taint.states() >>> for state in states.all(): >>> # state is an instance of TaintState >>> print(state) Taint state at Context before #10 Tainted registers: rax : [tag0,] Tainted memories: [phy:0x46b5ff0; 8] : [tag0,] [phy:0x1bdb4040; 1] : [tag1,]
Taint state at Context before #11 Tainted registers: rax : [tag0,] Tainted memories: [phy:0x46b5ff0; 8] : [tag0,] [phy:0x1bdb4040; 1] : [tag1,]
Method | __init__ | Undocumented |
Method | context | Property: the context associated to the state |
Method | tainted_registers | Iterates over each TaintedRegisterSlice
in this state and yields a pair of TaintedRegisterSlice
and MarkerIterator |
Method | tainted_memories | Iterates over each TaintedMemories
in this state and yields a pair of TaintedMemories
and MarkerIterator |
Method | __str__ | Undocumented |
Method | __repr__ | Undocumented |
Property: the context associated to the state
>>> states = taint.states() >>> for state in states.all(): >>> # state is an instance of TaintState >>> print(state.context) Context before #10 Context before #11
Returns | A reven2.trace.Context . |
Iterates over each TaintedRegisterSlice
in this state and yields a pair of TaintedRegisterSlice
and MarkerIterator
>>> states = taint.states() >>> for state in states.all(): >>> # state is an instance of TaintState >>> for reg, markers in state.tainted_registers(): >>> print(reg) >>> for handle, name in markers: >>> print(name) rax tag0 rax tag0
Returns | A generator of (TaintedRegisterSlice ,
MarkerIterator ). |
Iterates over each TaintedMemories
in this state and yields a pair of TaintedMemories
and MarkerIterator
>>> states = taint.states() >>> for state in states.all(): >>> # state is an instance of TaintState >>> for mem, markers in state.tainted_memories(): >>> print(mem) >>> for handle, name in markers: >>> print(name) [phy:0x46b5ff0; 8] tag0 [phy:0x1bdb4040; 1] tag1 [phy:0x46b5ff0; 8] tag0 [phy:0x1bdb4040; 1] tag1
Returns | A generator of (TaintedMemories ,
MarkerIterator ). |