detect apk signatur
This commit is contained in:
parent
98f00c4066
commit
fafbdb6537
3 changed files with 138 additions and 6 deletions
|
|
@ -2,12 +2,26 @@ use apk_frauder::ZipFile;
|
|||
use std::fs::File;
|
||||
|
||||
fn main() {
|
||||
//let file = File::open("app-release.apk").expect("failed to open file");
|
||||
let file = File::open("tst_64.zip").expect("failed to open file");
|
||||
let file = File::open("app-release.apk").expect("failed to open file");
|
||||
//let file = File::open("tst_64.zip").expect("failed to open file");
|
||||
let zip_file = ZipFile::new(file);
|
||||
println!("{}", zip_file.get_file_names().join("\n"));
|
||||
println!(
|
||||
//println!("{}", zip_file.get_file_names().join("\n"));
|
||||
/*println!(
|
||||
"uncompressed size: {}",
|
||||
zip_file.files[0].get_uncompressed_size()
|
||||
);*/
|
||||
println!(
|
||||
"{}",
|
||||
zip_file
|
||||
.get_jar_sig_files()
|
||||
.iter()
|
||||
.map(|f| f.get_name())
|
||||
.collect::<Vec<_>>()
|
||||
.join("\n")
|
||||
);
|
||||
if zip_file.is_signed_v2() {
|
||||
println!("Signed >= v2");
|
||||
} else {
|
||||
println!("Not signed whith scheme >= v2");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue