From ef69058f91c2ce1b4d7054df764b623baa5f986d Mon Sep 17 00:00:00 2001 From: Daniel Goldberg Date: Tue, 21 Jan 2020 17:31:57 +0200 Subject: [PATCH 1/2] Add pyinstaller hook for systeminfo plugins --- .../hook-infection_monkey.system_info.collectors.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 monkey/infection_monkey/pyinstaller_hooks/hook-infection_monkey.system_info.collectors.py diff --git a/monkey/infection_monkey/pyinstaller_hooks/hook-infection_monkey.system_info.collectors.py b/monkey/infection_monkey/pyinstaller_hooks/hook-infection_monkey.system_info.collectors.py new file mode 100644 index 000000000..97cf81bfb --- /dev/null +++ b/monkey/infection_monkey/pyinstaller_hooks/hook-infection_monkey.system_info.collectors.py @@ -0,0 +1,6 @@ +from PyInstaller.utils.hooks import collect_submodules, collect_data_files + +# Import all actions as modules +hiddenimports = collect_submodules('infection_monkey.system_info.collectors') +# Add action files that we enumerate +datas = (collect_data_files('infection_monkey.system_info.collectors', include_py_files=True)) From f999e7221d04414b37743bdcd49bac16c86af5fc Mon Sep 17 00:00:00 2001 From: Daniel Goldberg Date: Tue, 21 Jan 2020 17:38:24 +0200 Subject: [PATCH 2/2] Fully explicit imports all the way --- monkey/infection_monkey/system_info/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monkey/infection_monkey/system_info/__init__.py b/monkey/infection_monkey/system_info/__init__.py index 889b558a1..d9107e7bf 100644 --- a/monkey/infection_monkey/system_info/__init__.py +++ b/monkey/infection_monkey/system_info/__init__.py @@ -8,7 +8,7 @@ from enum import IntEnum from infection_monkey.network.info import get_host_subnets from infection_monkey.system_info.azure_cred_collector import AzureCollector from infection_monkey.system_info.netstat_collector import NetstatCollector -from system_info.system_info_collectors_handler import SystemInfoCollectorsHandler +from infection_monkey.system_info.system_info_collectors_handler import SystemInfoCollectorsHandler LOG = logging.getLogger(__name__)