secator 0.10.1a4__tar.gz → 0.10.1a6__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.
Potentially problematic release.
This version of secator might be problematic. Click here for more details.
- {secator-0.10.1a4 → secator-0.10.1a6}/PKG-INFO +1 -1
- {secator-0.10.1a4 → secator-0.10.1a6}/pyproject.toml +1 -1
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/celery.py +0 -3
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/report.py +1 -1
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/runners/_base.py +11 -36
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/runners/scan.py +1 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/runners/task.py +2 -1
- secator-0.10.1a6/secator/scans/__init__.py +29 -0
- secator-0.10.1a6/secator/workflows/__init__.py +29 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/integration/test_celery.py +15 -3
- secator-0.10.1a4/secator/scans/__init__.py +0 -28
- secator-0.10.1a4/secator/workflows/__init__.py +0 -28
- {secator-0.10.1a4 → secator-0.10.1a6}/.docker/Dockerfile.alpine +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/.docker/Dockerfile.arch +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/.docker/Dockerfile.debian +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/.docker/Dockerfile.kali +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/.docker/Dockerfile.osx +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/.docker/Dockerfile.ubuntu +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/.docker/build_all.sh +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/.dockerignore +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/.flake8 +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/.gitignore +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/CHANGELOG.md +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/CONTRIBUTING.md +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/Dockerfile +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/LICENSE +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/README.md +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/SECURITY.md +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/cloudbuild.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/helm/.helmignore +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/helm/Chart.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/helm/templates/redis-service.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/helm/templates/redis.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/helm/templates/secator-manager.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/helm/templates/secator-worker.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/helm/values.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/scripts/download_cves.sh +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/scripts/install.sh +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/scripts/install_asciinema.sh +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/scripts/install_go.sh +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/scripts/install_ruby.sh +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/scripts/msf/exploit_cve.rc +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/scripts/msf/ftp_anonymous.rc +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/scripts/msf/ftp_version.rc +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/scripts/msf/ftp_vsftpd_234_backdoor.rc +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/scripts/msf/redis.rc +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/scripts/stories/STORY.md +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/scripts/stories/aliases.sh +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/scripts/stories/demo.sh +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/scripts/stories/fmt.sh +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/scripts/stories/input.sh +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/scripts/stories/pipe.sh +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/scripts/stories/short_demo.sh +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/.gitignore +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/__init__.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/celery_signals.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/celery_utils.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/cli.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/config.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/configs/__init__.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/configs/profiles/__init__.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/configs/profiles/aggressive.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/configs/profiles/default.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/configs/profiles/stealth.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/configs/scans/__init__.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/configs/scans/domain.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/configs/scans/host.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/configs/scans/network.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/configs/scans/subdomain.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/configs/scans/url.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/configs/workflows/__init__.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/configs/workflows/cidr_recon.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/configs/workflows/code_scan.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/configs/workflows/host_recon.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/configs/workflows/port_scan.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/configs/workflows/subdomain_recon.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/configs/workflows/url_bypass.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/configs/workflows/url_crawl.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/configs/workflows/url_dirsearch.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/configs/workflows/url_fuzz.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/configs/workflows/url_nuclei.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/configs/workflows/url_vuln.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/configs/workflows/user_hunt.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/configs/workflows/wordpress.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/decorators.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/definitions.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/exporters/__init__.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/exporters/_base.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/exporters/console.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/exporters/csv.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/exporters/gdrive.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/exporters/json.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/exporters/table.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/exporters/txt.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/hooks/__init__.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/hooks/gcs.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/hooks/mongodb.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/installer.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/output_types/__init__.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/output_types/_base.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/output_types/error.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/output_types/exploit.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/output_types/info.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/output_types/ip.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/output_types/port.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/output_types/progress.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/output_types/record.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/output_types/stat.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/output_types/state.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/output_types/subdomain.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/output_types/tag.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/output_types/target.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/output_types/url.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/output_types/user_account.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/output_types/vulnerability.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/output_types/warning.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/rich.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/runners/__init__.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/runners/_helpers.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/runners/celery.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/runners/command.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/runners/workflow.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/serializers/__init__.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/serializers/dataclass.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/serializers/json.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/serializers/regex.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/tasks/__init__.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/tasks/_categories.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/tasks/bbot.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/tasks/bup.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/tasks/cariddi.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/tasks/dalfox.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/tasks/dirsearch.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/tasks/dnsx.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/tasks/dnsxbrute.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/tasks/feroxbuster.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/tasks/ffuf.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/tasks/fping.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/tasks/gau.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/tasks/gf.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/tasks/gospider.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/tasks/grype.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/tasks/h8mail.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/tasks/httpx.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/tasks/katana.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/tasks/maigret.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/tasks/mapcidr.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/tasks/msfconsole.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/tasks/naabu.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/tasks/nmap.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/tasks/nuclei.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/tasks/searchsploit.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/tasks/subfinder.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/tasks/wpscan.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/template.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/thread.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/utils.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/secator/utils_test.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/__init__.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/fixtures/h8mail_breach.txt +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/fixtures/ls.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/fixtures/msfconsole_input.rc +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/fixtures/nmap_output.xml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/integration/__init__.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/integration/inputs.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/integration/outputs.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/integration/setup.sh +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/integration/teardown.sh +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/integration/test_addons.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/integration/test_scans.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/integration/test_tasks.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/integration/test_tasks_categories.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/integration/test_worker.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/integration/test_workflows.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/integration/wordlist.txt +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/integration/wordlist_dns.txt +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/integration/wordpress_toolbox/Dockerfile +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/integration/wordpress_toolbox/Makefile +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/performance/__init__.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/performance/loadtester.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/performance/test_worker.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/unit/__init__.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/unit/test_celery.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/unit/test_cli.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/unit/test_config.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/unit/test_offline.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/unit/test_runners.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/unit/test_scans.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/unit/test_serializers.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/unit/test_tasks.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/unit/test_tasks_categories.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/unit/test_template.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a6}/tests/unit/test_utils.py +0 -0
|
@@ -260,11 +260,8 @@ def mark_runner_complete(results, runner):
|
|
|
260
260
|
|
|
261
261
|
# Run final processing
|
|
262
262
|
runner.results = results
|
|
263
|
-
runner.done = True
|
|
264
|
-
runner.progress = 100
|
|
265
263
|
if not runner.no_process:
|
|
266
264
|
runner.mark_duplicates()
|
|
267
|
-
runner.results = runner.filter_results()
|
|
268
265
|
runner.log_results()
|
|
269
266
|
runner.run_hooks('on_end')
|
|
270
267
|
return runner.results
|
|
@@ -38,7 +38,7 @@ class Report:
|
|
|
38
38
|
exporters (list): List of exporter classes.
|
|
39
39
|
"""
|
|
40
40
|
def __init__(self, runner, title=None, exporters=[]):
|
|
41
|
-
self.title = title or f'{runner.
|
|
41
|
+
self.title = title or f'{runner.config.type}_{runner.config.name}'
|
|
42
42
|
self.runner = runner
|
|
43
43
|
self.timestamp = get_file_timestamp()
|
|
44
44
|
self.exporters = exporters
|
|
@@ -15,8 +15,8 @@ from secator.config import CONFIG
|
|
|
15
15
|
from secator.output_types import FINDING_TYPES, OutputType, Progress, Info, Warning, Error, Target, State
|
|
16
16
|
from secator.report import Report
|
|
17
17
|
from secator.rich import console, console_stdout
|
|
18
|
-
from secator.runners._helpers import (get_task_folder_id,
|
|
19
|
-
from secator.utils import (debug, import_dynamic,
|
|
18
|
+
from secator.runners._helpers import (get_task_folder_id, run_extractors)
|
|
19
|
+
from secator.utils import (debug, import_dynamic, rich_to_ansi, should_update)
|
|
20
20
|
|
|
21
21
|
logger = logging.getLogger(__name__)
|
|
22
22
|
|
|
@@ -281,6 +281,8 @@ class Runner:
|
|
|
281
281
|
# If any errors happened during valid ation, exit
|
|
282
282
|
if self.errors:
|
|
283
283
|
yield from self.errors
|
|
284
|
+
if self.no_process:
|
|
285
|
+
return
|
|
284
286
|
self.log_results()
|
|
285
287
|
self.run_hooks('on_end')
|
|
286
288
|
return
|
|
@@ -303,14 +305,12 @@ class Runner:
|
|
|
303
305
|
yield from self.join_threads()
|
|
304
306
|
yield error
|
|
305
307
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
+
finally:
|
|
309
|
+
if self.no_process:
|
|
310
|
+
return
|
|
308
311
|
self.mark_duplicates()
|
|
309
|
-
self.
|
|
310
|
-
|
|
311
|
-
# Finalize run
|
|
312
|
-
self.log_results()
|
|
313
|
-
self.run_hooks('on_end')
|
|
312
|
+
self.log_results()
|
|
313
|
+
self.run_hooks('on_end')
|
|
314
314
|
|
|
315
315
|
def join_threads(self):
|
|
316
316
|
"""Wait for all running threads to complete."""
|
|
@@ -507,6 +507,8 @@ class Runner:
|
|
|
507
507
|
task_id=self.celery_result.id
|
|
508
508
|
)
|
|
509
509
|
if self.no_poll:
|
|
510
|
+
self.enable_hooks = False
|
|
511
|
+
self.no_process = True
|
|
510
512
|
return
|
|
511
513
|
results = CeleryData.iter_results(
|
|
512
514
|
self.celery_result,
|
|
@@ -686,8 +688,6 @@ class Runner:
|
|
|
686
688
|
|
|
687
689
|
def log_results(self):
|
|
688
690
|
"""Log runner results."""
|
|
689
|
-
if self.no_poll:
|
|
690
|
-
return
|
|
691
691
|
self.started = True
|
|
692
692
|
self.done = True
|
|
693
693
|
self.progress = 100
|
|
@@ -715,31 +715,6 @@ class Runner:
|
|
|
715
715
|
name = self.celery_ids_map.get(task_id, {}).get('full_name')
|
|
716
716
|
revoke_task(task_id, name)
|
|
717
717
|
|
|
718
|
-
def filter_results(self):
|
|
719
|
-
"""Filter runner results using extractors defined in config."""
|
|
720
|
-
extractors = self.config.results
|
|
721
|
-
results = []
|
|
722
|
-
if extractors:
|
|
723
|
-
# Keep results based on extractors
|
|
724
|
-
opts = merge_opts(self.config.options, self.run_opts)
|
|
725
|
-
for extractor in extractors:
|
|
726
|
-
tmp = process_extractor(self.results, extractor, ctx=opts)
|
|
727
|
-
results.extend(tmp)
|
|
728
|
-
|
|
729
|
-
# Keep the field types in results not specified in the extractors.
|
|
730
|
-
extract_fields = [e['type'] for e in extractors]
|
|
731
|
-
keep_fields = [
|
|
732
|
-
_type for _type in FINDING_TYPES
|
|
733
|
-
if _type not in extract_fields
|
|
734
|
-
]
|
|
735
|
-
results.extend([
|
|
736
|
-
item for item in self.results
|
|
737
|
-
if item._type in keep_fields
|
|
738
|
-
])
|
|
739
|
-
else:
|
|
740
|
-
results = self.results
|
|
741
|
-
return results
|
|
742
|
-
|
|
743
718
|
def _convert_item_schema(self, item):
|
|
744
719
|
"""Convert dict item to a secator output type.
|
|
745
720
|
|
|
@@ -33,6 +33,7 @@ class Scan(Runner):
|
|
|
33
33
|
sigs = []
|
|
34
34
|
for name, workflow_opts in self.config.workflows.items():
|
|
35
35
|
run_opts = self.run_opts.copy()
|
|
36
|
+
run_opts['no_poll'] = True
|
|
36
37
|
opts = merge_opts(scan_opts, workflow_opts, run_opts)
|
|
37
38
|
config = TemplateLoader(name=f'workflows/{name}')
|
|
38
39
|
workflow = Workflow(
|
|
@@ -6,8 +6,8 @@ from celery import chain
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
class Task(Runner):
|
|
9
|
+
|
|
9
10
|
default_exporters = CONFIG.tasks.exporters
|
|
10
|
-
enable_hooks = False
|
|
11
11
|
|
|
12
12
|
@classmethod
|
|
13
13
|
def delay(cls, *args, **kwargs):
|
|
@@ -37,6 +37,7 @@ class Task(Runner):
|
|
|
37
37
|
# Set task output types
|
|
38
38
|
self.output_types = task_cls.output_types
|
|
39
39
|
self.enable_duplicate_check = False
|
|
40
|
+
self.enable_hooks = False
|
|
40
41
|
|
|
41
42
|
# Get hooks
|
|
42
43
|
hooks = self._hooks.get(Task, {})
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
from secator.cli import ALL_SCANS
|
|
2
|
+
from secator.runners import Scan
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class DynamicScan(Scan):
|
|
6
|
+
def __init__(self, config):
|
|
7
|
+
self.config = config
|
|
8
|
+
|
|
9
|
+
def __call__(self, targets, **kwargs):
|
|
10
|
+
hooks = kwargs.pop('hooks', {})
|
|
11
|
+
results = kwargs.pop('results', [])
|
|
12
|
+
context = kwargs.pop('context', {})
|
|
13
|
+
super().__init__(
|
|
14
|
+
config=self.config,
|
|
15
|
+
inputs=targets,
|
|
16
|
+
results=results,
|
|
17
|
+
hooks=hooks,
|
|
18
|
+
context=context,
|
|
19
|
+
run_opts=kwargs)
|
|
20
|
+
return self
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
DYNAMIC_SCANS = {}
|
|
24
|
+
for scan in ALL_SCANS:
|
|
25
|
+
instance = DynamicScan(scan)
|
|
26
|
+
DYNAMIC_SCANS[scan.name] = instance
|
|
27
|
+
|
|
28
|
+
globals().update(DYNAMIC_SCANS)
|
|
29
|
+
__all__ = list(DYNAMIC_SCANS)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
from secator.cli import ALL_WORKFLOWS
|
|
2
|
+
from secator.runners import Workflow
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class DynamicWorkflow(Workflow):
|
|
6
|
+
def __init__(self, config):
|
|
7
|
+
self.config = config
|
|
8
|
+
|
|
9
|
+
def __call__(self, targets, **kwargs):
|
|
10
|
+
hooks = kwargs.pop('hooks', {})
|
|
11
|
+
results = kwargs.pop('results', [])
|
|
12
|
+
context = kwargs.pop('context', {})
|
|
13
|
+
super().__init__(
|
|
14
|
+
config=self.config,
|
|
15
|
+
inputs=targets,
|
|
16
|
+
results=results,
|
|
17
|
+
hooks=hooks,
|
|
18
|
+
context=context,
|
|
19
|
+
run_opts=kwargs)
|
|
20
|
+
return self
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
DYNAMIC_WORKFLOWS = {}
|
|
24
|
+
for workflow in ALL_WORKFLOWS:
|
|
25
|
+
instance = DynamicWorkflow(workflow)
|
|
26
|
+
DYNAMIC_WORKFLOWS[workflow.name] = instance
|
|
27
|
+
|
|
28
|
+
globals().update(DYNAMIC_WORKFLOWS)
|
|
29
|
+
__all__ = list(DYNAMIC_WORKFLOWS)
|
|
@@ -10,7 +10,7 @@ from celery import chain, chord
|
|
|
10
10
|
|
|
11
11
|
from secator.celery import app, forward_results
|
|
12
12
|
from secator.config import CONFIG
|
|
13
|
-
from secator.utils_test import TEST_TASKS, load_fixture
|
|
13
|
+
from secator.utils_test import TEST_TASKS, TEST_WORKFLOWS,load_fixture
|
|
14
14
|
from secator.runners import Command
|
|
15
15
|
from secator.output_types import Url
|
|
16
16
|
from tests.integration.inputs import INPUTS_SCANS
|
|
@@ -24,7 +24,8 @@ OPTS = {
|
|
|
24
24
|
'ffuf.wordlist': load_fixture('wordlist', INTEGRATION_DIR, only_path=True),
|
|
25
25
|
}
|
|
26
26
|
URL_TARGETS = INPUTS_SCANS['url']
|
|
27
|
-
|
|
27
|
+
URL_RESULTS_COUNT = [14, 1]
|
|
28
|
+
TAG_RESULTS_COUNT = []
|
|
28
29
|
HOST_TARGETS = INPUTS_SCANS['host']
|
|
29
30
|
|
|
30
31
|
|
|
@@ -192,4 +193,15 @@ class TestCelery(unittest.TestCase):
|
|
|
192
193
|
targets = [r.name for r in results if r._type == 'target']
|
|
193
194
|
urls = [r.url for r in results if r._type == 'url']
|
|
194
195
|
self.assertEqual(len(targets), len(URL_TARGETS))
|
|
195
|
-
self.assertEqual(len(urls), sum(
|
|
196
|
+
self.assertEqual(len(urls), sum(URL_RESULTS_COUNT))
|
|
197
|
+
|
|
198
|
+
def test_url_vuln_workflow(self):
|
|
199
|
+
from secator.workflows import url_vuln
|
|
200
|
+
workflow = url_vuln([t + '?id=1' for t in URL_TARGETS])
|
|
201
|
+
workflow = workflow.build_celery_workflow()
|
|
202
|
+
result = workflow.apply()
|
|
203
|
+
results = result.get()
|
|
204
|
+
targets = [r.name for r in results if r._type == 'target']
|
|
205
|
+
tags = [r.name for r in results if r._type == 'tag']
|
|
206
|
+
self.assertEqual(len(targets), 16)
|
|
207
|
+
self.assertEqual(len(tags), 6)
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
from secator.cli import ALL_SCANS
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
def generate_class(config):
|
|
5
|
-
from secator.runners import Scan
|
|
6
|
-
|
|
7
|
-
class scan(Scan):
|
|
8
|
-
def __init__(self, inputs=[], **run_opts):
|
|
9
|
-
hooks = run_opts.pop('hooks', {})
|
|
10
|
-
results = run_opts.pop('results', [])
|
|
11
|
-
context = run_opts.pop('context', {})
|
|
12
|
-
super().__init__(
|
|
13
|
-
config=config,
|
|
14
|
-
inputs=inputs,
|
|
15
|
-
results=results,
|
|
16
|
-
run_opts=run_opts,
|
|
17
|
-
hooks=hooks,
|
|
18
|
-
context=context)
|
|
19
|
-
return scan, config.name
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
DYNAMIC_SCANS = {}
|
|
23
|
-
for scan in ALL_SCANS:
|
|
24
|
-
cls, name = generate_class(scan)
|
|
25
|
-
DYNAMIC_SCANS[name] = cls
|
|
26
|
-
|
|
27
|
-
globals().update(DYNAMIC_SCANS)
|
|
28
|
-
__all__ = list(DYNAMIC_SCANS)
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
from secator.cli import ALL_WORKFLOWS
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
def generate_class(config):
|
|
5
|
-
from secator.runners import Workflow
|
|
6
|
-
|
|
7
|
-
class workflow(Workflow):
|
|
8
|
-
def __init__(self, inputs=[], **run_opts):
|
|
9
|
-
hooks = run_opts.pop('hooks', {})
|
|
10
|
-
results = run_opts.pop('results', [])
|
|
11
|
-
context = run_opts.pop('context', {})
|
|
12
|
-
super().__init__(
|
|
13
|
-
config=config,
|
|
14
|
-
inputs=inputs,
|
|
15
|
-
results=results,
|
|
16
|
-
run_opts=run_opts,
|
|
17
|
-
hooks=hooks,
|
|
18
|
-
context=context)
|
|
19
|
-
return workflow, config.name
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
DYNAMIC_WORKFLOWS = {}
|
|
23
|
-
for workflow in ALL_WORKFLOWS:
|
|
24
|
-
cls, name = generate_class(workflow)
|
|
25
|
-
DYNAMIC_WORKFLOWS[name] = cls
|
|
26
|
-
|
|
27
|
-
globals().update(DYNAMIC_WORKFLOWS)
|
|
28
|
-
__all__ = list(DYNAMIC_WORKFLOWS)
|
|
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
|
|
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
|
|
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
|