[−][src]Struct super_analyzer_core::Config
Config structure.
Contains configuration related fields. It is used for storing the configuration parameters and
checking their values. Implements the Default trait.
Fields
app_packages: Vec<PathBuf>Application packages to analyze.
verbose: boolBoolean to represent --verbose mode.
quiet: boolBoolean to represent --quiet mode.
overall_force: boolBoolean to represent overall --force mode.
force: boolBoolean to represent current --force mode.
bench: boolBoolean to represent --bench mode.
open: boolBoolean to represent --open mode.
json: boolBoolean to represent --json mode.
html: boolBoolean to represent --html mode.
min_criticality: CriticalityMinimum criticality to analyze
threads: usizeNumber of threads.
downloads_folder: PathBufFolder where the applications are stored.
dist_folder: PathBufFolder with files from analyzed applications.
results_folder: PathBufFolder to store the results of analysis.
dex2jar_folder: PathBufPath to the Dex2jar binaries.
jd_cmd_file: PathBufPath to the JD_CMD binary.
rules_json: PathBufPath to the rules.json file.
templates_folder: PathBufThe folder where the templates are stored.
template: StringThe name of the template to use.
unknown_permission: (Criticality, String)Represents an unknown permission.
permissions: BTreeSet<Permission>List of permissions to analyze.
loaded_files: Vec<PathBuf>Checker for the loaded files
Methods
impl Config[src]
pub fn from_file<P: AsRef<Path>>(config_path: P) -> Result<Self, Error>[src]
Creates a new Config struct.
pub fn decorate_with_cli(
&mut self,
cli: &ArgMatches<'static>
) -> Result<(), Error>[src]
&mut self,
cli: &ArgMatches<'static>
) -> Result<(), Error>
Decorates the loaded config with the given flags from CLI
fn set_options(&mut self, cli: &ArgMatches<'static>)[src]
Modifies the options from the CLI.
fn read_apks(&mut self) -> Result<(), Error>[src]
Reads all the apk files in the downloads folder and adds them to the configuration.
pub fn check(&self) -> bool[src]
Checks if all the needed folders and files exist.
pub fn errors(&self) -> Vec<String>[src]
Returns the folders and files that do not exist.
pub fn loaded_config_files(&self) -> VecIter<PathBuf>[src]
Returns the currently loaded config files.
pub fn app_packages(&self) -> Vec<PathBuf>[src]
Returns the app package.
pub(crate) fn add_app_package<P: AsRef<Path>>(&mut self, app_package: P)[src]
Adds a package to check.
pub fn is_verbose(&self) -> bool[src]
Returns true if the application is running in --verbose mode, false otherwise.
pub fn is_quiet(&self) -> bool[src]
Returns true if the application is running in --quiet mode, false otherwise.
pub fn is_force(&self) -> bool[src]
Returns true if the application is running in --force mode, false otherwise.
pub fn set_force(&mut self)[src]
Sets the application to force recreate the analysis files and results temporarily.
pub fn reset_force(&mut self)[src]
Resets the --force option, so that it gets reset to the configured force option.
pub fn is_bench(&self) -> bool[src]
Returns true if the application is running in --bench mode, false otherwise.
pub fn is_open(&self) -> bool[src]
Returns true if the application is running in --open mode, false otherwise.
pub fn has_to_generate_json(&self) -> bool[src]
Returns true if the application has to generate result in JSON format.
pub fn has_to_generate_html(&self) -> bool[src]
Returns true if the application has to generate result in HTML format.
pub fn min_criticality(&self) -> Criticality[src]
Returns the min_criticality field.
pub fn threads(&self) -> usize[src]
Returns the threads field.
pub fn dist_folder(&self) -> &Path[src]
Returns the path to the dist_folder.
pub fn results_folder(&self) -> &Path[src]
Returns the path to the results_folder.
pub fn dex2jar_folder(&self) -> &Path[src]
Returns the path to the dex2jar_folder.
pub fn jd_cmd_file(&self) -> &Path[src]
Returns the path to the jd_cmd_file.
pub fn template_path(&self) -> PathBuf[src]
Gets the path to the template.
pub fn templates_folder(&self) -> &Path[src]
Gets the path to the templates folder.
pub fn template_name(&self) -> &str[src]
Gets the name of the template.
pub fn rules_json(&self) -> &Path[src]
Returns the path to the rules_json.
pub fn unknown_permission_criticality(&self) -> Criticality[src]
Returns the criticality of the unknown_permission field.
pub fn unknown_permission_description(&self) -> &str[src]
Returns the description of the unknown_permission field.
pub fn permissions(&self) -> Iter<Permission>[src]
Returns the loaded permissions.
fn local_default() -> Self[src]
Returns the default Config struct.
Trait Implementations
impl Default for Config[src]
impl Debug for Config[src]
impl<'de> Deserialize<'de> for Config where
Config: Default, [src]
Config: Default,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
__D: Deserializer<'de>,
fn deserialize_in_place<D>(
deserializer: D,
place: &mut Self
) -> Result<(), <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>, [src]
deserializer: D,
place: &mut Self
) -> Result<(), <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
Auto Trait Implementations
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
impl RefUnwindSafe for Config
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> From<T> for T[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
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> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>, [src]
T: Deserialize<'de>,
impl<T> Same<T> for T[src]
type Output = T
Should always be Self