Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not an issue but here is the assignment unlocker (mostly) unobfuscated lmao #3

Open
TeemSucks opened this issue Sep 6, 2023 · 0 comments

Comments

@TeemSucks
Copy link

idk

// ==UserScript==
// @name         Assignment Unlocker
// @namespace    http://tampermonkey.net/
// @version      2
// @description  Lets you start locked assignments
// @author       Tap
// @match        https://student.edgenuity.com/*
// @grant        none
// ==/UserScript==

// probobly dosnt work bc its not updated
(function () {
    var variables = ['href', '98EZTFoN', '1078293EqEPrr', 'substr', '1685964VXeNlO', 'location', 'length', '1jIzMrt', 'charAt', '508661iODNEB', '586hAwzQN', '2983nUIiZh', 'log', 'substring', 'enrollment', 'getElementsByClassName', '.core.learn.edgenuity.com/lmsapi/sle/api/enrollments/', '14371Rbtenu', 'classList', 'onclick', 'ActivityTile-status-gated', 'split', 'setAttribute', 'contains', 'document.location=', 'cookie', 'course-timeline', '856299FQrWQR', 'indexOf', 'addedNodes', '2996429VHlchH', 'is\x20timeline', '//r', 'found\x20locked\x20button', '/activity/', 'use\x20strict', 'Realm', 'https://student.edgenuity.com/enrollment/', 'parse', '1XolTPP'];

    // Function to access array elements
    var getVariable = function (index) {
        index = index - 0x143;
        var variable = variables[index];
        return variable;
    };

    var getVariableName = getVariable;

    // Initialization function
    (function (arr, target) {
        var currentIndex = getVariableName;
        while (true) {
            try {
                var result = parseInt(currentIndex(0x15a)) * parseInt(currentIndex(0x159)) + parseInt(currentIndex(0x156)) * parseInt(currentIndex(0x151)) - parseInt(currentIndex(0x153)) - parseInt(currentIndex(0x158)) * -parseInt(currentIndex(0x14e)) - parseInt(currentIndex(0x150)) * -parseInt(currentIndex(0x160)) + parseInt(currentIndex(0x16a)) - parseInt(currentIndex(0x145));
                if (result === target) break;
            } catch (error) {
                arr.push(arr.shift());
            }
        }
    }(variables, 0xdff08));

    var url, observerTimeout;

    // Function to read a cookie
    function readCookie(cookieName) {
        var separator = '=';
        var cookieArray = document.cookie.split(';');
        for (var i = 0; i < cookieArray.length; i++) {
            var cookie = cookieArray[i];
            while (cookie.charAt(0) === ' ')
                cookie = cookie.substring(1, cookie.length);
            if (cookie.indexOf(cookieName) === 0)
                return cookie.substring(cookieName.length + 1, cookie.length);
        }
        return null;
    }

    // Function to check the URL
    function checkURL() {
        var currentURL = document.location.href;
        if (url !== currentURL) {
            url = currentURL;
            clearTimeout(observerTimeout);
            console.log('URL changed');
            if (url.indexOf('/activity/') !== -1) {
                console.log('Activity URL detected');
                tryToStartObserver();
            }
        }
    }

    // Function to start the observer
    function tryToStartObserver() {
        if (document.getElementsByClassName('timeline').length === 0) {
            setTimeout(tryToStartObserver, 100);
            console.log('Waiting for timeline');
            return;
        }

        var tokenData = JSON.parse(readCookie('TokenData'));
        var currentURL = document.location.href;
        var startIndex = currentURL.indexOf('/activity/') + 11;
        var endIndex = startIndex + 36;
        var targetURL = 'https://student.edgenuity.com/enrollment/' + (tokenData.length === 1 ? '0' : '') + tokenData + currentURL.substring(startIndex, endIndex);

        var buttonElement = null;
        for (var element of document.getElementsByClassName('activity-button')) {
            if (element.classList.contains('ActivityTile-status-locked')) {
                console.log('Found locked button');
                buttonElement = element;
                element.setAttribute('onclick', 'document.location=\'' + targetURL + element.id + '\'');
            }
        }
    }

    // Create a MutationObserver
    var mutationObserver = new MutationObserver(function (mutations, observer) {
        for (var mutation of mutations) {
            for (var node of mutation.addedNodes) {
                if (node.classList.contains('timeline') || node.classList.contains('ActivityTile-status-locked')) {
                    console.log('Mutation observed');
                    tryToStartObserver();
                }
            }
        }
    });

    mutationObserver.observe(document.getElementsByClassName('activity-container')[0], { attributes: false, childList: true, subtree: true });

    url = document.location.href;
    setInterval(checkURL, 100);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant