From 36bde3a802f64c05d22e78375914767fa59046b3 Mon Sep 17 00:00:00 2001 From: theubusu <80545678+theubusu@users.noreply.github.com> Date: Mon, 22 Dec 2025 23:08:17 +0100 Subject: [PATCH] mtk_pkg_old: fix mistake in iMtK parsing The slice was copied from mtk_pkg which is incorrect for mtk_pkg_old as it doesnt contain the crypted headers --- src/formats/mtk_pkg_old.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/formats/mtk_pkg_old.rs b/src/formats/mtk_pkg_old.rs index 50ca71c..4ca6b06 100644 --- a/src/formats/mtk_pkg_old.rs +++ b/src/formats/mtk_pkg_old.rs @@ -98,7 +98,7 @@ pub fn extract_mtk_pkg_old(mut file: &File, output_folder: &str) -> Result<(), B //strip iMtK thing and get version let extra_header_len = if &out_data[0..4] == b"iMtK" { let imtk_len = u32::from_le_bytes(out_data[4..8].try_into().unwrap()); - if &out_data[56..60] != b"iPAd" { + if &out_data[8..12] != b"iPAd" { let version_len = u32::from_le_bytes(out_data[8..12].try_into().unwrap()); let version = common::string_from_bytes(&out_data[12..12 + version_len as usize]); println!("- Version: {}", version);