Plagued Soyjak.Party / The Sharty - The altchan born from the ashes of /qa/; also a containment thread

  • 🐕 I am attempting to get the site runnning as fast as possible. If you are experiencing slow page load times, please report it.
I have the code that they are using to make these bots should I make a Talk to Staff thread and share the code? It could be very useful.
If you think it'll help, please do so. At least if they are already of the code, at least you wanted to contribute to finding a solution.

Edit: For posterities sake, post the code and archive it if there was a source.
 
Last edited:
Edit: For posterities sake, post the code and archive it if there was a source.
Yes there was source code on the OP that was what the spoiler tag was for on their post btw it just linked to the code they're using. I did give the code to the moderators on a Talk to Staff thread.
 
I'M NOT AUTISTIC
I'M NOT AUTISTIC
THIS IS NOT AUTISTIC
RAAAAA in_the_mouth_of_madness_blue.jpg
 
post the code and archive it if there was a source.
The source code for this JavaScript is attached to this message for archival.

The provided code consists of two main asynchronous functions, reactToPostsFromLatest and reactToPost, which are designed to automate the process of reacting to posts on a platform.

The reactToPostsFromLatest function initiates the process by starting from a specific post ID, `20247737`, and iterates backwards through the posts in batches of three. It logs the starting post ID and each batch of post IDs it processes.

For each batch, it calls the reactToPost function for each post ID in parallel using Promise.all. After processing each batch, it waits for 100 milliseconds before moving to the next batch by decrementing the currentPostId by three. The reactToPost function handles the actual reaction to a single post. It constructs a URL for the reaction request and logs the URL. It then attempts to send a POST request to this URL with specific headers and a CSRF token obtained from the global XF.config.csrf. The function includes a retry mechanism, allowing up to five attempts to successfully react to a post.

If the response status is 200, it checks if the reaction was successful by examining the response data. If the reaction ID is null, it retries after a delay. If the response status is 403 or 404, it logs the status and skips the post. For other response statuses or errors, it retries up to the maximum number of attempts, logging errors and delays between retries. If all retries are exhausted without success, it logs a final error message.
 

Attachments

Last edited:
[WARNING: NEVER BEFORE SEEN LEVELS OF ARYAN BEHAVIOR]
Slight critique: you have to be somewhat targeted to really make the seethe flow, see also the A&N reaction seething drama over the years. Might work better to have it mass-rate specific posts in a given thread, perhaps with different criteria for choosing those posts in threads differing based on subforum, since that would be harder to immediately assume is just a shotgun raid and not multiple someones genuinely thinking a comment is autistic, the latter being far more likely to rustle jimmies and result in funny reactions.

Edit: don't forget that tophat and dumb reactions also can rustle jimmies.
 
The source code for this JavaScript is attached to this message for archival.

The provided code consists of two main asynchronous functions, reactToPostsFromLatest and reactToPost, which are designed to automate the process of reacting to posts on a platform.

The reactToPostsFromLatest function initiates the process by starting from a specific post ID, `20247737`, and iterates backwards through the posts in batches of three. It logs the starting post ID and each batch of post IDs it processes.

For each batch, it calls the reactToPost function for each post ID in parallel using Promise.all. After processing each batch, it waits for 100 milliseconds before moving to the next batch by decrementing the currentPostId by three. The reactToPost function handles the actual reaction to a single post. It constructs a URL for the reaction request and logs the URL. It then attempts to send a POST request to this URL with specific headers and a CSRF token obtained from the global XF.config.csrf. The function includes a retry mechanism, allowing up to five attempts to successfully react to a post.

If the response status is 200, it checks if the reaction was successful by examining the response data. If the reaction ID is null, it retries after a delay. If the response status is 403 or 404, it logs the status and skips the post. For other response statuses or errors, it retries up to the maximum number of attempts, logging errors and delays between retries. If all retries are exhausted without success, it logs a final error message.
Code:
async function reactToPostsFromLatest() {
    let currentPostId = 20247737;
    console.debug(`Starting from post ID: ${currentPostId}`);

    while (currentPostId > 0) {
        const batch = [currentPostId, currentPostId - 1, currentPostId - 2];
        console.debug(`Reacting to batch: ${batch.join(', ')}`);

        await Promise.all(batch.map(postId => reactToPost(postId)));

        await new Promise(resolve => setTimeout(resolve, 100));

        currentPostId -= 3;
    }
}

