kxBypass Executor Bypass [only Swift]

Bypasses Swift keysystem (works alongside kxBypass Shortlinks Bypasser)

目前為 2025-04-25 提交的版本,檢視 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         kxBypass Executor Bypass [only Swift]
// @namespace    https://discord.gg/pqEBSTqdxV
// @version      1.0
// @description  Bypasses Swift keysystem (works alongside kxBypass Shortlinks Bypasser)
// @author       awaitlol.
// @match        https://key.getswift.gg/ks/checkpoint/*
// ==/UserScript==

(function () {
    'use strict';

    setTimeout(() => {
        ['click', 'mousedown', 'mouseup'].forEach(evt => {
            window.addEventListener(evt, e => e.stopPropagation(), true);
        });
        document.body.onclick = null;
        document.documentElement.onclick = null;

        const captchaWidget = document.querySelector('.captcha-area');
        if (!captchaWidget) {
            console.error('⚠️ CAPTCHA area not found.');
            return;
        }

        const overlay = document.createElement('div');
        overlay.style.position = 'fixed';
        overlay.style.top = '0';
        overlay.style.left = '0';
        overlay.style.width = '100vw';
        overlay.style.height = '100vh';
        overlay.style.backgroundColor = '#000c';
        overlay.style.display = 'flex';
        overlay.style.alignItems = 'center';
        overlay.style.justifyContent = 'center';
        overlay.style.zIndex = '999999';

        overlay.appendChild(captchaWidget);

        const keepSet = new Set();
        let el = captchaWidget;
        while (el) {
            keepSet.add(el);
            el = el.parentElement;
        }

        Array.from(document.body.children).forEach(child => {
            if (!keepSet.has(child)) {
                child.remove();
            }
        });

        document.body.appendChild(overlay);

        const checkHCaptchaLoaded = setInterval(() => {
            if (window.hcaptcha) {
                clearInterval(checkHCaptchaLoaded);
                startCaptchaCheck();
            }
        }, 100);

        function startCaptchaCheck() {
            const currentUrl = window.location.href;
            const interval = setInterval(() => {
                try {
                    const responseToken = hcaptcha.getResponse();
                    if (responseToken) {
                        console.log('✅ CAPTCHA solved! Token:', responseToken);
                        clearInterval(interval);

                        const xsrf = document.cookie
                            .split('; ')
                            .find(c => c.startsWith('_xsrf='))
                            ?.split('=')[1] || '';

                        const formData = new URLSearchParams();
                        formData.append('_xsrf', xsrf);
                        formData.append('g-recaptcha-response', responseToken);
                        formData.append('h-captcha-response', responseToken);

                        const form = document.createElement('form');
                        form.method = 'POST';
                        form.action = currentUrl;
                        form.style.display = 'none';

                        for (const [key, val] of formData.entries()) {
                            const input = document.createElement('input');
                            input.type = 'hidden';
                            input.name = key;
                            input.value = val;
                            form.appendChild(input);
                        }

                        document.body.appendChild(form);
                        form.submit();
                    }
                } catch (e) {
                    console.error('Error checking hCaptcha:', e);
                    clearInterval(interval);
                }
            }, 100);
        }
    }, 100);
})();