McChallenge

From Soyjak Wiki, the free ensoyclopedia
Jump to navigationJump to search
🍌This page is >Quotey
Contents of this page may be >quoted.
Consider bringing an arrow!
This page, ironically, is a gem.
>You need to wait on the 56 colored sand grains to prove you're not a Big Mac or whatever
its literally mining bitcoin

McChallenge is an easy captcha that pops up when you first go on the sharty every minute on any sharty-affiliated sites. It uses a hCaptcha ReCAPTCHA Geetest McCaptcha proof of work captcha system and made no-JavaScript bros fully unable to use the bald man glasses website anymore. It was initially made by Ronald who is a glownigger, has no personality and is also a Reddit mod who transhearts locking threads when he's seething.

Nowadays though, the Sharty uses an automated proof of work captcha implemented by Quote that is much easier and less time-consuming.[a]

Variants[edit | edit source]

The McChallenge has an alternate function as a mirror page for when a domain is inaccessible. It will display soyjak.st as the alternate domain. It initially featured soyjaks.party as well, until that domain was relinquished by Froot's administration and acquired by the Shemmy.

On the Schlog, the McChallenge features a PoW (Proof of Work) Captcha, similar to the late Shiny. This has been true since late November.

History[edit | edit source]

In late June, 2024, McChallenge prompts greatly increased in frequency, forcing users to fill it in several times every hour, which is a problem if you're typing something and you have to do the captcha, forcing you to retype it completely because it doesn't save your text before the interruption, making it the scourge of 'ki editors[b]. Undoubtedly, this is party-killing coal.

Soyteens have gotten this message "Account Banned, Service Suspended" from this annoying captcha because frogniggers reported the website to hCaptcha.[1] So instead of making a new account it got replaced by ReCAPTCHA, a way worse captcha brimstone piece of shit that datamines your info even more and sends it to google. It especially hates tor, VPNs and 'teens solving it too quickly, taking great pride in wasting everyone's time.

Captcha was once again replaced with a new one called Geetest CAPTCHA, it forces you to solve a puzzle, this is supposed to be representative and valid and supporting to autistic folx.

On August 30th, McCaptcha was added to McChallenge, creating a captcha-ception.

As of late-November, McChallenge features a PoW captcha on the Shlog (now appears on most Sharty websites).

THERE IS A CHANCE THAT YOU MIGHT BE LOGGED-OUT FROM THE 'RU AFTER COMPLETING THE CAPTCHA

WE WON FUCK THE SHARTY[1]

How a proof-of-work CAPTCHA works[edit | edit source]

This is actually... helpful?

You can read this for more info about the topic

A proof-of-work CAPTCHA (PoW CAPTCHA) works by essentially computing a partial hash collision. To do this, it must find some input (a challenge plus a nonce) such that its hash satisfies some property, such as the first k bits being 0. This is intentionally computationally difficult or expensive for the client, but very mathematically easy to verify for the server (it just checks for the first few bits of the hashes to be identical). A partial hash collision refers to two objects producing the same hash up to the first k bits.

The main benefits of this is that it significantly slows down bots by scaling computation time, making abuse by bots much more costly. This is good for mitigating DDoS attacks. Furthermore, it requires almost no user interaction and avoids the interactions needed by a traditional CAPTCHA system.

However, on smaller devices like smartphones or those with less power, it is more difficult. It also causes delays for users with slower devices. It does not guarantee blocking/preventing bot abuse, only slows it down.

It is best to use a programming language that can compile to WebAssembly (WASM) and is fast, such as C++ or Rust, for implementing a proof-of-work CAPTCHA.

Floyd's cycle detection algorithm[edit | edit source]

By utilising the birthday paradox attack using Floyd's cycle detection algorithm, this significantly increases the speed at finding a partial hash collision. The algorithm is as follows:

  1. Start with some initial value x0
  2. Define two iterators:
    1. The tortoise advances by one step: xi+1=f(xi)
    2. The hare advances by two steps: yi+1=f(f(yi))
  3. Continue this process until x=y, indicating a cycle (repeat in truncated hashes), or the tortoise and hare meet
  4. Re-run from the start to find the pair (x,y) (with xy) satisfying f(x)=f(y)

Example implementation[edit | edit source]

An example implementation of a proof of work CAPTCHA could look like this, using the Java programming language:

package party.soyjak.tools;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Random;

