pub struct ScanRequest {Show 22 fields
pub depth: usize,
pub rop: bool,
pub jop: bool,
pub sys: bool,
pub multibr: bool,
pub only: Option<String>,
pub filter: Option<String>,
pub range: Option<String>,
pub badbytes: Option<String>,
pub offset: Option<String>,
pub base: Option<String>,
pub section: Vec<String>,
pub thumb: bool,
pub cfg_aware: bool,
pub align: Option<usize>,
pub call_preceded: bool,
pub all: bool,
pub noinstr: bool,
pub arch: Option<String>,
pub max_gadgets: Option<usize>,
pub max_memory: Option<usize>,
pub compat: bool,
}Expand description
The shared request layer, re-exported so that rf_cli::ScanRequest and
rf_api::ScanRequest stay one type and every existing use rf_cli::…
keeps compiling. The definitions live in rf-api.
Scan inputs at the same string level as the CLI flags, so both front
ends share parsing and validation.
Fields§
§depth: usize--depth: how many bytes back from an anchor a gadget may start.
rop: boolSearch the ROP anchor table (--norop clears it).
jop: boolSearch the JOP anchor table (--nojop clears it).
sys: boolSearch the SYS anchor table (--nosys clears it).
multibr: bool--multibr: allow branches in the middle of a gadget.
only: Option<String>--only: a |-separated mnemonic set; every instruction must match.
filter: Option<String>--filter: a |-separated regex alternation, full-matched against
each mnemonic; a gadget with a match is dropped.
range: Option<String>--range: "0xSTART-0xEND". "0x0-0x0" means no range.
badbytes: Option<String>--badbytes: "bb|bb|lo-hi", rejected in the FINAL address.
offset: Option<String>--offset (hex): added to gadget addresses at emission.
base: Option<String>--base (hex): the image base to rebase to before scanning.
section: Vec<String>--section: glob patterns naming the executable sections to scan.
thumb: bool--thumb: decode 32-bit ARM in T32 mode.
cfg_aware: boolCFG/CET-aware scan (Phase 4b): keep only endbr64/endbr32-entering gadgets.
align: Option<usize>ROPgadget –align: anchor-stepping alignment override (engine semantics, gadgets.py:66-67 — NOT a post-filter).
call_preceded: boolROPgadget –callPreceded: capture prev bytes for the CLI filter.
all: boolROPgadget –all: skip dedup.
noinstr: boolROPgadget –noinstr: skip dedup and sort; print bare addresses.
arch: Option<String>Fat Mach-O slice selection (CORE-03/CORE-05), as the --arch
spelling (x86_64, arm64, …). None on a multi-slice container
is a REFUSAL, not a guess.
max_gadgets: Option<usize>PERF-05 --max-gadgets: abort with a budget error once this many
gadgets have been accepted. None = unbounded.
max_memory: Option<usize>PERF-05 --max-memory: abort with a budget error once the retained
gadgets are estimated to exceed this many heap bytes.
compat: bool--compat: reproduce ROPgadget bug-for-bug where rop-finder
deliberately differs (today: scan a multi-slice fat Mach-O as the
concatenation instead of refusing it).
Trait Implementations§
Source§impl Clone for ScanRequest
impl Clone for ScanRequest
Source§fn clone(&self) -> ScanRequest
fn clone(&self) -> ScanRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ScanRequest
impl Debug for ScanRequest
Source§impl Default for ScanRequest
impl Default for ScanRequest
Source§fn default() -> ScanRequest
fn default() -> ScanRequest
Auto Trait Implementations§
impl Freeze for ScanRequest
impl RefUnwindSafe for ScanRequest
impl Send for ScanRequest
impl Sync for ScanRequest
impl Unpin for ScanRequest
impl UnsafeUnpin for ScanRequest
impl UnwindSafe for ScanRequest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more