reven2.preview.taint.TaintedRegisterSlice(TaintedData)
class documentationreven2.preview.taint
(View In Hierarchy)
Models a slice of an architecture register, e.g.
rax[0..4]
if 'begin' is None
the slice starts at the first byte of
the register If 'end' is None
the slice ends at the last byte
of the register If 'begin' and 'end' are None
the slice
represents all the bytes of the register
>>> # Register slice represents all C{rax} register >>> reg_slice1 = TaintedRegisterSlice(reven2.arch.x64.rax) >>> # Register slice represents bytes 2,3,4 and 5 of rbx >>> reg_slice2 = TaintedRegisterSlice(reven2.arch.x64.rbx, 2, 6)
Method | __init__ | Initialize a TaintedRegisterSlice from a register, a begin
byte and an end byte |
Method | register | Property: The register that's being sliced. |
Method | begin | Property: The index of the first byte in the slice. |
Method | end | Property: The index of the first byte not in the slice. |
Method | __str__ | Undocumented |
Method | __repr__ | Undocumented |
Method | __eq__ | Undocumented |
Method | __ne__ | Undocumented |
Method | __hash__ | Undocumented |
Static Method | _unpack | Undocumented |
Method | _pack | Undocumented |
Method | _is_full | Undocumented |
Initialize a TaintedRegisterSlice
from a register, a begin
byte and an end byte
If 'begin' is set to None
the slice begins at byte 0 If
'end' is set to None
the slice ends at byte
reg.size_bytes
>>> reg_slice1 = TaintedRegisterSlice(reven2.arch.sse2.xmm) >>> reg_slice1 = TaintedRegisterSlice(reven2.arch.sse2.xmm, 2)
Parameters | reg | the register of the slice (type: Register ) |
begin | the first byte in the slice (type: integer) | |
end | the first byte not in the slice (type: integer) | |
Raises | TypeError | if `reg` is not a Register
instance |
IndexError | if 'begin' or 'end' are out of the register byte range |
Property: The register that's being sliced.
>>> TaintedRegisterSlice(reven2.arch.x64.rax, 1, 2).register Register(x64.rax)
Returns | A Register . |
Property: The index of the first byte in the slice.
>>> TaintedRegisterSlice(reven2.arch.x64.rax, 1, 2).begin 1
Returns | An integer . |