mirror of
https://github.com/Ap0dexMe0/unixtract.git
synced 2026-07-15 21:00:03 +02:00
add dump_dec_hdrs option + fix header offset in old_mtk_pkg
This commit is contained in:
@@ -8,6 +8,7 @@ use std::io::{Write, Seek, SeekFrom, Cursor};
|
||||
use binrw::BinReaderExt;
|
||||
|
||||
use crate::utils::common;
|
||||
use crate::utils::global::opt_dump_dec_hdr;
|
||||
use crate::keys;
|
||||
use crate::formats::epk::{decrypt_aes_ecb_auto, find_key};
|
||||
use include::*;
|
||||
@@ -45,6 +46,8 @@ pub fn extract_epk2(app_ctx: &AppContext, _ctx: Box<dyn Any>) -> Result<(), Box<
|
||||
println!("Found valid key: {}", key_name);
|
||||
matching_key = Some(key_bytes);
|
||||
header = decrypt_aes_ecb_auto(matching_key.as_ref().unwrap(), &stored_header)?;
|
||||
opt_dump_dec_hdr(app_ctx, &header, "header")?;
|
||||
|
||||
} else {
|
||||
return Err("No valid key found!".into());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user