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
693eb39c
Commit
693eb39c
authored
Jan 03, 2014
by
devttys0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed recursive extraction directory naming bug.
parent
b6d00d6f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
+6
-1
extractor.py
src/binwalk/modules/extractor.py
+6
-1
No files found.
src/binwalk/modules/extractor.py
View file @
693eb39c
...
@@ -41,6 +41,11 @@ class Extractor(Module):
...
@@ -41,6 +41,11 @@ class Extractor(Module):
long
=
'matryoshka'
,
long
=
'matryoshka'
,
kwargs
=
{
'matryoshka'
:
8
},
kwargs
=
{
'matryoshka'
:
8
},
description
=
'Recursively scan extracted files'
),
description
=
'Recursively scan extracted files'
),
Option
(
short
=
'd'
,
long
=
'depth'
,
type
=
int
,
kwargs
=
{
'matryoshka'
:
0
},
description
=
'Limit extraction recursion depth (default: 8 levels deep)'
),
Option
(
short
=
'j'
,
Option
(
short
=
'j'
,
long
=
'max-size'
,
long
=
'max-size'
,
type
=
int
,
type
=
int
,
...
@@ -276,7 +281,7 @@ class Extractor(Module):
...
@@ -276,7 +281,7 @@ class Extractor(Module):
'''
'''
# If we have not already created an output directory for this target file, create one now
# If we have not already created an output directory for this target file, create one now
if
not
has_key
(
self
.
extraction_directories
,
path
):
if
not
has_key
(
self
.
extraction_directories
,
path
):
output_directory
=
unique_file_name
(
'_'
+
os
.
path
.
basename
(
path
),
extension
=
'extracted'
)
output_directory
=
os
.
path
.
join
(
os
.
path
.
dirname
(
path
),
unique_file_name
(
'_'
+
os
.
path
.
basename
(
path
),
extension
=
'extracted'
)
)
if
not
os
.
path
.
exists
(
output_directory
):
if
not
os
.
path
.
exists
(
output_directory
):
os
.
mkdir
(
output_directory
)
os
.
mkdir
(
output_directory
)
...
...
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