|
|
|
@ -1,11 +1,12 @@ |
|
|
|
|
from mythril.analysis.module import DetectionModule |
|
|
|
|
|
|
|
|
|
from mythril.plugin.interface import MythrilCLIPlugin, MythrilPlugin |
|
|
|
|
from mythril.plugin.interface import MythrilCLIPlugin, MythrilPlugin, MythrilLaserPlugin |
|
|
|
|
from mythril.plugin.discovery import PluginDiscovery |
|
|
|
|
from mythril.support.support_utils import Singleton |
|
|
|
|
|
|
|
|
|
from mythril.analysis.module.loader import ModuleLoader |
|
|
|
|
|
|
|
|
|
from mythril.laser.plugin import PluginBuilder as LaserPluginBuilder |
|
|
|
|
from mythril.laser.plugin.loader import LaserPluginLoader |
|
|
|
|
import logging |
|
|
|
|
|
|
|
|
|
log = logging.getLogger(__name__) |
|
|
|
@ -48,6 +49,11 @@ class MythrilPluginLoader(object, metaclass=Singleton): |
|
|
|
|
log.info(f"Loading detection module: {plugin.name}") |
|
|
|
|
ModuleLoader().register_module(plugin) |
|
|
|
|
|
|
|
|
|
@staticmethod |
|
|
|
|
def _load_laser_plugin(plugin: MythrilLaserPlugin): |
|
|
|
|
log.info(f"Loading laser plugin: {plugin.name}") |
|
|
|
|
LaserPluginLoader().load(plugin.builder) |
|
|
|
|
|
|
|
|
|
def _load_default_enabled(self): |
|
|
|
|
log.info("Loading installed analysis modules that are enabled by default") |
|
|
|
|
for plugin_name in PluginDiscovery().get_plugins(default_enabled=True): |
|
|
|
|