uniref.util.injector
- class uniref.util.injector.windows.WinInjector(exe_filename: str = '', process_id: int = 0)
Bases:
InjectorProcess injector for
Windows.- property bit_long: int
Application bit long
- get_module_base(module_name: str) int
Get module base by name in the injected process.
- get_proc_address(module_base: int, proc_name: str) int
Get module exported function address in the injected process.
- mem_alloc(alloc_address: int = 0, alloc_size: int = 4096, alloc_type: int = 12288, protection: str = 'rwx') int
Allocate memory.
- mem_free(address: int, free_size: int = 0, free_type: int = 32768) None
Free allocated memory.
- mem_read_bool(address: int) bool
Read a
boolvalue from the specified address.
- mem_read_c_string(address: int) str
Read a C-style string from the specified address.
- mem_read_char(address: int) int
Read a
charvalue from the specified address.
- mem_read_double(address: int) float
Read a
doublevalue from the specified address.
- mem_read_float(address: int) float
Read a
floatvalue from the specified address.
- mem_read_int16(address: int) int
Read a
shortvalue from the specified address.
- mem_read_int32(address: int) int
Read an
intvalue from the specified address.
- mem_read_int64(address: int) int
Read a
long longvalue from the specified address.
- mem_read_pointer(address: int) int
Read a
void*value from the specified address.
- mem_read_uchar(address: int) int
Read an
unsigned charvalue from the specified address.
- mem_read_uint16(address: int) int
Read an
unsigned shortvalue from the specified address.
- mem_read_uint32(address: int) int
Read an
unsigned intvalue from the specified address.
- mem_read_uint64(address: int) int
Read an
unsigned long longvalue from the specified address.
- mem_set_protect(address: int, length: int, new_protect: str = 'rwx') str
Set memory protection.
- mem_write_bool(address: int, value: bool) bool
Write a
boolvalue to the specified address.
- mem_write_c_string(address: int, value: str) bool
Write a C-style string to the specified address. (Automatically add
\x00)
- mem_write_char(address: int, value: int) bool
Write a
charvalue to the specified address.
- mem_write_double(address: int, value: float) bool
Write a
doublevalue to the specified address.
- mem_write_float(address: int, value: float) bool
Write a
floatvalue to the specified address.
- mem_write_int16(address: int, value: int) bool
Write a
shortvalue to the specified address.
- mem_write_int32(address: int, value: int) bool
Write an
intvalue to the specified address.
- mem_write_int64(address: int, value: int) bool
Write a
long longvalue to the specified address.
- mem_write_pointer(address: int, value: int) int
Write a
void*value to the specified address.
- mem_write_uchar(address: int, value: int) bool
Write an
unsigned charvalue to the specified address.
- mem_write_uint16(address: int, value: int) bool
Write an
unsigned shortvalue to the specified address.
- mem_write_uint32(address: int, value: int) bool
Write an
unsigned intvalue to the specified address.
- mem_write_uint64(address: int, value: int) bool
Write an
unsigned long longvalue to the specified address.
- property process_id: int
PID
- class uniref.util.injector.android.AndroidInjector(process_name: Optional[str], package_name: Optional[str], device_id: Optional[str], spawn: bool)
Bases:
Injector- property bit_long: int
Application bit long
- get_module_base(module_name: str) int
Get module base by name in the injected process.
- get_proc_address(module_name: str, proc_name: str) int
Get module exported function address in the injected process.
- mem_alloc(alloc_size: int = -1, protection: str = 'rwx') int
Allocate memory.
- mem_free(address: int) None
Free allocated memory.
- mem_read_bool(address: int) bool
Read a
boolvalue from the specified address.
- mem_read_c_string(address: int) str
Read a C-style string from the specified address.
- mem_read_char(address: int) int
Read a
charvalue from the specified address.
- mem_read_double(address: int) float
Read a
doublevalue from the specified address.
- mem_read_float(address: int) float
Read a
floatvalue from the specified address.
- mem_read_int16(address: int) int
Read a
shortvalue from the specified address.
- mem_read_int32(address: int) int
Read an
intvalue from the specified address.
- mem_read_int64(address: int) int
Read a
long longvalue from the specified address.
- mem_read_pointer(address: int) int
Read a
void*value from the specified address.
- mem_read_uchar(address: int) int
Read an
unsigned charvalue from the specified address.
- mem_read_uint16(address: int) int
Read an
unsigned shortvalue from the specified address.
- mem_read_uint32(address: int) int
Read an
unsigned intvalue from the specified address.
- mem_read_uint64(address: int) int
Read an
unsigned long longvalue from the specified address.
- mem_set_protect(address: int, length: int, new_protect: str = 'rwx') None
Set memory protection.
- mem_write_bool(address: int, value: bool) bool
Write a
boolvalue to the specified address.
- mem_write_c_string(address: int, value: str) bool
Write a C-style string to the specified address. (Automatically add
\x00)
- mem_write_char(address: int, value: int) bool
Write a
charvalue to the specified address.
- mem_write_double(address: int, value: float) bool
Write a
doublevalue to the specified address.
- mem_write_float(address: int, value: float) bool
Write a
floatvalue to the specified address.
- mem_write_int16(address: int, value: int) bool
Write a
shortvalue to the specified address.
- mem_write_int32(address: int, value: int) bool
Write an
intvalue to the specified address.
- mem_write_int64(address: int, value: int) bool
Write a
long longvalue to the specified address.
- mem_write_pointer(address: int, value: int) int
Write a
void*value to the specified address.
- mem_write_uchar(address: int, value: int) bool
Write an
unsigned charvalue to the specified address.
- mem_write_uint16(address: int, value: int) bool
Write an
unsigned shortvalue to the specified address.
- mem_write_uint32(address: int, value: int) bool
Write an
unsigned intvalue to the specified address.
- mem_write_uint64(address: int, value: int) bool
Write an
unsigned long longvalue to the specified address.
- property process_id: int
PID