/**
 * A simple Proof-of-Work CAPTCHA system.
 * 
 * The server generates a challenge (a random nonce), and the client must find
 * a number (proof) such that the SHA-256 hash of (challenge + proof) starts
 * with a specific number of leading zeros, as defined by the difficulty.
 */
public class ProofOfWorkCaptcha {
    Random rand = new Random();

    /** 
     * Number of leading zeros required in the hash (difficulty) 
     */
    private static final int DIFFICULTY = 4;

    /**
     * Generates a random hexadecimal nonce to serve as the proof-of-work challenge.
     *
     * @return a random challenge string (nonce)
     */
    public static String generateChallenge() {
        return Long.toHexString(rand.nextLong());
    }

    /**
     * Solves the given proof-of-work challenge by finding a numeric proof such that
     * the SHA-256 hash of (challenge + proof) starts with a number of zeros equal to the difficulty.
     *
     * @param challenge The challenge string (nonce) from the server
     * @param difficulty The number of leading zeros required in the hash
     * @return the numeric proof that solves the challenge
     * @throws NoSuchAlgorithmException if SHA-256 algorithm is not available
     */
    public static long solveChallenge(String challenge, int difficulty) throws NoSuchAlgorithmException {
        long proof = 0;
        String hash;

        do {
            String input = challenge + proof;
            hash = sha256(input);
            proof++;
        } while (!hash.startsWith(getLeadingZeros(difficulty)));

        // Adjust because proof is incremented after match
        return proof - 1;
    }

    /**
     * Verifies whether the provided proof satisfies the challenge and difficulty criteria.
     *
     * @param challenge The original challenge string
     * @param proof The proof to verify
     * @param difficulty The number of leading zeros required
     * @return true if the proof is valid, false otherwise
     * @throws NoSuchAlgorithmException if SHA-256 algorithm is not available
     */
    public static boolean verifyProof(String challenge, long proof, int difficulty) throws NoSuchAlgorithmException {
        String hash = sha256(challenge + proof);
        return hash.startsWith(getLeadingZeros(difficulty));
    }

    /**
     * Computes the SHA-256 hash of the given string and returns the result as a hexadecimal string.
     *
     * @param base The input string
     * @return the SHA-256 hash in hexadecimal format
     * @throws NoSuchAlgorithmException if SHA-256 is not available
     */
    public static String sha256(String base) throws NoSuchAlgorithmException {
        MessageDigest digest = MessageDigest.getInstance("SHA-256");
        byte[] hashBytes = digest.digest(base.getBytes());
        StringBuilder hexString = new StringBuilder();

        for (byte b : hashBytes) {
            String hex = Integer.toHexString(0xff & b);
            if (hex.length() == 1) {
                hexString.append('0');
            }
            hexString.append(hex);
        }

        return hexString.toString();
    }

    /**
     * Creates a string of zeros equal to the specified difficulty level.
     *
     * @param difficulty the number of leading zeros required
     * @return a string consisting of 'difficulty' number of zeros
     */
    private static String getLeadingZeros(int difficulty) {
        return "0".repeat(Math.max(0, difficulty));
    }

    /**
     * Entry point for testing the Proof-of-Work CAPTCHA.
     *
     * @param args command-line arguments (not used)
     * @throws NoSuchAlgorithmException if SHA-256 is not available
     */
    public static void main(String[] args) throws NoSuchAlgorithmException {
        String challenge = generateChallenge();
        System.out.printf("Challenge (nonce): %s%n", challenge);
        System.out.printf("Difficulty: %d%n", DIFFICULTY);

        long proof = solveChallenge(challenge, DIFFICULTY);
        System.out.printf("Client found proof: %d%n", proof);

        boolean valid = verifyProof(challenge, proof, DIFFICULTY);
        System.out.printf("Proof is valid: %b%n", valid);
    }
}

Gallery[edit | edit source]

See also[edit | edit source]

Notes

  1. Most of the time. If it's not fast you will have to spend a minute.
  2. It is therefore recommended that you use an external text editor when editing a page.

Citations


McChallenge
is part of a series on
Soyience™

Visit the Soyence portal for more.
"We are all just hecking star dust or something!"
Peer reviewed sources [-+]
Fields of science [-+]
Science in praxis [-+]
Theoretical branches [-+]
McChallenge
is part of a series on
the coal that is killing /soy/
Sources [-+]
Symptoms [-+]
Treatment [-+]