platoplato v1

ez

目前為 2025-01-29 提交的版本,檢視 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         platoplato v1
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  ez
// @author       wploits
// @match        https://auth.platoboost.com/*
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    let button = document.getElementById('makeRequestButton');

    if (!button) {
        button = document.createElement('button');
        button.id = 'makeRequestButton';
        button.textContent = 'Bypass Plato!';
        button.style.position = 'absolute';
        button.style.top = '10px';
        button.style.left = '10px';
        button.style.padding = '10px 20px';
        button.style.fontSize = '16px';
        button.style.backgroundColor = '#007bff';
        button.style.color = '#fff';
        button.style.border = 'none';
        button.style.cursor = 'pointer';
        document.body.appendChild(button);
    }

    button.addEventListener('click', function() {
        const currentPath = window.location.pathname.substring(1);

        let requestUrl = `https://auth.platoboost.com/api/session/step?ticket=${currentPath}&service=1`;

        const urlParams = new URLSearchParams(window.location.search);
        const hash = urlParams.get("hash");

        if (hash) {
            requestUrl += `&hash=${hash}`;
        }

        console.log(requestUrl);

        fetch(requestUrl, {
            method: "PUT",
            headers: {
                "Content-Type": "application/json"
            },
            body: JSON.stringify({
                captcha: null,
                reference: "empty",
                payload: "empty"
            })
        })
        .then(response => response.json())
        .then(data => {
            if (data.success === true) {
                const redirectUrl = data.data?.url;
                if (redirectUrl) {
                    window.location.href = redirectUrl;
                } else {
                    alert("URL not found in the response data.");
                }
            } else {
                alert("First attempt failed: Retrying with service=2.");
                makeRequest(requestUrl, 2);
            }
        })
        .catch(error => console.error("Error:", error));
    });

    function makeRequest(url, serviceValue) {
        let updatedUrl = url.replace(/&service=\d+/, `&service=${serviceValue}`);

        const currentParams = new URLSearchParams(window.location.search);
        const hashValue = currentParams.get("hash");

        if (hashValue) {
            updatedUrl += `&hash=${hashValue}`;
        }

        console.log(updatedUrl);

        fetch(updatedUrl, {
            method: "PUT",
            headers: {
                "Content-Type": "application/json"
            },
            body: JSON.stringify({
                captcha: null,
                reference: "empty",
                payload: "empty"
            })
        })
        .then(response => response.json())
        .then(data => {
            if (data.success === true) {
                const redirectUrl = data.data?.url;
                if (redirectUrl) {
                    window.location.href = redirectUrl;
                } else {
                    alert("URL not found in the response data.");
                }
            } else {
                alert("Second attempt failed: Success is still false.");
            }
        })
        .catch(error => console.error("Error:", error));
    }

})();