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
ca89bea7
Commit
ca89bea7
authored
Feb 04, 2014
by
devttys0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added sanity checks in core/plugin.py in case user plugins directory does not exist.
parent
cf10f5b2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
+7
-1
plugin.py
src/binwalk/core/plugin.py
+7
-1
No files found.
src/binwalk/core/plugin.py
View file @
ca89bea7
...
@@ -170,8 +170,9 @@ class Plugins(object):
...
@@ -170,8 +170,9 @@ class Plugins(object):
}
}
for
key
in
plugins
.
keys
():
for
key
in
plugins
.
keys
():
plugins
[
key
][
'path'
]
=
self
.
settings
.
paths
[
key
][
self
.
settings
.
PLUGINS
]
plugins
[
key
][
'path'
]
=
self
.
settings
.
get_file_path
(
key
,
self
.
settings
.
PLUGINS
)
if
plugins
[
key
][
'path'
]:
for
file_name
in
os
.
listdir
(
plugins
[
key
][
'path'
]):
for
file_name
in
os
.
listdir
(
plugins
[
key
][
'path'
]):
if
file_name
.
endswith
(
self
.
MODULE_EXTENSION
):
if
file_name
.
endswith
(
self
.
MODULE_EXTENSION
):
module
=
file_name
[:
-
len
(
self
.
MODULE_EXTENSION
)]
module
=
file_name
[:
-
len
(
self
.
MODULE_EXTENSION
)]
...
@@ -203,7 +204,12 @@ class Plugins(object):
...
@@ -203,7 +204,12 @@ class Plugins(object):
def
_load_plugin_modules
(
self
,
plugins
):
def
_load_plugin_modules
(
self
,
plugins
):
for
module
in
plugins
[
'modules'
]:
for
module
in
plugins
[
'modules'
]:
try
:
file_path
=
os
.
path
.
join
(
plugins
[
'path'
],
module
+
self
.
MODULE_EXTENSION
)
file_path
=
os
.
path
.
join
(
plugins
[
'path'
],
module
+
self
.
MODULE_EXTENSION
)
except
KeyboardInterrupt
as
e
:
raise
e
except
Exception
:
continue
try
:
try
:
plugin
=
imp
.
load_source
(
module
,
file_path
)
plugin
=
imp
.
load_source
(
module
,
file_path
)
...
...
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