pub struct Process {
pub h_process: HANDLE,
pub module_base_address: usize,
}
Fields§
§h_process: HANDLE
§module_base_address: usize
Implementations§
Source§impl Process
impl Process
pub fn new(process_name: &str) -> Result<Process, Error>
Sourcepub fn write_aob(&self, ptr: usize, data: &[u8], absolute: bool)
pub fn write_aob(&self, ptr: usize, data: &[u8], absolute: bool)
Writes an array of bytes (as vectors) into the desired address. It can take relative or absolute values.
Sourcepub fn write_nops(&self, ptr: usize, n: usize, absolute: bool)
pub fn write_nops(&self, ptr: usize, n: usize, absolute: bool)
Writes n
nops into the desired address
It can take relative or absolute values.
Sourcepub fn get_aob(&self, ptr: usize, n: usize, absolute: bool) -> Vec<u8> ⓘ
pub fn get_aob(&self, ptr: usize, n: usize, absolute: bool) -> Vec<u8> ⓘ
Reads n
bytes from the desired address
It can take relative or absolute values.
pub fn read_value<OutputType>(&self, ptr: usize, absolute: bool) -> OutputType
pub fn write_value<InputType>( &self, ptr: usize, output: InputType, absolute: bool, )
Sourcepub unsafe fn inject_shellcode(
&self,
entry_point: *const u32,
instruction_size: usize,
f_start: *const u8,
f_end: *const u8,
) -> *const c_void
pub unsafe fn inject_shellcode( &self, entry_point: *const u32, instruction_size: usize, f_start: *const u8, f_end: *const u8, ) -> *const c_void
Inject an an ASM function which requires the labels start and end as an input, and an entry point where the position will be injected.
§Safety
This function is highly unsafe. It can fails for so many reasons that the user should be aware when using it. The function maybe could not find a code cave, it could not write the bytes correctly, or it could just simply fail because OS reasons.
Auto Trait Implementations§
impl Freeze for Process
impl RefUnwindSafe for Process
impl Send for Process
impl Sync for Process
impl Unpin for Process
impl UnwindSafe for Process
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more