Skip to content
GitLab
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
Reproducible Builds
diffoscope
Compare revisions
4c6295e316ee25754e6a0b2a2fc3f1c3d31b8cec...9e1786fa96ab70d61df5e55705ed327de6c1946b
Commits (2)
If we fail to import binwalk, don't report that we are missing the Python "rpm" module (!).
· dd7bace5
Chris Lamb
authored
Feb 04, 2022
dd7bace5
If we fail to scan using binwalk, return 'False' from BinwalkFile.recognizes.
· 9e1786fa
Chris Lamb
authored
Feb 04, 2022
9e1786fa
Hide whitespace changes
Inline
Side-by-side
diffoscope/comparators/binwalk.py
View file @
9e1786fa
...
...
@@ -34,8 +34,8 @@ except ImportError:
try
:
import
binwalk
except
ImportError
:
python_module_missing
(
"
rpm
"
)
except
Exception
:
python_module_missing
(
"
binwalk
"
)
binwalk
=
None
else
:
# Disable binwalk's own user configuration for predictable results and to
...
...
@@ -89,14 +89,17 @@ class BinwalkFile(File):
unpacked
=
get_temporary_directory
(
prefix
=
"binwalk"
)
logger
.
debug
(
"Extracting %s to %s"
,
file
.
path
,
unpacked
.
name
)
binwalk
.
scan
(
file
.
path
,
dd
=
"cpio:cpio"
,
carve
=
True
,
quiet
=
True
,
signature
=
True
,
directory
=
unpacked
.
name
,
)
try
:
binwalk
.
scan
(
file
.
path
,
dd
=
"cpio:cpio"
,
carve
=
True
,
quiet
=
True
,
signature
=
True
,
directory
=
unpacked
.
name
,
)
except
binwalk
.
core
.
exceptions
.
ModuleException
:
return
False
members
=
{
"{} file embedded at offset {}"
.
format
(
...
...