Open
Description
Fix: Prioritize 7z for MSI extraction when both unzip and 7z are installed
This pull request addresses a bug in cve-bin-tool
related to MSI file extraction.
- Problem: MSI extraction failed when both
unzip
and7z
were installed. - Cause: The tool's logic in
extractor.py
incorrectly prioritizedunzip
for MSI files, whichunzip
doesn't handle reliably. - Solution: Modified the
extract_file_zip
function inextractor.py
.- Now, the tool checks for the
.msi
extension first. - If the file is an MSI, it attempts extraction using
7z
. - If
7z
fails or is not present, it falls back tounzip
for other ZIP archives.
- Now, the tool checks for the
- Benefit: Ensures correct MSI extraction in environments with both
unzip
and7z
. - Impact: Improves the robustness of
cve-bin-tool
when analyzing Windows installer packages.