Struct Process

Source
pub struct Process {
    pub h_process: HANDLE,
    pub module_base_address: usize,
}

Fields§

§h_process: HANDLE§module_base_address: usize

Implementations§

Source§

impl Process

Source

pub fn new(process_name: &str) -> Result<Process, Error>

Source

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.

Source

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.

Source

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.

Source

pub fn read_value<OutputType>(&self, ptr: usize, absolute: bool) -> OutputType

Source

pub fn write_value<InputType>( &self, ptr: usize, output: InputType, absolute: bool, )

Source

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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.