maco 1.2.6__tar.gz → 1.2.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {maco-1.2.6/maco.egg-info → maco-1.2.7}/PKG-INFO +1 -1
- {maco-1.2.6 → maco-1.2.7}/maco/utils.py +12 -2
- {maco-1.2.6 → maco-1.2.7/maco.egg-info}/PKG-INFO +1 -1
- {maco-1.2.6 → maco-1.2.7}/model_setup/maco/utils.py +12 -2
- {maco-1.2.6 → maco-1.2.7}/.gitignore +0 -0
- {maco-1.2.6 → maco-1.2.7}/.vscode/settings.json +0 -0
- {maco-1.2.6 → maco-1.2.7}/LICENSE.md +0 -0
- {maco-1.2.6 → maco-1.2.7}/README.md +0 -0
- {maco-1.2.6 → maco-1.2.7}/demo_extractors/__init__.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/demo_extractors/complex/__init__.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/demo_extractors/complex/complex.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/demo_extractors/complex/complex_utils.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/demo_extractors/elfy.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/demo_extractors/limit_other.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/demo_extractors/nothing.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/demo_extractors/requirements.txt +0 -0
- {maco-1.2.6 → maco-1.2.7}/demo_extractors/shared.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/maco/__init__.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/maco/base_test.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/maco/cli.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/maco/collector.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/maco/extractor.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/maco/model/__init__.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/maco/model/model.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/maco/yara.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/maco.egg-info/SOURCES.txt +0 -0
- {maco-1.2.6 → maco-1.2.7}/maco.egg-info/dependency_links.txt +0 -0
- {maco-1.2.6 → maco-1.2.7}/maco.egg-info/entry_points.txt +0 -0
- {maco-1.2.6 → maco-1.2.7}/maco.egg-info/requires.txt +0 -0
- {maco-1.2.6 → maco-1.2.7}/maco.egg-info/top_level.txt +0 -0
- {maco-1.2.6 → maco-1.2.7}/model_setup/LICENSE.md +0 -0
- {maco-1.2.6 → maco-1.2.7}/model_setup/README.md +0 -0
- {maco-1.2.6 → maco-1.2.7}/model_setup/maco/__init__.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/model_setup/maco/base_test.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/model_setup/maco/cli.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/model_setup/maco/collector.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/model_setup/maco/extractor.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/model_setup/maco/model/__init__.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/model_setup/maco/model/model.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/model_setup/maco/yara.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/model_setup/pyproject.toml +0 -0
- {maco-1.2.6 → maco-1.2.7}/model_setup/setup.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/pipelines/publish.yaml +0 -0
- {maco-1.2.6 → maco-1.2.7}/pipelines/test.yaml +0 -0
- {maco-1.2.6 → maco-1.2.7}/pyproject.toml +0 -0
- {maco-1.2.6 → maco-1.2.7}/requirements.txt +0 -0
- {maco-1.2.6 → maco-1.2.7}/setup.cfg +0 -0
- {maco-1.2.6 → maco-1.2.7}/tests/benchmark.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/tests/data/example.txt.cart +0 -0
- {maco-1.2.6 → maco-1.2.7}/tests/data/trigger_complex.txt +0 -0
- {maco-1.2.6 → maco-1.2.7}/tests/data/trigger_complex.txt.cart +0 -0
- {maco-1.2.6 → maco-1.2.7}/tests/extractors/__init__.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/tests/extractors/basic.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/tests/extractors/basic_longer.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/tests/extractors/bob/__init__.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/tests/extractors/bob/bob.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/tests/extractors/test_basic.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/tests/pytest.ini +0 -0
- {maco-1.2.6 → maco-1.2.7}/tests/requirements.txt +0 -0
- {maco-1.2.6 → maco-1.2.7}/tests/test_base_test.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/tests/test_cli.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/tests/test_demo_extractors.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/tests/test_detection.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/tests/test_extractor.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/tests/test_helpers.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/tests/test_model.py +0 -0
- {maco-1.2.6 → maco-1.2.7}/tox.ini +0 -0
|
@@ -407,14 +407,24 @@ def import_extractors(
|
|
|
407
407
|
create_venv: bool,
|
|
408
408
|
logger: Logger,
|
|
409
409
|
python_version: str = f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}",
|
|
410
|
+
skip_install: bool = False,
|
|
410
411
|
):
|
|
411
412
|
extractor_dirs, extractor_files = scan_for_extractors(root_directory, scanner, logger)
|
|
412
413
|
|
|
413
414
|
logger.info(f"Extractor files found based on scanner ({len(extractor_files)}).")
|
|
414
415
|
logger.debug(extractor_files)
|
|
415
416
|
|
|
416
|
-
|
|
417
|
-
|
|
417
|
+
if not skip_install:
|
|
418
|
+
# Install packages into the current environment or dynamically created virtual environments
|
|
419
|
+
venvs = _install_required_packages(create_venv, extractor_dirs, python_version, logger)
|
|
420
|
+
else:
|
|
421
|
+
# Look for pre-existing virtual environments, if any
|
|
422
|
+
logger.info("Checking for pre-existing virtual environment(s)..")
|
|
423
|
+
venvs = [
|
|
424
|
+
os.path.join(root, VENV_DIRECTORY_NAME)
|
|
425
|
+
for root, dirs, _ in os.walk(root_directory)
|
|
426
|
+
if VENV_DIRECTORY_NAME in dirs
|
|
427
|
+
]
|
|
418
428
|
|
|
419
429
|
# With the environment prepared, we can now hunt for the extractors and register them
|
|
420
430
|
logger.info("Registering extractors..")
|
|
@@ -407,14 +407,24 @@ def import_extractors(
|
|
|
407
407
|
create_venv: bool,
|
|
408
408
|
logger: Logger,
|
|
409
409
|
python_version: str = f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}",
|
|
410
|
+
skip_install: bool = False,
|
|
410
411
|
):
|
|
411
412
|
extractor_dirs, extractor_files = scan_for_extractors(root_directory, scanner, logger)
|
|
412
413
|
|
|
413
414
|
logger.info(f"Extractor files found based on scanner ({len(extractor_files)}).")
|
|
414
415
|
logger.debug(extractor_files)
|
|
415
416
|
|
|
416
|
-
|
|
417
|
-
|
|
417
|
+
if not skip_install:
|
|
418
|
+
# Install packages into the current environment or dynamically created virtual environments
|
|
419
|
+
venvs = _install_required_packages(create_venv, extractor_dirs, python_version, logger)
|
|
420
|
+
else:
|
|
421
|
+
# Look for pre-existing virtual environments, if any
|
|
422
|
+
logger.info("Checking for pre-existing virtual environment(s)..")
|
|
423
|
+
venvs = [
|
|
424
|
+
os.path.join(root, VENV_DIRECTORY_NAME)
|
|
425
|
+
for root, dirs, _ in os.walk(root_directory)
|
|
426
|
+
if VENV_DIRECTORY_NAME in dirs
|
|
427
|
+
]
|
|
418
428
|
|
|
419
429
|
# With the environment prepared, we can now hunt for the extractors and register them
|
|
420
430
|
logger.info("Registering extractors..")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|