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
6a96af0c
Commit
6a96af0c
authored
Jul 16, 2015
by
devttys0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed depreciated code from extractor.py
parent
a335bb9b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
extractor.py
src/binwalk/modules/extractor.py
+4
-8
No files found.
src/binwalk/modules/extractor.py
View file @
6a96af0c
...
...
@@ -415,7 +415,6 @@ class Extractor(Module):
Returns the name of the extracted file (blank string if nothing was extracted).
'''
fname
=
''
cleanup_extracted_fname
=
True
original_dir
=
os
.
getcwd
()
rules
=
self
.
match
(
description
)
file_path
=
os
.
path
.
realpath
(
file_name
)
...
...
@@ -448,15 +447,12 @@ class Extractor(Module):
# If execution fails, the next rule will be attempted.
if
rule
[
'cmd'
]:
#
Many extraction utilities will extract the file to a new file, just without
#
the file extension (i.e., myfile.7z -> myfile). If the presumed resul
ting
#
file name already exists before executing the extract command, do not attempt
#
to clean it up even if its resulting file size is 0
.
#
Note the hash of the original file; if --rm is specified and the
#
extraction utility modifies the original file rather than crea
ting
#
a new one (AFAIK none currently do, but could happen in the future),
#
we don't want to remove this file
.
if
self
.
remove_after_execute
:
fname_md5
=
file_md5
(
fname
)
extracted_fname
=
os
.
path
.
splitext
(
fname
)[
0
]
if
os
.
path
.
exists
(
extracted_fname
):
cleanup_extracted_fname
=
False
# Execute the specified command against the extracted file
if
self
.
run_extractors
:
...
...
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