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-gitdep
binwalk
Commits
a442dc7e
Commit
a442dc7e
authored
Jun 21, 2016
by
Craig Heffner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Recursive binwalk scans no longer support block/character devices
parent
31632a32
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
extractor.py
src/binwalk/modules/extractor.py
+15
-5
No files found.
src/binwalk/modules/extractor.py
View file @
a442dc7e
...
...
@@ -135,11 +135,21 @@ class Extractor(Module):
return
# Only add this to the pending list of files to scan
# if the file is a regular file or a block/character device.
if
(
stat
.
S_ISREG
(
file_mode
)
or
stat
.
S_ISBLK
(
file_mode
)
or
stat
.
S_ISCHR
(
file_mode
)):
self
.
pending
.
append
(
f
)
# if the file is a regular file. Special files (block/character
# devices) can be tricky; they may fail to open, or worse, simply
# hang when an attempt to open them is made. So for recursive
# extraction purposes, they are ignored, albeit with a warning to
# the user.
if
stat
.
S_ISREG
(
file_mode
):
# Make sure we can open the file too...
try
:
fp
=
binwalk
.
core
.
common
.
BlockFile
(
f
)
fp
.
close
()
self
.
pending
.
append
(
f
)
except
IOError
as
e
:
binwalk
.
core
.
common
.
warning
(
"Ignoring file '
%
s':
%
s"
%
(
f
,
str
(
e
)))
else
:
binwalk
.
core
.
common
.
warning
(
"Ignoring file '
%
s': Not a regular file"
%
f
)
def
reset
(
self
):
# Holds a list of pending files that should be scanned; only populated if self.matryoshka == True
...
...
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