fix bug in qlie 3.0 unpack

This commit is contained in:
2026-04-04 16:49:07 +08:00
parent ea3c764360
commit 90db67de1b

View File

@@ -980,22 +980,12 @@ pub fn find_key_data(filename: &str) -> Result<Option<Vec<u8>>> {
if entry.file_type()?.is_file() {
if let Some(ext) = entry.path().extension() {
if ext.eq_ignore_ascii_case("exe") {
match get_key_data_from_exe(&entry.path()) {
Ok(key) => {
eprintln!(
"Found key data in executable: {}",
entry.path().display()
);
return Ok(Some(key));
}
Err(e) => {
eprintln!(
"Failed to get key data from executable {}: {}\n{}",
entry.path().display(),
e,
e.backtrace(),
);
}
if let Ok(key) = get_key_data_from_exe(&entry.path()) {
eprintln!(
"Found key data in executable: {}",
entry.path().display()
);
return Ok(Some(key));
}
}
}
@@ -1072,6 +1062,9 @@ impl Encryption for Encryption30 {
if self.key.is_none() || entry.common_key.is_none() {
return Ok(Box::new(Decrypter::new(stream, entry.key, entry.size)));
}
if entry.is_encrypted == 0 {
return Ok(Box::new(stream));
}
return Ok(Box::new(Encryption30Decrypt::new(
stream,
&entry.raw_name,