0001以下、5ちゃんねるからVIPがお送りします
2023/04/23(日) 02:18:22.079ID:I1mUl1oN0const url = 'https://example.com/post';
const headers = {'User-Agent': 'Mozilla/5.0'};
const data = {'username': 'hacker', 'comment': 'spam spam spam'};
// 荒らし投稿を実行する関数
function postComment() {
// 対象サイトにPOSTリクエストを送信
fetch(url, {method: 'POST', headers: headers, body: new URLSearchParams(data)})
.then(response => {
// レスポンスコードをチェック
if (response.status == 200) {
console.log('Comment posted successfully!');
} else {
console.log('Failed to post comment.');
}
})
.catch(error => console.error(error));
}
// 10回の荒らし投稿を実行
for (let i = 0; i < 10; i++) {
postComment();
}