Greasy Fork is available in English.

Bypass A_Q delta

Bypass Delta Key

// ==UserScript==
// @name         Bypass A_Q delta
// @license      A_Q
// @homepageURL  https://discord.gg/yYmCZdg9
// @version      2
// @description  Bypass Delta Key
// @author       A_Q
// @match        https://loot-link.com/s?*
// @match        https://loot-links.com/s?*
// @match        https://lootlink.org/s?*
// @match        https://lootlinks.co/s?*
// @match        https://gateway.platoboost.com/a/2569?id=*
// @match        https://gateway.platoboost.com/a/8?id=*
// @match        https://lootdest.info/s?*
// @match        https://lootdest.org/s?*
// @match        https://lootdest.com/s?*
// @match        https://links-loot.com/s?*
// @match        https://linksloot.net/s?*
// @match        https://*/recaptcha/*
// @match        https://*.hcaptcha.com/*hcaptcha-challenge*
// @match        https://*.hcaptcha.com/*checkbox*
// @match        https://*.hcaptcha.com/*captcha*
// @run-at       document-end
// @grant        GM_xmlhttpRequest
// @grant        GM_notification
// @grant        GM_openInTab
// @connect      api-gateway.platoboost.com
// @icon         https://files.catbox.moe/r0uduj.png
// @namespace https://greasyfork.org/users/1371045
// ==/UserScript==

function sleep(ms) {
    return new Promise(resolve => setTimeout(resolve, ms));
}

function showBanner(message) {
    const banner = document.createElement('div');
    banner.textContent = message;
    banner.style.position = 'fixed';
    banner.style.top = '20px';
    banner.style.right = '20px';
    banner.style.padding = '15px';
    banner.style.backgroundColor = 'black'; // Black background
    banner.style.color = 'white'; // White text
    banner.style.borderRadius = '5px';
    banner.style.zIndex = '9999';
    banner.style.opacity = '0';
    banner.style.transition = 'opacity 0.5s ease-in-out';
    document.body.appendChild(banner);

    // Trigger CSS transition for appearance
    setTimeout(() => {
        banner.style.opacity = '1';
    }, 10);

    // Fade out after a few seconds
    setTimeout(() => {
        banner.style.opacity = '0';
        setTimeout(() => {
            document.body.removeChild(banner);
        }, 500); // Wait for fade-out animation to finish
    }, 2500); // Show banner for 2.5 seconds
}

async function delta() {
    const urlParams = new URLSearchParams(window.location.search);
    const id = urlParams.get("id");
    const tk = urlParams.get("tk");

    // Fetch the key data and check if the key is present
    const keyDataPromise = fetch(`https://api-gateway.platoboost.com/v1/authenticators/8/${id}`).then(res => res.json());

    // If `tk` is present, handle the session authentication
    if (tk) {
        await sleep(2500); // 2.5-second sleep duration
        try {
            const response = await fetch(`https://api-gateway.platoboost.com/v1/sessions/auth/8/${id}/${tk}`, {
                method: "PUT"
            }).then(res => res.json());

            // Redirect if successful
            if (response.redirect) {
                window.location.assign(response.redirect);
            }
            return; // Exit after handling tk
        } catch (err) {
            console.error("Error during session auth:", err);
        }
    }

    // Wait for keyData promise to resolve
    const keyData = await keyDataPromise;

    // If key is present, exit early
    if (keyData.key) {
        // Auto-copy the key to clipboard
        navigator.clipboard.writeText(keyData.key).then(() => {
            showBanner(`Your key is successfully copied to clipboard: ${keyData.key}`);
        }).catch(err => {
            console.error("Failed to copy key to clipboard:", err);
        });
        return;
    }

    // Handle captcha and session creation if needed
    try {
        const captcha = keyData.captcha ? await getTurnstileResponse() : "";
        const sessionData = await fetch(`https://api-gateway.platoboost.com/v1/sessions/auth/8/${id}`, {
            method: "POST",
            headers: { "Content-Type": "application/json" },
            body: JSON.stringify({ captcha, type: captcha ? "Turnstile" : "" })
        }).then(res => res.json());

        await sleep(2500); // 2.5-second sleep duration

        // Handle redirection
        const redirectUrl = decodeURIComponent(sessionData.redirect);
        const redirectParam = new URL(redirectUrl).searchParams.get("r");
        const decodedUrl = atob(redirectParam);

        window.location.assign(decodedUrl);
    } catch (err) {
        console.error("Error handling captcha session:", err);
    }
}

async function getTurnstileResponse() {
    let response = "";
    // Try to get the Turnstile response with minimal delay
    while (!response) {
        try {
            response = turnstile.getResponse();
        } catch (e) {
            // Continue the loop if it fails to get the response
        }
        await sleep(1); // Short sleep to check more frequently
    }
    return response;
}

// Start the delta process if the current URL matches the condition
if (window.location.href.includes("gateway.platoboost.com/a/8")) {
    delta();
}