From fe236ebc0598340d8a2532f28bfb269c0b491eb0 Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Wed, 22 May 2019 17:09:09 +0300 Subject: [PATCH] Minor readability changes in config service --- monkey/infection_monkey/monkey.spec | 2 +- .../hook-infection_monkey.post_breach.actions.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 monkey/infection_monkey/pyinstaller_hooks/hook-infection_monkey.post_breach.actions.py diff --git a/monkey/infection_monkey/monkey.spec b/monkey/infection_monkey/monkey.spec index a7f0f0396..d29adddb1 100644 --- a/monkey/infection_monkey/monkey.spec +++ b/monkey/infection_monkey/monkey.spec @@ -15,7 +15,7 @@ def main(): a = Analysis(['main.py'], pathex=['..'], hiddenimports=get_hidden_imports(), - hookspath=None, + hookspath=['./pyinstaller_hooks'], runtime_hooks=None, binaries=None, datas=None, diff --git a/monkey/infection_monkey/pyinstaller_hooks/hook-infection_monkey.post_breach.actions.py b/monkey/infection_monkey/pyinstaller_hooks/hook-infection_monkey.post_breach.actions.py new file mode 100644 index 000000000..51a0fca4a --- /dev/null +++ b/monkey/infection_monkey/pyinstaller_hooks/hook-infection_monkey.post_breach.actions.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.post_breach.actions') +# Add action files that we enumerate +datas = (collect_data_files('infection_monkey.post_breach.actions', include_py_files=True))