inject
Classes, exceptions, and methods to inject code in a remote process on Windows.
- class pyjectify.windows.modules.inject.Inject(process: ProcessHandle)[source]
This class provides methods for code injection into a remote process
- load_library(libpath: str) PE [source]
Run LoadLibrary in the target process to load a library from the disk
- Parameters:
libpath – the path of the library to load in the target process
- Returns:
A PyJectify’s PE object representing the library loaded in the target process
- memory_loader(module: PE, prefer_base_addr: bool = True, copy_headers: bool = True, call_entry_point: bool = True) PE [source]
Fully map a library from memory in the target process, resolving imports and ApiSet
- Parameters:
module – a PyJectify’s PE object representing the library to load in the target process
prefer_base_addr – specify whether to load the module at the PE’s default base address
copy_headers – specify whether to copy the PE headers to the target process memory
call_entry_point – specify whether to call the entry point with DLL_PROCESS_ATTACH flag
- Returns:
A PyJectify’s PE object representing the library loaded in the target process