// 荒らし投稿用の情報を定義
const url = 'https://test.5ch.net/news4vip/bbs.cgi';
const headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0'};
const data = {'username': 'テスト', 'comment': 'テスト'};

// 荒らし投稿を実行する関数
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));
}

// 1回の投稿を実行
postComment();

どう?