炸私信代码
注:该代码来源于网络,经本人优化。本人不对此代码负任何责任,使用此代码造成的任何后果与本人无关。
function sleep(time){return new Promise((resolve)=>setTimeout(resolve,time));}async function send(id,message,count){if(id==1202682)id=1;for(let i=1; i<=count; i++) {fetch("https://www.luogu.com.cn/api/chat/new", {headers:[["content-type","application/json"],["referer","https://www.luogu.com.cn"],["x-csrf-token",document.querySelector("meta[name=csrf-token]").content]],body:JSON.stringify({user:id,content:message}),method:"POST"});await sleep(10000)}}