1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//! ![checksec](https://raw.githubusercontent.com/etke/checksec.rs/master/resources/checksec.svg?sanitize=true)
//!
//! Checksec is a standalone command line utility and library that provides
//! binary executable security-oriented property checks for ELF, PE, and MachO
//! executables.
//!
//! **Structures**
//!
//! The full checksec results can be retrieved from the implemented
//! `*CheckSecResult` structures for a given binary by passing a
//! [goblin::Object](https://docs.rs/goblin/latest/goblin/enum.Object.html)
//! object to the parse method.
//!
//! * [checksec::elf::ElfCheckSecResults](./elf/struct.ElfCheckSecResults.html)
//! * [checksec::macho::MachOCheckSecResults](./macho/struct.MachOCheckSecResults.html)
//! * [checksec::pe::PECheckSecResults](./pe/struct.PECheckSecResults.html)
//!
//! ```rust
//! use checksec::elf::ElfCheckSecResults;
//! use checksec::macho::MachOCheckSecResults;
//! use checksec::pe::PECheckSecResults;
//! ```
//!
//! **Traits**
//!
//! Add the associated `*Properties` trait to the imports as shown below to
//! have direct access to the security property check functions for a given
//! binary executable format.
//!
//! * [checksec::elf::ElfProperties](./elf/trait.ElfProperties.html)
//! * [checksec::macho::MachOProperties](./macho/trait.MachOProperties.html)
//! * [checksec::pe::PEProperties](./pe/trait.PEProperties.html)
//!
//! ```rust
//! use checksec::elf::ElfProperties;
//! use checksec::macho::MachOProperties;
//! use checksec::pe::PEProperties;
//! ```
//!
//! Refer to the generated docs or the examples directory
//! [examples/](https://github.com/etke/checksec.rs/tree/master/examples)
//! for examples of working with both `*Properties` traits and
//! `*CheckSecResults` structs.
//!
#[cfg(feature = "elf")]
pub mod elf;
#[cfg(feature = "macho")]
pub mod macho;
#[cfg(feature = "pe")]
pub mod pe;
#[cfg(feature = "shared")]
#[macro_use]
pub mod shared;
#[cfg(feature = "color")]
pub mod color;