class documentation

class Handle:

View In Hierarchy

A class representing a Windows handle at a specific context.

Warning

This object is not meant to be constructed directly. Use reven2.preview.windows.Context or the static methods instead.

Static Method from_value Retrieve an Handle accessible from the current process (permissions aren't checked) from its value.
Static Method list List the Handles accessible from the current process (permissions aren't checked).
Method __eq__ Undocumented
Method __hash__ Undocumented
Method __init__ Undocumented
Method __ne__ Undocumented
Method __str__ Undocumented
Method object Retrieve the object associated with this handle.
Property raw_entry The raw `_HANDLE_TABLE_ENTRY` structure of this handle.
Property value The value of this handle.
Static Method _from_handle_table_entry Undocumented
Static Method _get_kernel_handle_table Undocumented
Static Method _get_process_handle_table Undocumented
Static Method _list_handles_from_handle_table Undocumented
Static Method _list_handles_from_table Undocumented
Instance Variable _ctx Undocumented
Instance Variable _entry Undocumented
Instance Variable _object_header_address Undocumented
Instance Variable _value Undocumented
@staticmethod
def from_value(ctx, value):

Retrieve an Handle accessible from the current process (permissions aren't checked) from its value.

Parameters
ctx:_ContextThe context used to retrieve the current process and the handle.
value:intThe value of the handle to retrieve.
Returns
_Optional[Handle]The Handle if found.
@staticmethod
def list(ctx, process_handles=True, kernel_handles=True, special_handles=True):

List the Handles accessible from the current process (permissions aren't checked).

Parameters
ctx:_ContextThe context used to retrieve the current process and the handles.
process_handles:boolIf the handles of the process should be returned
kernel_handles:boolIf the handles of the kernel should be returned
special_handles:boolIf the special handles should be returned
Returns
_Iterator[Handle]The Handles found that aren't filtered by the arguments.
def __eq__(self, other):

Undocumented

Parameters
other:_AnyUndocumented
Returns
boolUndocumented
def __hash__(self):

Undocumented

Returns
intUndocumented
def __init__(self, ctx, value, entry, object_header_address):

Undocumented

Parameters
ctx:_ContextUndocumented
value:intUndocumented
entry:_Optional[reven2.types.StructInstance]Undocumented
object_header_address:reven2.address._AbstractAddressUndocumented
def __ne__(self, other):

Undocumented

Parameters
other:_AnyUndocumented
Returns
boolUndocumented
def __str__(self):

Undocumented

Returns
strUndocumented
def object(self, expected_type=None):

Retrieve the object associated with this handle.

Parameters
expected_type:_Optional[_Type[_ObjectType]]A subclass of reven2.preview.windows.object.Object representing the expected type of the object pointed by this handle, if `None` the type won't be checked.
Returns
_ObjectThe object associated with this handle.
@property
raw_entry: _Optional[reven2.types.StructInstance] =

The raw `_HANDLE_TABLE_ENTRY` structure of this handle.

@property
value: int =

The value of this handle.

@staticmethod
def _from_handle_table_entry(ctx, value, handle_table_entry):

Undocumented

Parameters
ctx:_ContextUndocumented
value:intUndocumented
handle_table_entry:reven2.types.StructInstanceUndocumented
Returns
_Optional[Handle]Undocumented
@staticmethod
def _get_kernel_handle_table(ctx):

Undocumented

Parameters
ctx:_ContextUndocumented
Returns
reven2.types.StructInstanceUndocumented
@staticmethod
def _get_process_handle_table(ctx):

Undocumented

Parameters
ctx:_ContextUndocumented
Returns
reven2.types.StructInstanceUndocumented
@staticmethod
def _list_handles_from_handle_table(ctx, handle_value, handle_table):

Undocumented

Parameters
ctx:_ContextUndocumented
handle_value:intUndocumented
handle_table:reven2.types.StructInstanceUndocumented
Returns
_Iterator[Handle]Undocumented
@staticmethod
def _list_handles_from_table(ctx, handle_initial_mask, table_level, table_base, previous_handle_indexes=None):

Undocumented

Parameters
ctx:_ContextUndocumented
handle_initial_mask:intUndocumented
table_level:intUndocumented
table_base:reven2.address._AbstractAddressUndocumented
previous_handle_indexes:_Optional[_List[int]]Undocumented
Returns
_Iterator[Handle]Undocumented
_ctx =

Undocumented

_entry =

Undocumented

_object_header_address =

Undocumented

_value =

Undocumented