mirror of
https://github.com/Ap0dexMe0/unixtract.git
synced 2026-07-16 05:04:22 +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, Cursor, Seek, SeekFrom};
|
||||
use binrw::BinReaderExt;
|
||||
|
||||
use crate::utils::common;
|
||||
use crate::utils::global::opt_dump_dec_hdr;
|
||||
use crate::utils::aes::{decrypt_aes128_cbc_nopad};
|
||||
use crate::keys;
|
||||
use crate::formats::mtk_pkg::lzhs::{decompress_lzhs_fs_file2file};
|
||||
@@ -55,6 +56,7 @@ pub fn extract_mtk_pkg_new(app_ctx: &AppContext, ctx: Box<dyn Any>) -> Result<()
|
||||
let key_array = ctx.matching_key_key;
|
||||
let iv_array = ctx.matching_key_iv;
|
||||
let header = ctx.decrypted_header;
|
||||
opt_dump_dec_hdr(app_ctx, &header, "header")?;
|
||||
|
||||
let mut hdr_reader = Cursor::new(header);
|
||||
let hdr: Header = hdr_reader.read_le()?;
|
||||
|
||||
Reference in New Issue
Block a user