Files
rengine/shared/enums/scan.py
T
Yogesh Ojha a5e6c0ac0d feat: add target enrichment, vhost discovery, and WAF detection stages
- 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.
2026-09-02 10:18:03 +05:30

69 lines
1.5 KiB
Python

from enum import Enum
class ScanStatus(Enum):
PENDING = "pending"
RUNNING = "running"
COMPLETED = "completed"
FAILED = "failed"
CANCELLED = "cancelled"
class ScanActivityStatus(Enum):
PENDING = "pending"
RUNNING = "running"
SUCCESS = "success"
FAILED = "failed"
SKIPPED = "skipped"
ABORTED = "aborted"
SCAN_LIVE_STATUSES = (ScanStatus.PENDING.value, ScanStatus.RUNNING.value)
SCAN_TERMINAL_STATUSES = (
ScanStatus.COMPLETED.value,
ScanStatus.FAILED.value,
ScanStatus.CANCELLED.value,
)
ACTIVITY_TERMINAL_STATUSES = (
ScanActivityStatus.SUCCESS.value,
ScanActivityStatus.FAILED.value,
ScanActivityStatus.SKIPPED.value,
ScanActivityStatus.ABORTED.value,
)
class Intensity(Enum):
PASSIVE = "passive"
NORMAL = "normal"
AGGRESSIVE = "aggressive"
INTENSITIES = tuple(i.value for i in Intensity)
class Phase(Enum):
DISCOVERY = "discovery"
EXPANSION = "expansion"
DEPTH = "depth"
FINALIZE = "finalize"
PHASE_ORDER: dict[str, int] = {
Phase.DISCOVERY.value: 0,
Phase.EXPANSION.value: 1,
Phase.DEPTH.value: 2,
Phase.FINALIZE.value: 3,
}
class ScanEventKind(Enum):
SCAN_STARTED = "scan_started"
SCAN_COMPLETED = "scan_completed"
SCAN_FAILED = "scan_failed"
SCAN_CANCELLED = "scan_cancelled"
STAGE_STARTED = "stage_started"
STAGE_PROGRESS = "stage_progress"
STAGE_COMPLETED = "stage_completed"
COMMAND_STARTED = "command_started"
COMMAND_FINISHED = "command_finished"