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
cb3aa455
Commit
cb3aa455
authored
Mar 27, 2015
by
devttys0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated extractor to ignore symlinks during recursive scans
parent
9f2d1d4e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
extractor.py
src/binwalk/modules/extractor.py
+3
-2
No files found.
src/binwalk/modules/extractor.py
View file @
cb3aa455
...
...
@@ -149,8 +149,8 @@ class Extractor(Module):
real_file_path
=
os
.
path
.
realpath
(
file_path
)
self
.
result
(
description
=
file_path
,
display
=
False
)
# If recursion was specified, and the file is not the same one we just dd'd, and if it is not a directory
if
self
.
matryoshka
and
file_path
!=
dd_file_path
and
scan_extracted_files
:
# If recursion was specified, and the file is not the same one we just dd'd, and if it is not a directory
/symlink
if
self
.
matryoshka
and
file_path
!=
dd_file_path
and
scan_extracted_files
and
not
os
.
path
.
islink
(
file_path
)
:
# If the recursion level of this file is less than or equal to our desired recursion level
if
len
(
real_file_path
.
split
(
self
.
base_recursion_dir
)[
1
]
.
split
(
os
.
path
.
sep
))
<=
self
.
matryoshka
:
# If this is a directory and we are supposed to process directories for this extractor,
...
...
@@ -159,6 +159,7 @@ class Extractor(Module):
for
root
,
dirs
,
files
in
os
.
walk
(
file_path
):
for
f
in
files
:
full_path
=
os
.
path
.
join
(
root
,
f
)
if
not
os
.
path
.
islink
(
full_path
):
self
.
pending
.
append
(
full_path
)
# If it's just a file, it to eh list of pending files
else
:
...
...
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