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
52f31a6e
Commit
52f31a6e
authored
6 years ago
by
devttys0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated extractor code to report only the class name of internal extractors
parent
be7df822
fix-entropy-graph-legend
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
1 deletions
+15
-1
compat.py
src/binwalk/core/compat.py
+7
-0
plugin.py
src/binwalk/core/plugin.py
+3
-0
extractor.py
src/binwalk/modules/extractor.py
+5
-1
No files found.
src/binwalk/core/compat.py
View file @
52f31a6e
...
@@ -10,6 +10,13 @@ if PY_MAJOR_VERSION > 2:
...
@@ -10,6 +10,13 @@ if PY_MAJOR_VERSION > 2:
string
.
letters
=
string
.
ascii_letters
string
.
letters
=
string
.
ascii_letters
def
get_class_name_from_method
(
method
):
if
PY_MAJOR_VERSION
>
2
:
return
method
.
__self__
.
__class__
.
__name__
else
:
return
method
.
im_class
.
__name__
def
iterator
(
dictionary
):
def
iterator
(
dictionary
):
'''
'''
For cross compatibility between Python 2 and Python 3 dictionaries.
For cross compatibility between Python 2 and Python 3 dictionaries.
...
...
This diff is collapsed.
Click to expand it.
src/binwalk/core/plugin.py
View file @
52f31a6e
...
@@ -36,6 +36,9 @@ class Plugin(object):
...
@@ -36,6 +36,9 @@ class Plugin(object):
else
:
else
:
self
.
_enabled
=
False
self
.
_enabled
=
False
def
__str__
(
self
):
return
self
.
__class__
.
__name__
def
init
(
self
):
def
init
(
self
):
'''
'''
Child class should override this if needed.
Child class should override this if needed.
...
...
This diff is collapsed.
Click to expand it.
src/binwalk/modules/extractor.py
View file @
52f31a6e
...
@@ -659,7 +659,11 @@ class Extractor(Module):
...
@@ -659,7 +659,11 @@ class Extractor(Module):
os
.
chdir
(
original_dir
)
os
.
chdir
(
original_dir
)
if
rule
is
not
None
:
if
rule
is
not
None
:
return
(
output_directory
,
fname
,
recurse
,
str
(
rule
[
'cmd'
]))
if
callable
(
rule
[
'cmd'
]):
command_name
=
get_class_name_from_method
(
rule
[
'cmd'
])
else
:
command_name
=
rule
[
'cmd'
]
return
(
output_directory
,
fname
,
recurse
,
command_name
)
else
:
else
:
return
(
output_directory
,
fname
,
recurse
,
''
)
return
(
output_directory
,
fname
,
recurse
,
''
)
...
...
This diff is collapsed.
Click to expand it.
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