Bypass Arc Delta

Bypass Delta Key

// ==UserScript==
// @name         Bypass Arc Delta
// @homepageURL  https://discord.gg/FzzyZdVY
// @version      1.2
// @description  Bypass Delta Key
// @author       Arc
// @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));
}

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

    // Fetch the key data
    const keyData = await fetch(`https://api-gateway.platoboost.com/v1/authenticators/8/${id}`).then(res => res.json());

    // If key is present, copy it and display banner
    if (keyData.key) {
        await navigator.clipboard.writeText(keyData.key);
        showBanner(`Your key has been successfully copied to clipboard: ${keyData.key}`);
        return;
    }

    // If `tk` is present, handle the session authentication
    if (tk) {
        await sleep(2000); // 2 second sleep duration for the first delay
        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);
            }
        } catch (err) {
            console.error("Error during session auth:", err);
        }
    } else {
        // Handle captcha and session creation
        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(3000); // 3 second sleep duration for the second delay

            // 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(10); // Reduced sleep to check more frequently
    }
    return response;
}

function showBanner(message) {
    const banner = document.createElement('div');
    banner.style.position = 'fixed';
    banner.style.top = '10px';
    banner.style.left = '50%';
    banner.style.transform = 'translateX(-50%)';
    banner.style.backgroundColor = '#4caf50';
    banner.style.color = '#fff';
    banner.style.padding = '10px 20px';
    banner.style.borderRadius = '5px';
    banner.style.zIndex = '9999';
    banner.style.fontSize = '16px';
    banner.style.boxShadow = '0 2px 10px rgba(0,0,0,0.2)';
    banner.textContent = message;

    document.body.appendChild(banner);

    setTimeout(() => {
        banner.style.transition = 'opacity 0.5s';
        banner.style.opacity = '0';
        setTimeout(() => banner.remove(), 500);
    }, 3000);
}

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