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
#[cfg(feature = "certificate")]
pub mod certificate;
pub mod code;
pub mod manifest;
#[cfg(feature = "certificate")]
use crate::print_warning;
use crate::{results::Results, Config};
pub fn static_analysis<S: AsRef<str>>(config: &Config, package: S, results: &mut Results) {
if config.is_verbose() {
println!(
"It's time to analyze the application. First, a static analysis will be performed, \
starting with the AndroidManifest.xml file and then going through the actual code. \
Let's start!"
);
}
let manifest = manifest::analysis(config, package.as_ref(), results);
#[cfg(feature = "certificate")]
{
if let Err(e) = certificate::analysis(config, package.as_ref(), results) {
print_warning(format!(
"there was an error analyzing the certificate: {}",
e
))
}
}
code::analysis(manifest, config, package.as_ref(), results)
}