Stop executing AppImages during analysis, add screenshot lightbox and favicons
This commit is contained in:
@@ -155,17 +155,11 @@ fn version_from_soname(soname: &str) -> Option<String> {
|
||||
|
||||
/// Extract the list of shared libraries bundled inside an AppImage.
|
||||
pub fn inventory_bundled_libraries(appimage_path: &Path) -> Vec<BundledLibrary> {
|
||||
// Get squashfs offset
|
||||
let offset_output = Command::new(appimage_path)
|
||||
.arg("--appimage-offset")
|
||||
.env("APPIMAGE_EXTRACT_AND_RUN", "1")
|
||||
.output();
|
||||
|
||||
let offset = match offset_output {
|
||||
Ok(out) if out.status.success() => {
|
||||
String::from_utf8_lossy(&out.stdout).trim().to_string()
|
||||
}
|
||||
_ => return Vec::new(),
|
||||
// Get squashfs offset via binary scan (never execute the AppImage -
|
||||
// some apps like Affinity have custom AppRun scripts that ignore flags)
|
||||
let offset = match crate::core::inspector::find_squashfs_offset_for(appimage_path) {
|
||||
Some(o) => o.to_string(),
|
||||
None => return Vec::new(),
|
||||
};
|
||||
|
||||
// Use unsquashfs to list all files with details
|
||||
@@ -250,18 +244,9 @@ pub fn detect_version_from_binary(
|
||||
appimage_path: &Path,
|
||||
lib_file_path: &str,
|
||||
) -> Option<String> {
|
||||
// Get squashfs offset
|
||||
let offset_output = Command::new(appimage_path)
|
||||
.arg("--appimage-offset")
|
||||
.env("APPIMAGE_EXTRACT_AND_RUN", "1")
|
||||
.output()
|
||||
.ok()?;
|
||||
|
||||
if !offset_output.status.success() {
|
||||
return None;
|
||||
}
|
||||
|
||||
let offset = String::from_utf8_lossy(&offset_output.stdout).trim().to_string();
|
||||
// Get squashfs offset via binary scan (never execute the AppImage)
|
||||
let offset = crate::core::inspector::find_squashfs_offset_for(appimage_path)?
|
||||
.to_string();
|
||||
|
||||
// Extract the specific library to a temp file
|
||||
let temp_dir = tempfile::tempdir().ok()?;
|
||||
|
||||
Reference in New Issue
Block a user