pub struct RegionView {
pub endian: Endianness,
pub base: u64,
pub entry: u64,
pub regions: Vec<Section>,
pub named_exec: Vec<Section>,
pub universal: bool,
/* private fields */
}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.
Format-agnostic scan view over a loaded image.
For single-image binaries regions is exactly the image’s
exec_scan_regions() (ROPgadget parity path). For Universal binaries
ROPgadget UNIVERSAL semantics apply (loaders/universal.py:77-108): the
exec regions of every slice concatenated into one scan, using the FIRST
slice’s arch/mode/endianness — getArch/getArchMode/getEndian “just
return whatever is in the first binary”.
named_exec holds the named executable sections (exec_sections())
used by --section filtering and by the JSON section field. When
--section is given, regions is replaced with the matching subset of
named_exec.
Fields§
§endian: EndiannessThe byte order gadgets are decoded with.
base: u64The view’s image base, after any --base rebase.
entry: u64The image’s entry point, after any --base rebase.
regions: Vec<Section>The regions the scanner walks. Replaced by the --section subset
when --section was given.
named_exec: Vec<Section>Every named executable section, for --section matching and for the
JSON section field.
universal: boolTrue for Universal (multi-slice) binaries (JSON arch field).
Trait Implementations§
Source§impl Image for RegionView
impl Image for RegionView
Source§fn rebase(&mut self, new_base: u64)
fn rebase(&mut self, new_base: u64)
Uniform slide of the whole view (for Universal: all slices slide by the same delta — our –base extension; ROPgadget has no –base for Universal).
Source§fn endianness(&self) -> Endianness
fn endianness(&self) -> Endianness
Source§fn image_base(&self) -> u64
fn image_base(&self) -> u64
Source§fn entry(&self) -> u64
fn entry(&self) -> u64
Source§fn exec_sections(&self) -> Vec<&Section>
fn exec_sections(&self) -> Vec<&Section>
--section filtering).Source§fn exec_scan_regions(&self) -> &[Section]
fn exec_scan_regions(&self) -> &[Section]
Source§fn addr_size(&self) -> usize
fn addr_size(&self) -> usize
Arch::addr_size.Auto Trait Implementations§
impl Freeze for RegionView
impl RefUnwindSafe for RegionView
impl Send for RegionView
impl Sync for RegionView
impl Unpin for RegionView
impl UnsafeUnpin for RegionView
impl UnwindSafe for RegionView
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> 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