RARBG threat defence bypasser

Automatically fill & submit captcha

目前為 2020-11-15 提交的版本,檢視 最新版本

// ==UserScript==
// @match       https://rarbgmirrored.org/threat_defence.php*
// @name        RARBG threat defence bypasser
// @description Automatically fill & submit captcha
// @grant       none
// @version     1.0.0
// @author      KaKi87
// @namespace   https://git.kaki87.net/KaKi87/userscripts/src/branch/master/rarbgThreatDefenceBypasser
// @require     https://unpkg.com/[email protected]/dist/tesseract.min.js
// ==/UserScript==

window.addEventListener('DOMContentLoaded', () => {

    const waitInterval = setInterval(async () => {

        const img = document.querySelector('img[src^="/threat_captcha.php"]');

        if(!img) return;

        clearInterval(waitInterval);

        const { data: { text } } = await Tesseract.recognize(img);

        document.querySelector('#solve_string').setAttribute('value', text.trim());

        document.querySelector('#button_submit').click();

    }, 100);

});