pub struct Pattern(_);
Expand description
Memory pattern
Implementations
sourceimpl Pattern
impl Pattern
sourcepub fn from_ida_style(pat: impl AsRef<str>) -> Self
pub fn from_ida_style(pat: impl AsRef<str>) -> Self
Parses ida style pattern.
Panics
Panics if pattern of invalid style was supplied or failed to parse a byte.
let ida_pat = Pattern::from_ida_style("48 89 85 F0 00 00 00 4C 8B ? ? ? ? ? 48 8D");
sourcepub fn try_from_ida_style(pat: impl AsRef<str>) -> Result<Self, FaitheError>
pub fn try_from_ida_style(pat: impl AsRef<str>) -> Result<Self, FaitheError>
Parses ida style pattern. Same as Self::from_ida_style
but no panics.
Panics
Panics if pattern of invalid style was supplied or failed to parse a byte.
let ida_pat = Pattern::from_ida_style("48 89 85 F0 00 00 00 4C 8B ? ? ? ? ? 48 8D");
sourcepub fn from_peid_style(pat: impl AsRef<str>) -> Self
pub fn from_peid_style(pat: impl AsRef<str>) -> Self
Parses PEiD style pattern.
Panics
Panics if pattern of invalid style was supplied or failed to parse a byte.
let peid_pat = Pattern::from_peid_style("48 89 85 F0 00 00 00 4C 8B ?? ?? ?? ?? ?? 48 8D");
sourcepub fn try_from_peid_style(pat: impl AsRef<str>) -> Result<Self, FaitheError>
pub fn try_from_peid_style(pat: impl AsRef<str>) -> Result<Self, FaitheError>
Parses PEiD style pattern.
Panics
Panics if pattern of invalid style was supplied or failed to parse a byte.
let peid_pat = Pattern::from_peid_style("48 89 85 F0 00 00 00 4C 8B ?? ?? ?? ?? ?? 48 8D");
sourcepub fn from_code_style(pat: &[u8], mask: &[u8]) -> Self
pub fn from_code_style(pat: &[u8], mask: &[u8]) -> Self
Parses code style pattern.
Panics
Panics if length os mask is not equal to the length of the pattern.
let code_pat = Pattern::from_code_style(
b"\x48\x89\x85\xF0\x00\x00\x00\x4C\x8B\x00\x00\x00\x00\x00\x48\x8D",
b"xxxxxxxxx?????xx"
);
sourcepub fn try_from_code_style(pat: &[u8], mask: &[u8]) -> Result<Self, FaitheError>
pub fn try_from_code_style(pat: &[u8], mask: &[u8]) -> Result<Self, FaitheError>
Parses code style pattern.
Panics
Panics if length os mask is not equal to the length of the pattern.
let code_pat = Pattern::from_code_style(
b"\x48\x89\x85\xF0\x00\x00\x00\x4C\x8B\x00\x00\x00\x00\x00\x48\x8D",
b"xxxxxxxxx?????xx"
);
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Pattern
impl Send for Pattern
impl Sync for Pattern
impl Unpin for Pattern
impl UnwindSafe for Pattern
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more