reven.api.Memory(object)
class documentationreven.api
(View In Hierarchy)
This object represents the state of memory at a specified trace point.
Method | __init__ | |
Method | point | Property: The point in the trace. |
Method | default_segment | Property: The default segment selector value used to access data by logical address. |
Method | read | Read logical memory. |
Method | read_u8 | Read a 8-bit unsigned integer from logical memory. |
Method | read_i8 | Read a 8-bit signed integer from logical memory. |
Method | read_u16 | Read a 16-bit unsigned integer from logical memory. |
Method | read_i16 | Read a 16-bit signed integer from logical memory. |
Method | read_u32 | Read a 32-bit unsigned integer from logical memory. |
Method | read_i32 | Read a 32-bit signed integer from logical memory. |
Method | read_u64 | Read a 64-bit unsigned integer from logical memory. |
Method | read_i64 | Read a 64-bit signed integer from logical memory. |
Method | read_f32 | Read a 32-bits float number from logical memory. |
Method | read_f64 | Read 64-bits float number from logical memory. |
Method | read_string | Read a null-terminated string from logical memory. |
Method | read_wstring | Read a Windows string from the logical memory. |
Method | get_physical_address | Perform a logical address translation. Beware that this won't execute page fault exeptions, so the logical address must be mapped. |
Method | read_physical | Read physical memory. |
Method | search | Search pattern in a range of memory. |
Method | __repr__ | Undocumented |
Method | _rvn | Undocumented |
Method | _rvn_point | Undocumented |
Parameters | pt | a Point . |
default_segment | The default segment selector value used to access data by logical address
in this memory object. If none, will be the current value of
ds . | |
Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
Property: The default segment selector value used to access data by logical address.
Read logical memory.
Parameters | addr | The logical address offset. |
size | The amount of bytes to read. | |
segment | The segment selector value used to access data by logical address. If none,
will be Memory.default_segment . | |
Returns | A string containing the requested bytes. | |
Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
Read a 8-bit unsigned integer from logical memory.
Parameters | addr | The logical address offset where to read. |
segment | The segment selector value used to access data by logical address. If none,
will be Memory.default_segment . | |
Returns | An integer representing the requested byte. | |
Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
Read a 8-bit signed integer from logical memory.
Parameters | addr | The logical address offset where to read. |
segment | The segment selector value used to access data by logical address. If none,
will be Memory.default_segment . | |
Returns | An integer representing the requested byte. | |
Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
Read a 16-bit unsigned integer from logical memory.
Parameters | addr | The logical address offset where to start reading. |
segment | The segment selector value used to access data by logical address. If none,
will be Memory.default_segment . | |
Returns | An integer representing the requested bytes interpreted in the guest's endianness. | |
Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
Read a 16-bit signed integer from logical memory.
Parameters | addr | The logical address offset where to start reading. |
segment | The segment selector value used to access data by logical address. If none,
will be Memory.default_segment . | |
Returns | An integer representing the requested bytes interpreted in the guest's endianness. | |
Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
Read a 32-bit unsigned integer from logical memory.
Parameters | addr | The logical address offset where to start reading |
segment | The segment selector value used to access data by logical address. If none,
will be Memory.default_segment . | |
Returns | An integer representing the requested bytes interpreted in the guest's endianness. | |
Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
Read a 32-bit signed integer from logical memory.
Parameters | addr | The logical address offset where to start reading. |
segment | The segment selector value used to access data by logical address. If none,
will be Memory.default_segment . | |
Returns | An integer representing the requested bytes interpreted in the guest's endianness. | |
Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
Read a 64-bit unsigned integer from logical memory.
Parameters | addr | The logical address offset where to start reading. |
segment | The segment selector value used to access data by logical address. If none,
will be Memory.default_segment . | |
Returns | An integer representing the requested bytes interpreted in the guest's endianness. | |
Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
Read a 64-bit signed integer from logical memory.
Parameters | addr | The logical address offset where to start reading. |
segment | The segment selector value used to access data by logical address. If none,
will be Memory.default_segment . | |
Returns | An integer representing the requested bytes interpreted in the guest's endianness. | |
Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
Read a 32-bits float number from logical memory.
Parameters | addr | The logical address offset where to start reading. |
segment | The segment selector value used to access data by logical address. If none,
will be Memory.default_segment . | |
Returns | A float representing the requested bytes interpreted in the guest's endianness. | |
Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
Read 64-bits float number from logical memory.
Parameters | addr | The logical address offset where to start reading. |
segment | The segment selector value used to access data by logical address. If none,
will be Memory.default_segment . | |
Returns | A float representing the requested bytes interpreted in the guest's endianness. | |
Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
Read a null-terminated string from logical memory.
Parameters | addr | The logical address offset where to start reading. |
segment | The segment selector value used to access data by logical address. If none,
will be Memory.default_segment . | |
Returns | The string that was read. | |
Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
Read a Windows string from the logical memory.
Note that non-ASCII characters may be rendered incorrectly.
Parameters | addr | The logical address offset where to start reading. |
segment | The segment selector value used to access data by logical address. If none,
will be Memory.default_segment . | |
Returns | The wstring that was read, as a python string. | |
Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
Perform a logical address translation. Beware that this won't execute page fault exeptions, so the logical address must be mapped.
Parameters | addr | The logical address offset. |
segment | The segment selector value used to access data by logical address. If none,
will be Memory.default_segment . | |
Returns | The physical address translation, or None if that address isn't mapped at that point. | |
Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
Read physical memory.
Parameters | addr | The physical address of memory to read. |
size | The amount of bytes to read. | |
Returns | A string containing the requested bytes. | |
Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
Search pattern in a range of memory.
The search algorithm is "greedy", ie if a repeating pattern is searched for, like for instance "cafeca", the memory "cafecafeca" will match only once (only the first "cafeca" is recognized).
Parameters | pattern | The pattern to search. |
begin_addr | The lower bound of the memory range. | |
end_addr | The upper bound of the memory range. | |
segment | The segment selector value used to access data by logical address. If none,
will be Memory.default_segment . | |
Returns | A list of tuples composed of the segment and the offset of a logical address: [(segment, offset), etc.]. | |
Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |