Skip to main content

InjectionScan

Struct InjectionScan 

Source
pub struct InjectionScan { /* private fields */ }
Expand description

An injection builder holding a byte pattern to find the target by, returned by Injection::scan.

Implementations§

Source§

impl InjectionScan

Source

pub fn in_module(self, module: &str) -> Self

Searches a loaded module such as "engine.dll" instead of the main module.

Source

pub fn offset(self, bytes: isize) -> Self

Moves the target this many bytes on from the start of the match, or back for a negative count.

Source

pub fn follow_call(self) -> Self

Follows the call or jmp at the target to the code it goes to; see Pattern::follow_call.

Source

pub fn code(self, code: &[u8]) -> InjectionWith

Injects the caller’s own machine code; see InjectionBuilder::code.

Source

pub fn asm<F>(self, build: F) -> InjectionWith
where F: FnOnce(&mut CodeAssembler) -> Result<(), IcedError> + 'static,

Injects machine code written as assembly; see InjectionBuilder::asm.

Source

pub fn inspect<F>(self, callback: F) -> InjectionWith
where F: Fn(&Context) + Send + Sync + 'static,

Injects a callback that reads the registers; see InjectionBuilder::inspect.

Source

pub fn modify<F>(self, callback: F) -> InjectionWith
where F: Fn(&mut Context) + Send + Sync + 'static,

Injects a callback that can change the registers; see InjectionBuilder::modify.

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.