[−][src]Struct checksec::elf::ElfCheckSecResults
Checksec result struct for ELF32/64 binaries
Example
use checksec::elf::ElfCheckSecResults; use goblin::elf::Elf; use std::fs; pub fn print_results(binary: &String) { if let Ok(fp) = fs::File::open(&binary) { if let Ok(buf) = fs::read(fp) { if let Ok(elf) = Elf::parse(&buf) { println!("{:#?}", ElfCheckSecResults::parse(&elf)); } } } }
Fields
canary: bool
Stack Canary (CFLAGS=-fstack-protector*
)
clang_cfi: bool
Clang Control Flow Integrity (CFLAGS=-fsanitize=cfi-*
)
clang_safestack: bool
Clang SafeStack (CFLAGS=-fsanitize=safe-stack
)
fortify: bool
Fortify (CFLAGS=-D_FORTIFY_SOURCE
)
fortified: u32
Fortified functions
nx: bool
No Execute
pie: PIE
Position Inpendent Executable (CFLAGS=-pie -fPIE
)
relro: Relro
Relocation Read-Only
rpath: VecRpath
Run-time search path (DT_RPATH
)
runpath: VecRpath
Run-time search path (DT_RUNTIME
)
Methods
impl ElfCheckSecResults
[src]
pub fn parse(elf: &Elf) -> ElfCheckSecResults
[src]
Trait Implementations
impl Debug for ElfCheckSecResults
[src]
impl<'de> Deserialize<'de> for ElfCheckSecResults
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Display for ElfCheckSecResults
[src]
impl Serialize for ElfCheckSecResults
[src]
Auto Trait Implementations
impl RefUnwindSafe for ElfCheckSecResults
impl Send for ElfCheckSecResults
impl Sync for ElfCheckSecResults
impl Unpin for ElfCheckSecResults
impl UnwindSafe for ElfCheckSecResults
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,