mirror of
https://github.com/yogeshojha/rengine.git
synced 2026-10-21 07:41:28 +02:00
- Implemented TargetEnrichmentStage for enriching targets with DNS, WHOIS, and BGP context. - Added VhostStage for virtual host discovery using host-header fuzzing. - Introduced WafDetectStage for fingerprinting web application firewalls. - Created configuration files for each new stage with relevant parameters. - Updated Dockerfile to copy stages instead of engines. - Enhanced existing tools and services for better integration with new stages. - Refactored task management in Celery to accommodate new stages and improve error handling.
61 lines
1.7 KiB
Python
61 lines
1.7 KiB
Python
import uuid
|
|
from enum import StrEnum
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class PreviewToolStatus(StrEnum):
|
|
WILL_RUN = "will_run"
|
|
SKIPPED_DISABLED = "skipped_disabled"
|
|
SKIPPED_NEEDS_KEY = "skipped_needs_key"
|
|
SKIPPED_NOT_APPLICABLE = "skipped_not_applicable"
|
|
|
|
|
|
class PreviewTool(BaseModel):
|
|
capability: str
|
|
label: str
|
|
status: PreviewToolStatus
|
|
reason: str | None = None
|
|
rate: int | None = None
|
|
threads: int | None = None
|
|
timeout: int | None = None
|
|
|
|
|
|
class PreviewPhase(BaseModel):
|
|
phase: str
|
|
label: str
|
|
tools: list[PreviewTool] = Field(default_factory=list)
|
|
|
|
|
|
class PreviewSummary(BaseModel):
|
|
auth_summary: str
|
|
custom_header_names: list[str] = Field(default_factory=list)
|
|
rate_summary: str
|
|
thread_multiplier: float
|
|
timeout_multiplier: float
|
|
http_protocol: str
|
|
follow_redirects: bool | None = None
|
|
excluded_subdomains_count: int = 0
|
|
excluded_paths_count: int = 0
|
|
excluded_ips_count: int = 0
|
|
excluded_subdomains: list[str] = Field(default_factory=list)
|
|
excluded_paths: list[str] = Field(default_factory=list)
|
|
excluded_ips: list[str] = Field(default_factory=list)
|
|
included_subdomains: list[str] = Field(default_factory=list)
|
|
proxy_name: str | None = None
|
|
estimated_duration_seconds: int = 0
|
|
estimated_duration_human: str = ""
|
|
|
|
|
|
class ScanPreview(BaseModel):
|
|
target_id: uuid.UUID
|
|
target_value: str
|
|
target_type: str
|
|
engine_id: uuid.UUID
|
|
engine_name: str
|
|
context_id: uuid.UUID | None = None
|
|
context_name: str | None = None
|
|
phases: list[PreviewPhase] = Field(default_factory=list)
|
|
summary: PreviewSummary
|
|
warnings: list[str] = Field(default_factory=list)
|