pub(crate) struct CmdlineArgs {
    pub(crate) binary: Option<String>,
    pub(crate) config: Option<String>,
    pub(crate) out: Option<String>,
    pub(crate) partial: Option<String>,
    pub(crate) json: bool,
    pub(crate) quiet: bool,
    pub(crate) verbose: bool,
    pub(crate) statistics: bool,
    pub(crate) bare_metal_config: Option<String>,
    pub(crate) module_versions: bool,
    pub(crate) debug: Option<CliDebugMode>,
    pub(crate) pcode_raw: Option<String>,
}
Expand description

Find vulnerable patterns in binary executables

Fields§

§binary: Option<String>

The path to the binary.

§config: Option<String>

Path to a custom configuration file to use instead of the standard one.

§out: Option<String>

Write the results to a file instead of stdout. This only affects CWE warnings. Log messages are still printed to stdout.

§partial: Option<String>

Specify a specific set of checks to be run as a comma separated list, e.g. ‘CWE332,CWE476,CWE782’.

Use the “–module-versions” command line option to get a list of all valid check names.

§json: bool

Generate JSON output.

§quiet: bool

Do not print log messages. This prevents polluting stdout for json output.

§verbose: bool

Print additional debug log messages.

§statistics: bool

Include various statistics in the log messages. This can be helpful for assessing the analysis quality for the input binary.

§bare_metal_config: Option<String>

Path to a configuration file for analysis of bare metal binaries.

If this option is set then the input binary is treated as a bare metal binary regardless of its format.

§module_versions: bool

Prints out the version numbers of all known modules.

§debug: Option<CliDebugMode>

Output for debugging purposes. The current behavior of this flag is unstable and subject to change.

§pcode_raw: Option<String>

Read the saved output of the Pcode Extractor plugin from a file instead of invoking Ghidra.

Trait Implementations§

source§

impl Args for CmdlineArgs

source§

fn group_id() -> Option<Id>

Report the [ArgGroup::id][crate::ArgGroup::id] for this set of arguments
source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to [Command] so it can instantiate Self. Read more
source§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to [Command] so it can update self. Read more
source§

impl CommandFactory for CmdlineArgs

source§

fn command<'b>() -> Command

Build a [Command] that can instantiate Self. Read more
source§

fn command_for_update<'b>() -> Command

Build a [Command] that can update self. Read more
source§

impl Debug for CmdlineArgs

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<&CmdlineArgs> for Settings

source§

fn from(args: &CmdlineArgs) -> Self

Converts to this type from the input type.
source§

impl FromArgMatches for CmdlineArgs

source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches ) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches ) -> Result<(), Error>

Assign values from ArgMatches to self.
source§

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches ) -> Result<(), Error>

Assign values from ArgMatches to self.
source§

impl Parser for CmdlineArgs

§

fn parse() -> Self

Parse from std::env::args_os(), exit on error
§

fn try_parse() -> Result<Self, Error>

Parse from std::env::args_os(), return Err on error.
§

fn parse_from<I, T>(itr: I) -> Self
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, exit on error
§

fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, return Err on error.
§

fn update_from<I, T>(&mut self, itr: I)
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, exit on error
§

fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, return Err on error.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.