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
858eaab5
Commit
858eaab5
authored
Aug 28, 2014
by
devttys0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed hexdiff bug introduced by previous patch.
parent
0c62122f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
module.py
src/binwalk/core/module.py
+2
-1
hexdiff.py
src/binwalk/modules/hexdiff.py
+7
-1
No files found.
src/binwalk/core/module.py
View file @
858eaab5
...
...
@@ -328,7 +328,7 @@ class Module(object):
return
args
def
next_file
(
self
):
def
next_file
(
self
,
close_previous
=
True
):
'''
Gets the next file to be scanned (including pending extracted files, if applicable).
Also re/initializes self.status.
...
...
@@ -337,6 +337,7 @@ class Module(object):
fp
=
None
# Ensure files are close to prevent IOError (too many open files)
if
close_previous
:
try
:
self
.
previous_next_file_fp
.
close
()
except
KeyboardInterrupt
as
e
:
...
...
src/binwalk/modules/hexdiff.py
View file @
858eaab5
...
...
@@ -185,7 +185,13 @@ class HexDiff(Module):
self
.
block
=
self
.
DEFAULT_BLOCK_SIZE
# Build a list of files to hexdiff
self
.
hex_target_files
=
[
x
for
x
in
iter
(
self
.
next_file
,
None
)]
self
.
hex_target_files
=
[]
while
True
:
f
=
self
.
next_file
(
close_previous
=
False
)
if
not
f
:
break
else
:
self
.
hex_target_files
.
append
(
f
)
# Build the header format string
header_width
=
(
self
.
block
*
4
)
+
2
...
...
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