async function reactToPost(postId) {
    const reactionUrl = `/posts/${postId}/react?reaction_id=13`;
    console.debug(`Reacting to post at URL: ${reactionUrl}`);

    let retries = 5;
    let success = false;

    const csrfToken = XF.config.csrf;

    while (!success && retries > 0) {
        try {
            const response = await fetch(reactionUrl, {
                method: 'POST',
                credentials: 'include',
                headers: {
                    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0",
                    "Accept": "application/json, text/javascript, */*; q=0.01",
                    "Accept-Language": "en-US,en;q=0.5",
                    "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
                    "X-Requested-With": "XMLHttpRequest",
                    "Sec-GPC": "1",
                    "Sec-Fetch-Dest": "empty",
                    "Sec-Fetch-Mode": "cors",
                    "Sec-Fetch-Site": "same-origin",
                    "Priority": "u=0"
                },
                body: `_xfWithData=1&_xfToken=${encodeURIComponent(csrfToken)}&_xfResponseType=json`
            });

            if (response.status === 200) {
                const data = await response.json();
                if (data.reactionId === null) {
                    console.debug(`Reaction ID is null for post ID: ${postId}. Retrying...`);
                    retries--;
                    if (retries > 0) {
                        await new Promise(resolve => setTimeout(resolve, 1000));
                    } else {
                        console.error(`Max retries reached for post ID: ${postId}. Giving up.`);
                    }
                } else {
                    console.debug(`Successfully reacted to post ID: ${postId}`);
                    success = true;
                }
            } else if (response.status === 403 || response.status === 404) {
                console.debug(`Received ${response.status} for post ID: ${postId}. Skipping this post.`);
                return false;
            } else {
                console.error(`Failed to react to post ID: ${postId}. Status: ${response.status}`);
                retries--;
                if (retries > 0) {
                    await new Promise(resolve => setTimeout(resolve, 1000));
                } else {
                    console.error(`Max retries reached for post ID: ${postId}. Giving up.`);
                }
            }
        } catch (error) {
            console.error(`Error reacting to post ID: ${postId}`, error);
            retries--;
            if (retries > 0) {
                await new Promise(resolve => setTimeout(resolve, 1000));
            } else {
                console.error(`Max retries reached for post ID: ${postId}. Giving up.`);
            }
        }
    }

    return success;
}

reactToPostsFromLatest();
Code found in attachment.

DO NOT USE THIS CODE, EVER.
 
Slight critique: you have to be somewhat targeted to really make the seethe flow, see also the A&N reaction seething drama over the years. Might work better to have it mass-rate specific posts in a given thread, perhaps with different criteria for choosing those posts in threads differing based on subforum, since that would be harder to immediately assume is just a shotgun raid and not multiple someones genuinely thinking a comment is autistic, the latter being far more likely to rustle jimmies and result in funny reactions.

Edit: don't forget that tophat and dumb reactions also can rustle jimmies.
if any soyteens are reading this make a bot that specifically only targets the autistic thunderdome. it would be really funny.
 
Slight critique: you have to be somewhat targeted to really make the seethe flow, see also the A&N reaction seething drama over the years. Might work better to have it mass-rate specific posts in a given thread, perhaps with different criteria for choosing those posts in threads differing based on subforum, since that would be harder to immediately assume is just a shotgun raid and not multiple someones genuinely thinking a comment is autistic, the latter being far more likely to rustle jimmies and result in funny reactions.

Edit: don't forget that tophat and dumb reactions also can rustle jimmies.
Optimistic is my personal favorite because it looks the faggiest so it's like you're covering them in an AIDS quilt.
 
  • Optimistic
Reactions: Randy Facalding
Back