pub struct EXE<'a> {
pub is64bit: bool,
pub has_overlay: Option<bool>,
pub arch: Architecture,
pub sub_type: SubType,
pub os: OperatingSystem,
pub coff_header: Option<COFFHeader>,
pub optional_header: Option<OptionalHeader>,
pub exec_type: ExecutableType,
pub subsystem: Option<SubSystem>,
pub sections: Option<Vec<Section<'a>>>,
pub imports: Option<Imports>,
pub contents: &'a [u8],
}pe32 only.Expand description
The struct to partially represent EXE files.
Used on Windows, DOS, React OS, OS/2, and maybe others.
Effort is made to fail gracefully, since malware may not obey all the rules, and some information is better than none because some part of the data wasn’t parsed correctly.
Fields§
§is64bit: boolIf the program is 64-bit
has_overlay: Option<bool>If the binary has extra data after the last section, could be used to hide something
arch: ArchitectureInstruction set architecture for this binary
sub_type: SubTypeEXE sub-type, mostly if it’s for DOS, Windows, OS/2
os: OperatingSystemOperating System for this binary, likely Windows
coff_header: Option<COFFHeader>COFF (Common Object File Format) header of the program
optional_header: Option<OptionalHeader>Optional Header for this program, not optional if for Windows
exec_type: ExecutableTypeExecutable subtype: Program or Library?
subsystem: Option<SubSystem>Windows Subsystem used by this program
sections: Option<Vec<Section<'a>>>Sections of this binary
imports: Option<Imports>External libraries used by this application or library
contents: &'a [u8]The array containing the raw bytes used to parse this program
Implementations§
Trait Implementations§
Source§impl ExecutableFile for EXE<'_>
impl ExecutableFile for EXE<'_>
Source§fn architecture(&self) -> Option<Architecture>
fn architecture(&self) -> Option<Architecture>
Source§fn pointer_size(&self) -> usize
fn pointer_size(&self) -> usize
Source§fn operating_system(&self) -> OperatingSystem
fn operating_system(&self) -> OperatingSystem
Source§fn compiled_timestamp(&self) -> Option<DateTime<Utc>>
fn compiled_timestamp(&self) -> Option<DateTime<Utc>>
Source§fn num_sections(&self) -> u32
fn num_sections(&self) -> u32
Source§fn import_hash(&self) -> Option<String>
fn import_hash(&self) -> Option<String>
Source§fn fuzzy_imports(&self) -> Option<String>
fn fuzzy_imports(&self) -> Option<String>
SSDeep fuzzy hash of the binaryAuto Trait Implementations§
impl<'a> Freeze for EXE<'a>
impl<'a> RefUnwindSafe for EXE<'a>
impl<'a> Send for EXE<'a>
impl<'a> Sync for EXE<'a>
impl<'a> Unpin for EXE<'a>
impl<'a> UnwindSafe for EXE<'a>
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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