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
31632a32
Commit
31632a32
authored
May 22, 2016
by
devttys0
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #209 from Lekensteyn/extractor-fixes
Fix custom output directory for extracted files
parents
0efe0e13
ec6204a6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
extractor.py
src/binwalk/modules/extractor.py
+5
-6
No files found.
src/binwalk/modules/extractor.py
View file @
31632a32
...
...
@@ -102,8 +102,11 @@ class Extractor(Module):
def
load
(
self
):
# Holds a list of extraction rules loaded either from a file or when manually specified.
self
.
extract_rules
=
[]
# The input file specific output directory path (to be determined at runtime)
self
.
directory
=
None
# The input file specific output directory path (default to CWD)
if
self
.
base_directory
:
self
.
directory
=
os
.
path
.
realpath
(
self
.
base_directory
)
else
:
self
.
directory
=
os
.
getcwd
()
# Key value pairs of input file path and output extraction path
self
.
output
=
{}
# Number of extracted files
...
...
@@ -426,10 +429,6 @@ class Extractor(Module):
basedir
=
os
.
path
.
dirname
(
path
)
basename
=
os
.
path
.
basename
(
path
)
# Make sure we put the initial extraction directory in the CWD
if
self
.
directory
is
None
:
self
.
directory
=
os
.
getcwd
()
if
basedir
!=
self
.
directory
:
# During recursive extraction, extracted files will be in subdirectories
# of the CWD. This allows us to figure out the subdirectory by simply
...
...
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