pub enum GadgetPattern {
Jmp(Register),
JmpIndirect(Register),
JmpAny,
JmpIndirectAny,
Call(Register),
CallAny,
Ret,
AddRspRet,
PopRet(Register),
PopRetAny,
Any,
AnyWithReg(Register),
}Expand description
pattern for gadget matching (supports wildcards)
Variants§
Jmp(Register)
jmp reg
JmpIndirect(Register)
jmp [reg]
JmpAny
any jmp (wildcard)
JmpIndirectAny
any jmp [reg] (wildcard)
Call(Register)
call reg
CallAny
any call (wildcard)
Ret
ret
AddRspRet
add rsp, N; ret
PopRet(Register)
pop reg; ret
PopRetAny
any pop; ret
Any
match any gadget
AnyWithReg(Register)
match any gadget using specific register
Implementations§
Source§impl GadgetPattern
impl GadgetPattern
Sourcepub fn matches(&self, gadget: &GadgetType) -> bool
pub fn matches(&self, gadget: &GadgetType) -> bool
check if a gadget type matches this pattern
Sourcepub fn matching_types(&self) -> Vec<GadgetType>
pub fn matching_types(&self) -> Vec<GadgetType>
get all concrete gadget types matching this pattern
Trait Implementations§
Source§impl Clone for GadgetPattern
impl Clone for GadgetPattern
Source§fn clone(&self) -> GadgetPattern
fn clone(&self) -> GadgetPattern
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GadgetPattern
impl Debug for GadgetPattern
Source§impl PartialEq for GadgetPattern
impl PartialEq for GadgetPattern
impl Copy for GadgetPattern
impl Eq for GadgetPattern
impl StructuralPartialEq for GadgetPattern
Auto Trait Implementations§
impl Freeze for GadgetPattern
impl RefUnwindSafe for GadgetPattern
impl Send for GadgetPattern
impl Sync for GadgetPattern
impl Unpin for GadgetPattern
impl UnwindSafe for GadgetPattern
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