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
a335bb9b
Commit
a335bb9b
authored
Jul 16, 2015
by
devttys0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor changes to new_file plugin callback
parent
556feb56
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
plugin.py
src/binwalk/core/plugin.py
+6
-6
No files found.
src/binwalk/core/plugin.py
View file @
a335bb9b
...
...
@@ -51,7 +51,7 @@ class Plugin(object):
'''
pass
def
scan
(
self
,
result
):
def
scan
(
self
,
module
):
'''
Child class should override this if needed.
'''
...
...
@@ -98,14 +98,14 @@ class Plugins(object):
def
__exit__
(
self
,
t
,
v
,
traceback
):
pass
def
_call_plugins
(
self
,
callback_list
,
arg
):
def
_call_plugins
(
self
,
callback_list
,
obj
=
None
):
for
callback
in
callback_list
:
try
:
try
:
callback
()
except
TypeError
:
if
arg
is
not
None
:
callback
(
arg
)
if
obj
is
not
None
:
callback
(
obj
)
except
KeyboardInterrupt
as
e
:
raise
e
except
Exception
as
e
:
...
...
@@ -241,13 +241,13 @@ class Plugins(object):
binwalk
.
core
.
common
.
warning
(
"Failed to load plugin module '
%
s':
%
s"
%
(
module
,
str
(
e
)))
def
pre_scan_callbacks
(
self
,
obj
):
return
self
.
_call_plugins
(
self
.
pre_scan
,
None
)
return
self
.
_call_plugins
(
self
.
pre_scan
)
def
new_file_callbacks
(
self
,
fp
):
return
self
.
_call_plugins
(
self
.
new_file
,
fp
)
def
post_scan_callbacks
(
self
,
obj
):
return
self
.
_call_plugins
(
self
.
post_scan
,
None
)
return
self
.
_call_plugins
(
self
.
post_scan
)
def
scan_callbacks
(
self
,
obj
):
return
self
.
_call_plugins
(
self
.
scan
,
obj
)
...
...
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