Captcha Solver for NitroType/NitroMath

Finds and solves captchas if botting and solves them.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Captcha Solver for NitroType/NitroMath
// @namespace    https://singdev.wixsite.com/sing-developments
// @version      0.1
// @description  Finds and solves captchas if botting and solves them.
// @author       You
// @match        https://nitrotype.com/*
// @match        https://nitromath.com/*
// @grant        GM_xmlhttpRequest
// ==/UserScript==

(function() {
    'use strict';

    // Your CaptchaAI API key
    const captchaApiKey = '96004159c29dec0535a846099332d4d2';

    // Function to find and solve captcha
    function solveCaptcha() {
        // Replace the following with your actual logic to find the captcha element
        const captchaElement = document.getElementById('captcha'); // Replace 'captcha' with the actual ID or selector

        if (captchaElement) {
            // Replace the following with your actual logic to extract captcha data
            const captchaData = captchaElement.getAttribute('data-captcha'); // Replace 'data-captcha' with the actual attribute

            // Make a request to CaptchaAI API
            GM_xmlhttpRequest({
                method: 'POST',
                url: 'https://ocr.captchaai.com/in.php',
                data: `key=${captchaApiKey}&captchaData=${captchaData}`, // Adjust parameters as needed
                headers: {
                    'Content-Type': 'application/x-www-form-urlencoded',
                },
                onload: function(response) {
                    // Handle the API response and extract the captcha solution
                    const captchaSolution = '...'; // Extract from the response

                    // Replace the following with your actual logic to fill in the captcha
                    captchaElement.value = captchaSolution;

                    // After solving the captcha, you might want to submit the form or perform other actions
                    // Replace the following with your actual logic
                    const formElement = captchaElement.closest('form');
                    if (formElement) {
                        formElement.submit();
                    }
                },
            });
        } else {
            console.log('Captcha element not found.');
        }
    }

    // Trigger the captcha-solving function
    solveCaptcha();

})();