pub struct GadgetCache { /* private fields */ }Expand description
cache of found gadgets organized by type and module
Implementations§
Source§impl GadgetCache
impl GadgetCache
Sourcepub fn ret_gadget(&self) -> Option<&Gadget>
pub fn ret_gadget(&self) -> Option<&Gadget>
get preferred ret gadget (in kernel32)
Sourcepub fn get_by_type(&self, gadget_type: GadgetType) -> &[Gadget]
pub fn get_by_type(&self, gadget_type: GadgetType) -> &[Gadget]
get all gadgets of a specific type
Sourcepub fn get_by_module(&self, module_name: &str) -> &[Gadget]
pub fn get_by_module(&self, module_name: &str) -> &[Gadget]
get all gadgets in a specific module
Sourcepub fn any_jmp_gadget(&self) -> Option<&Gadget>
pub fn any_jmp_gadget(&self) -> Option<&Gadget>
get first available jmp gadget (tries rbx, then rax)
Sourcepub fn find_by_pattern(&self, pattern: &GadgetPattern) -> Vec<&Gadget>
pub fn find_by_pattern(&self, pattern: &GadgetPattern) -> Vec<&Gadget>
search gadgets using a pattern
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GadgetCache
impl RefUnwindSafe for GadgetCache
impl Send for GadgetCache
impl Sync for GadgetCache
impl Unpin for GadgetCache
impl UnwindSafe for GadgetCache
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