mirror of
https://github.com/Ap0dexMe0/unixtract.git
synced 2026-07-16 05:04:22 +02:00
Consistency cleanup + add MSD11 and SDDL.SEC extractors
This commit is contained in:
@@ -85,7 +85,7 @@ pub fn extract_samsung_old(path: &PathBuf, output_folder: &str) -> Result<(), Bo
|
||||
let file = File::open(&path)?;
|
||||
let filename = path.file_name().unwrap().to_str().unwrap();
|
||||
let file_size = file.metadata()?.len();
|
||||
println!("- File: {}", filename);
|
||||
println!("\nFile: {}", filename);
|
||||
let data = common::read_file(&file, 0, file_size.try_into().unwrap())?;
|
||||
let salt = &data[8..16];
|
||||
|
||||
@@ -126,7 +126,7 @@ pub fn extract_samsung_old(path: &PathBuf, output_folder: &str) -> Result<(), Bo
|
||||
//println!("IV: {:02x?}", iv_md5);
|
||||
|
||||
let end = file_size - 260;
|
||||
println!("-- Decrypting file...");
|
||||
println!("- Decrypting file...");
|
||||
let decrypted_data = decrypt_aes(&data[16..end.try_into().unwrap()], &key_md5, &iv_md5)?;
|
||||
|
||||
println!("-- DeXORing file...");
|
||||
@@ -142,13 +142,14 @@ pub fn extract_samsung_old(path: &PathBuf, output_folder: &str) -> Result<(), Bo
|
||||
.open(output_path)?;
|
||||
|
||||
out_file.write_all(&out_data)?;
|
||||
|
||||
println!("--- Saved file!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
println!();
|
||||
println!("Extraction finished!");
|
||||
println!("\nExtraction finished!");
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user