secator 0.10.1a4__tar.gz → 0.10.1a5__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.1a5}/PKG-INFO +1 -1
- {secator-0.10.1a4 → secator-0.10.1a5}/pyproject.toml +1 -1
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/celery.py +0 -2
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/report.py +1 -1
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/runners/_base.py +0 -2
- secator-0.10.1a5/secator/scans/__init__.py +29 -0
- secator-0.10.1a5/secator/workflows/__init__.py +29 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/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.1a5}/.docker/Dockerfile.alpine +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/.docker/Dockerfile.arch +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/.docker/Dockerfile.debian +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/.docker/Dockerfile.kali +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/.docker/Dockerfile.osx +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/.docker/Dockerfile.ubuntu +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/.docker/build_all.sh +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/.dockerignore +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/.flake8 +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/.gitignore +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/CHANGELOG.md +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/CONTRIBUTING.md +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/Dockerfile +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/LICENSE +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/README.md +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/SECURITY.md +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/cloudbuild.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/helm/.helmignore +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/helm/Chart.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/helm/templates/redis-service.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/helm/templates/redis.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/helm/templates/secator-manager.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/helm/templates/secator-worker.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/helm/values.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/scripts/download_cves.sh +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/scripts/install.sh +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/scripts/install_asciinema.sh +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/scripts/install_go.sh +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/scripts/install_ruby.sh +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/scripts/msf/exploit_cve.rc +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/scripts/msf/ftp_anonymous.rc +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/scripts/msf/ftp_version.rc +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/scripts/msf/ftp_vsftpd_234_backdoor.rc +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/scripts/msf/redis.rc +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/scripts/stories/STORY.md +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/scripts/stories/aliases.sh +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/scripts/stories/demo.sh +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/scripts/stories/fmt.sh +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/scripts/stories/input.sh +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/scripts/stories/pipe.sh +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/scripts/stories/short_demo.sh +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/.gitignore +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/__init__.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/celery_signals.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/celery_utils.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/cli.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/config.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/configs/__init__.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/configs/profiles/__init__.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/configs/profiles/aggressive.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/configs/profiles/default.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/configs/profiles/stealth.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/configs/scans/__init__.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/configs/scans/domain.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/configs/scans/host.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/configs/scans/network.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/configs/scans/subdomain.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/configs/scans/url.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/configs/workflows/__init__.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/configs/workflows/cidr_recon.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/configs/workflows/code_scan.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/configs/workflows/host_recon.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/configs/workflows/port_scan.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/configs/workflows/subdomain_recon.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/configs/workflows/url_bypass.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/configs/workflows/url_crawl.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/configs/workflows/url_dirsearch.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/configs/workflows/url_fuzz.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/configs/workflows/url_nuclei.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/configs/workflows/url_vuln.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/configs/workflows/user_hunt.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/configs/workflows/wordpress.yaml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/decorators.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/definitions.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/exporters/__init__.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/exporters/_base.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/exporters/console.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/exporters/csv.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/exporters/gdrive.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/exporters/json.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/exporters/table.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/exporters/txt.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/hooks/__init__.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/hooks/gcs.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/hooks/mongodb.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/installer.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/output_types/__init__.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/output_types/_base.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/output_types/error.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/output_types/exploit.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/output_types/info.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/output_types/ip.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/output_types/port.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/output_types/progress.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/output_types/record.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/output_types/stat.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/output_types/state.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/output_types/subdomain.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/output_types/tag.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/output_types/target.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/output_types/url.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/output_types/user_account.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/output_types/vulnerability.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/output_types/warning.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/rich.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/runners/__init__.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/runners/_helpers.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/runners/celery.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/runners/command.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/runners/scan.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/runners/task.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/runners/workflow.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/serializers/__init__.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/serializers/dataclass.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/serializers/json.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/serializers/regex.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/tasks/__init__.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/tasks/_categories.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/tasks/bbot.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/tasks/bup.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/tasks/cariddi.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/tasks/dalfox.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/tasks/dirsearch.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/tasks/dnsx.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/tasks/dnsxbrute.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/tasks/feroxbuster.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/tasks/ffuf.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/tasks/fping.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/tasks/gau.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/tasks/gf.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/tasks/gospider.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/tasks/grype.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/tasks/h8mail.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/tasks/httpx.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/tasks/katana.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/tasks/maigret.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/tasks/mapcidr.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/tasks/msfconsole.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/tasks/naabu.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/tasks/nmap.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/tasks/nuclei.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/tasks/searchsploit.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/tasks/subfinder.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/tasks/wpscan.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/template.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/thread.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/utils.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/secator/utils_test.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/__init__.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/fixtures/h8mail_breach.txt +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/fixtures/ls.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/fixtures/msfconsole_input.rc +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/fixtures/nmap_output.xml +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/integration/__init__.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/integration/inputs.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/integration/outputs.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/integration/setup.sh +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/integration/teardown.sh +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/integration/test_addons.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/integration/test_scans.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/integration/test_tasks.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/integration/test_tasks_categories.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/integration/test_worker.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/integration/test_workflows.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/integration/wordlist.txt +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/integration/wordlist_dns.txt +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/integration/wordpress_toolbox/Dockerfile +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/integration/wordpress_toolbox/Makefile +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/performance/__init__.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/performance/loadtester.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/performance/test_worker.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/unit/__init__.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/unit/test_celery.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/unit/test_cli.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/unit/test_config.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/unit/test_offline.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/unit/test_runners.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/unit/test_scans.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/unit/test_serializers.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/unit/test_tasks.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/unit/test_tasks_categories.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/unit/test_template.py +0 -0
- {secator-0.10.1a4 → secator-0.10.1a5}/tests/unit/test_utils.py +0 -0
|
@@ -260,8 +260,6 @@ 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
265
|
runner.results = runner.filter_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
|
|
@@ -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
|
|
File without changes
|
|
File without changes
|