Merge pull request #1 from aradhyacp/issue/jar-binwalk-fix
Fix missing Binwalk dependencies (jar) and improve extraction error handling (Fixes #70)
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@ WORKDIR /
|
|||||||
# Install build tools and dependencies
|
# Install build tools and dependencies
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
wget \
|
wget \
|
||||||
default-jre \
|
default-jdk \
|
||||||
ruby \
|
ruby \
|
||||||
zip \
|
zip \
|
||||||
7zip
|
7zip
|
||||||
|
|||||||
@@ -44,7 +44,9 @@ def analyze_binwalk(input_img: Path, output_dir: Path) -> None:
|
|||||||
if extracted_dir.exists():
|
if extracted_dir.exists():
|
||||||
shutil.rmtree(extracted_dir)
|
shutil.rmtree(extracted_dir)
|
||||||
|
|
||||||
if len(stderr) > 0:
|
# Only report error if stderr exists AND extraction failed.
|
||||||
|
# If zip_exist is True, binwalk worked (despite warnings), so we proceed.
|
||||||
|
if len(stderr) > 0 and not zip_exist:
|
||||||
err = {
|
err = {
|
||||||
"binwalk": {
|
"binwalk": {
|
||||||
"status": "error",
|
"status": "error",
|
||||||
|
|||||||
Reference in New Issue
Block a user