Created
December 27, 2025 02:19
-
-
Save x0root/10ceb91f4753acca630cc12e422858bb to your computer and use it in GitHub Desktop.
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
| from flask import Flask, make_response | |
| app = Flask(__name__) | |
| @app.route("/") | |
| def index(): | |
| html = """ | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>XSS Demo</title> | |
| </head> | |
| <body> | |
| <h2>XSS Proof of Concept</h2> | |
| <script> | |
| alert("Domain: " + document.domain); | |
| alert("Cookies: " + document.cookie); | |
| </script> | |
| </body> | |
| </html> | |
| """ | |
| resp = make_response(html) | |
| resp.set_cookie("session_id", "xss_demo_cookie") | |
| return resp | |
| if __name__ == "__main__": | |
| app.run(host="127.0.0.1", port=5000, debug=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment