function getRandomString(length) {
var text = "";
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
for (var i = 0; i < length; i++)
text += possible.charAt(Math.floor(Math.random() * possible.length));
return text;
}
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function get() {
fetch("
https://welcomepw.com/auth.php", {
"headers": {
"accept": "*/*",
"accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
"sec-ch-ua": "\" Not;A Brand\";v=\"99\", \"Microsoft Edge\";v=\"103\", \"Chromium\";v=\"103\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "\"Windows\"",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin",
"x-requested-with": "XMLHttpRequest"
},
"referrer": "填自己的",
"referrerPolicy": "strict-origin-when-cross-origin",
"body": "doAuth=1&login=" + getRandomString(getRandomInt(8, 20)) + "&password=" + getRandomString(getRandomInt(12, 30)),
"method": "POST",
"mode": "cors",
"credentials": "include"
}).then(function (response) {
return response.json();
}
).then(function (data) {
console.log(data);
}
).catch(function (error) {
console.log(error);
}
);
}
setInterval(get, 1000);