diff --git a/plugins/PluginChromeSha1Deprecation.py b/plugins/PluginChromeSha1Deprecation.py index ce98b32a..b9f4ed26 100644 --- a/plugins/PluginChromeSha1Deprecation.py +++ b/plugins/PluginChromeSha1Deprecation.py @@ -32,9 +32,8 @@ from utils.SSLyzeSSLConnection import create_sslyze_connection from nassl.SslClient import ClientCertificateRequested -# We have to import it this way or PluginCertInfo gets detected twice by SSLyze on Linux -import plugins.PluginCertInfo -from plugins.PluginCertInfo import MOZILLA_STORE_PATH + +from plugins.PluginCertInfo import MOZILLA_STORE_PATH, PluginCertInfo ROOT_CERTS = [] diff --git a/plugins/__init__.py b/plugins/__init__.py index 56b85879..086f8f06 100644 --- a/plugins/__init__.py +++ b/plugins/__init__.py @@ -57,6 +57,10 @@ def __init__(self): # Check every declaration in that module for name in dir(module): obj = getattr(module, name) + if name not in module.__name__: + # Plugins have to have the same class name as their module name + # This prevents Plugin B from being detected twice when there is a Plugin A that imports Plugin B + continue if inspect.isclass(obj): # A class declaration was found in that module