Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
binwalk
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-depend
binwalk
Commits
47b521cd
Commit
47b521cd
authored
May 09, 2014
by
devttys0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed extraction bug when --quiet was specified
parent
9f384a32
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
module.py
src/binwalk/core/module.py
+6
-0
binwalk
src/binwalk/magic/binwalk
+0
-0
extractor.py
src/binwalk/modules/extractor.py
+2
-4
No files found.
src/binwalk/core/module.py
View file @
47b521cd
...
...
@@ -400,6 +400,12 @@ class Module(object):
if
display_args
:
self
.
config
.
display
.
format_strings
(
self
.
HEADER_FORMAT
,
self
.
RESULT_FORMAT
)
self
.
config
.
display
.
result
(
*
display_args
)
else
:
# If this specific result has been marked to not be displayed to the user (e.g.,
# it has been excluded via a -x or -y option), then disable extraction as well.
# Note that this does not effect results that are not displayed globally (i.e.,
# if --quiet was specified).
r
.
extract
=
False
return
r
...
...
src/binwalk/magic/binwalk
View file @
47b521cd
No preview for this file type
src/binwalk/modules/extractor.py
View file @
47b521cd
...
...
@@ -117,10 +117,8 @@ class Extractor(Module):
if
r
.
valid
:
binwalk
.
core
.
common
.
debug
(
"Extractor callback for
%
s:
%
d [
%
s &
%
s &
%
s]"
%
(
r
.
file
.
name
,
r
.
offset
,
str
(
r
.
valid
),
str
(
r
.
display
),
str
(
r
.
extract
)))
# Only extract valid results displayed to the user and marked for extraction
# TODO: Results excluded via -x/-y options should be marked as invalid; filtering on r.display means that
# with -q specified, nothing gets extracted!
if
r
.
valid
and
r
.
display
and
r
.
extract
:
# Only extract valid results that have been marked for extraction
if
r
.
valid
and
r
.
extract
:
# Do the extraction
binwalk
.
core
.
common
.
debug
(
"Attempting extraction..."
)
(
extraction_directory
,
dd_file
)
=
self
.
extract
(
r
.
offset
,
r
.
description
,
r
.
file
.
name
,
size
,
r
.
name
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment