maco 1.2.7__tar.gz → 1.2.8__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.7/maco.egg-info → maco-1.2.8}/PKG-INFO +1 -1
- {maco-1.2.7/model_setup → maco-1.2.8}/maco/cli.py +7 -2
- {maco-1.2.7 → maco-1.2.8/maco.egg-info}/PKG-INFO +1 -1
- {maco-1.2.7 → maco-1.2.8/model_setup}/maco/cli.py +7 -2
- {maco-1.2.7 → maco-1.2.8}/.gitignore +0 -0
- {maco-1.2.7 → maco-1.2.8}/.vscode/settings.json +0 -0
- {maco-1.2.7 → maco-1.2.8}/LICENSE.md +0 -0
- {maco-1.2.7 → maco-1.2.8}/README.md +0 -0
- {maco-1.2.7 → maco-1.2.8}/demo_extractors/__init__.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/demo_extractors/complex/__init__.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/demo_extractors/complex/complex.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/demo_extractors/complex/complex_utils.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/demo_extractors/elfy.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/demo_extractors/limit_other.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/demo_extractors/nothing.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/demo_extractors/requirements.txt +0 -0
- {maco-1.2.7 → maco-1.2.8}/demo_extractors/shared.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/maco/__init__.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/maco/base_test.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/maco/collector.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/maco/extractor.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/maco/model/__init__.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/maco/model/model.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/maco/utils.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/maco/yara.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/maco.egg-info/SOURCES.txt +0 -0
- {maco-1.2.7 → maco-1.2.8}/maco.egg-info/dependency_links.txt +0 -0
- {maco-1.2.7 → maco-1.2.8}/maco.egg-info/entry_points.txt +0 -0
- {maco-1.2.7 → maco-1.2.8}/maco.egg-info/requires.txt +0 -0
- {maco-1.2.7 → maco-1.2.8}/maco.egg-info/top_level.txt +0 -0
- {maco-1.2.7 → maco-1.2.8}/model_setup/LICENSE.md +0 -0
- {maco-1.2.7 → maco-1.2.8}/model_setup/README.md +0 -0
- {maco-1.2.7 → maco-1.2.8}/model_setup/maco/__init__.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/model_setup/maco/base_test.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/model_setup/maco/collector.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/model_setup/maco/extractor.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/model_setup/maco/model/__init__.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/model_setup/maco/model/model.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/model_setup/maco/utils.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/model_setup/maco/yara.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/model_setup/pyproject.toml +0 -0
- {maco-1.2.7 → maco-1.2.8}/model_setup/setup.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/pipelines/publish.yaml +0 -0
- {maco-1.2.7 → maco-1.2.8}/pipelines/test.yaml +0 -0
- {maco-1.2.7 → maco-1.2.8}/pyproject.toml +0 -0
- {maco-1.2.7 → maco-1.2.8}/requirements.txt +0 -0
- {maco-1.2.7 → maco-1.2.8}/setup.cfg +0 -0
- {maco-1.2.7 → maco-1.2.8}/tests/benchmark.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/tests/data/example.txt.cart +0 -0
- {maco-1.2.7 → maco-1.2.8}/tests/data/trigger_complex.txt +0 -0
- {maco-1.2.7 → maco-1.2.8}/tests/data/trigger_complex.txt.cart +0 -0
- {maco-1.2.7 → maco-1.2.8}/tests/extractors/__init__.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/tests/extractors/basic.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/tests/extractors/basic_longer.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/tests/extractors/bob/__init__.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/tests/extractors/bob/bob.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/tests/extractors/test_basic.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/tests/pytest.ini +0 -0
- {maco-1.2.7 → maco-1.2.8}/tests/requirements.txt +0 -0
- {maco-1.2.7 → maco-1.2.8}/tests/test_base_test.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/tests/test_cli.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/tests/test_demo_extractors.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/tests/test_detection.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/tests/test_extractor.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/tests/test_helpers.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/tests/test_model.py +0 -0
- {maco-1.2.7 → maco-1.2.8}/tox.ini +0 -0
|
@@ -123,10 +123,15 @@ def process_filesystem(
|
|
|
123
123
|
logger.error(f"not file or folder: {path_samples}")
|
|
124
124
|
exit(2)
|
|
125
125
|
try:
|
|
126
|
-
|
|
126
|
+
base_directory = os.path.abspath(path_samples)
|
|
127
|
+
for path, _, files in walker:
|
|
127
128
|
for file in files:
|
|
128
129
|
num_analysed += 1
|
|
129
|
-
path_file = os.path.join(path, file)
|
|
130
|
+
path_file = os.path.abspath(os.path.join(path, file))
|
|
131
|
+
if not path_file.startswith(base_directory):
|
|
132
|
+
logger.error(f"Attempted path traversal detected: {path_file}")
|
|
133
|
+
continue
|
|
134
|
+
|
|
130
135
|
try:
|
|
131
136
|
with open(path_file, "rb") as stream:
|
|
132
137
|
resp = process_file(
|
|
@@ -123,10 +123,15 @@ def process_filesystem(
|
|
|
123
123
|
logger.error(f"not file or folder: {path_samples}")
|
|
124
124
|
exit(2)
|
|
125
125
|
try:
|
|
126
|
-
|
|
126
|
+
base_directory = os.path.abspath(path_samples)
|
|
127
|
+
for path, _, files in walker:
|
|
127
128
|
for file in files:
|
|
128
129
|
num_analysed += 1
|
|
129
|
-
path_file = os.path.join(path, file)
|
|
130
|
+
path_file = os.path.abspath(os.path.join(path, file))
|
|
131
|
+
if not path_file.startswith(base_directory):
|
|
132
|
+
logger.error(f"Attempted path traversal detected: {path_file}")
|
|
133
|
+
continue
|
|
134
|
+
|
|
130
135
|
try:
|
|
131
136
|
with open(path_file, "rb") as stream:
|
|
132
137
|
resp = process_file(
|
|
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
|