#!/usr/bin/env python3

"""
BRS-XSS DOM Vulnerability Types

Enumerations for DOM XSS vulnerability types and risk levels.

Company: EasyProTech LLC (www.easypro.tech)
Dev: Brabus
Modified: Sat 02 Aug 2025 09:35:54 MSK
Telegram: https://t.me/EasyProTech
"""

from enum import Enum


class VulnerabilityType(Enum):
    """DOM XSS vulnerability types"""
    DIRECT_ASSIGNMENT = "direct_assignment"           # Direct assignment
    FUNCTION_PARAMETER = "function_parameter"         # Through function parameter
    PROPERTY_INJECTION = "property_injection"         # Property injection
    EVENT_HANDLER = "event_handler"                   # Event handler injection
    URL_MANIPULATION = "url_manipulation"             # URL manipulation
    POSTMESSAGE_XSS = "postmessage_xss"              # PostMessage XSS
    WEBSOCKET_XSS = "websocket_xss"                  # WebSocket XSS
    STORAGE_XSS = "storage_xss"                      # localStorage/sessionStorage XSS
    TEMPLATE_INJECTION = "template_injection"         # Template injection
    JSON_INJECTION = "json_injection"                # JSON injection


class RiskLevel(Enum):
    """Risk levels"""
    CRITICAL = "critical"     # Critical
    HIGH = "high"            # High  
    MEDIUM = "medium"        # Medium
    LOW = "low"             # Low
    INFO = "info"           # Informational