RandomSeedChanger["stake.com"]

Change SeedPair with a customizable-random Interval on Stake.com

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

Bạn sẽ cần cài đặt một tiện ích mở rộng như Tampermonkey hoặc Violentmonkey để cài đặt kịch bản này.

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

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

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

You will need to install a user script manager extension to install this script.

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         RandomSeedChanger["stake.com"]
// @description  Change SeedPair with a customizable-random Interval on Stake.com
// @match        https://stake.com/*
// @author       Rain_Bot | rainbot.ch
// @namespace    https://greasyfork.org/users/710212
// @version      5.2rev7
// @license      Open Source
// @run-at       document-end
// ==/UserScript==

var minInterval = prompt("Set Your minimum interval in Minutes", 10); //set your minimum interval in minutes
var maxInterval = prompt("Set Your maximum interval in Minutes", 30); //set your maximum interval in minutes

function getRandom(min, max) {
    return Math.random() * (max - min) + min;
}

function rotateSeedPair() {
    function getCookie(cname) {
        var name = cname + "=";
        var decodedCookie = decodeURIComponent(document.cookie);
        var ca = decodedCookie.split(';');
        for (var i = 0; i < ca.length; i++) {
            var c = ca[i];
            while (c.charAt(0) == ' ') {
                c = c.substring(1);
            }
            if (c.indexOf(name) === 0) {
                return c.substring(name.length, c.length);
            }
        }
        return "";
    }

    function generateSeed(length) {
        let result = "";
        const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
        const expectedPackages = new Uint32Array(length);
        window.crypto.getRandomValues(expectedPackages);
        for (const expectedPackage of expectedPackages) {
            result += characters.charAt(expectedPackage % characters.length);
        }
        return result;
    }
    fetch("https://api.stake.com/graphql", {
        "method": "POST",
        "headers": {
            "Content-Type": "application/json",
            "x-access-token": getCookie("session")
        },
        "body": "{\"query\":\"mutation RotateSeedPair($seed: String!) {\\n  rotateSeedPair(seed: $seed) {\\n    clientSeed {\\n      user {\\n        id\\n        activeClientSeed {\\n          id\\n          seed\\n          __typename\\n        }\\n        activeServerSeed {\\n          id\\n          nonce\\n          seedHash\\n          nextSeedHash\\n          __typename\\n        }\\n        __typename\\n      }\\n      __typename\\n    }\\n    __typename\\n  }\\n}\\n\",\"variables\":{\"seed\":\"" + generateSeed(32) + "\"},\"operationName\":\"RotateSeedPair\"}"
    }).then((FieldOperation) => {
        return FieldOperation.json();
    }).then((data) => {
        console.log("Active Client Seed\n" + data.data.rotateSeedPair.clientSeed.user.activeClientSeed.seed);
        console.log("Active Server Seed (Hashed)\n" + data.data.rotateSeedPair.clientSeed.user.activeServerSeed.seedHash);
        console.log(data);
    });
}

function init() {
    var interval = Math.floor(getRandom(minInterval * 6e1 * 1e3, maxInterval * 6e1 * 1e3));
    console.log("\n\n\nSeed Change @ " + new Date().toLocaleTimeString());
    rotateSeedPair();
    setTimeout(() => {console.log("Next Swap in " + (interval / 1e3 / 6e1).toFixed(2) + " minutes");}, 1337);
    setTimeout(() => {init();}, interval);
}

window.onload = function loadpage() {
    if (document.readyState === 'complete') {
        console.clear();
        console.log('Pageload:\t' + '%c' + document.readyState.toUpperCase(), 'color:green');
        init();
    }
};