pub enum GadgetType {
}Expand description
type of gadget instruction sequence
Variants§
JmpRbx
jmp rbx - jump to address in rbx
JmpRax
jmp rax - jump to address in rax
JmpRcx
jmp rcx - jump to address in rcx
JmpRdx
jmp rdx - jump to address in rdx
JmpR8
jmp r8 - jump to address in r8
JmpR9
jmp r9 - jump to address in r9
JmpIndirectRbx
jmp [rbx] - indirect jump through rbx
JmpIndirectRax
jmp [rax] - indirect jump through rax
CallRbx
call rbx - call address in rbx
CallRax
call rax - call address in rax
Ret
ret - simple return
AddRspRet
add rsp, N; ret - stack cleanup before return
PopRet
pop reg; ret - pop register then return
PushRbxRet
push rbx; ret - push rbx onto stack and return (for setting up returns)
Implementations§
Source§impl GadgetType
impl GadgetType
Sourcepub fn from_pattern(pattern: &str) -> Option<GadgetPattern>
pub fn from_pattern(pattern: &str) -> Option<GadgetPattern>
parse a gadget type from a pattern string supports wildcards: “jmp ???” matches any jmp reg
Trait Implementations§
Source§impl Clone for GadgetType
impl Clone for GadgetType
Source§fn clone(&self) -> GadgetType
fn clone(&self) -> GadgetType
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 GadgetType
impl Debug for GadgetType
Source§impl Hash for GadgetType
impl Hash for GadgetType
Source§impl PartialEq for GadgetType
impl PartialEq for GadgetType
impl Copy for GadgetType
impl Eq for GadgetType
impl StructuralPartialEq for GadgetType
Auto Trait Implementations§
impl Freeze for GadgetType
impl RefUnwindSafe for GadgetType
impl Send for GadgetType
impl Sync for GadgetType
impl Unpin for GadgetType
impl UnwindSafe for GadgetType
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