Giter VIP home page Giter VIP logo

google-forms-unlocker's Introduction

google-forms-unlocker

Tired of assignments in google forms having locked mode and not being able to do them on other computers? (or if you want to cheat which i do not condone at all.) Use this :)

For use in personal computers, use this userscript:

You also need an extension or app that changes your User Agent, and changes it to something like this:

Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36

For use in chromebooks, you need access to console which may be blocked by School Policy.

If it is blocked, then you unfortunately can't use this.

fetch("https://cdn.jsdelivr.net/gh/xNasuni/google-forms-unlocker@latest/script.user.js").then(s => s.text()).then(s => eval(s))

Run the script above in a google form and you should see 2 buttons appear, press the one on the left if you want to do the quiz normally, and press the one on the right to do it without actually being in locked mode.

image

If you see the error below, then just run the script below in a quiz on a chromebook, they disabled Eval and other things for Security Purposes. image

Instructions

  1. Open developer console on a Google Form, and do not press Start quiz because that will put you in locked mode.
  2. Paste the script and run it
  3. It should open a new window, if not and some alert says that it stopped a popup from happening then you need to allow it.
  4. If it does open a new window, you need to do 1 of 2 things, if it shows up as Start Quiz, then you need you close the tab (Ctrl + W), and re-run it until it actually opens it.
  5. When it's opened, you're free to leave the tab and search for stuff or whatever you'd like, as I disabled the features for the website to tell when you leave the page.

!! IF YOU RUN THE SCRIPT AND YOU ARE IN THE QUIZ, DONT CLOSE THE TAB BECAUSE THEN TEACHERS WILL SEE THAT YOU OPENED IT TWICE WHEN YOU GO TO OPEN IT AGAIN. I'M LOOKING FOR A BYPASS FOR THIS BUT IN THE MEANTIME DON'T CLOSE THE QUIZ OR ELSE TEACHERS WILL GET SENT AN EMAIL AND THIS WILL SHOW UP ON YOUR SCORE !!

image

var Wnd = window.open(location.href, "_blank");

Wnd.addEventListener("load", () => {

    Wnd.document.originalAEL = Wnd.document.addEventListener;

    var IntervalId = -1;
    IntervalId = setInterval(() => {
        Wnd.Object.defineProperty(Wnd.document, 'hidden', {
            value: false,
            writable: false
        })
        Wnd.Object.defineProperty(Wnd.document, 'visibilityState', {
            value: "visible",
            writable: false
        })
        Wnd.Object.defineProperty(Wnd.document, 'webkitVisibilityState', {
            value: "visible",
            writable: false
        })
        Wnd.Object.defineProperty(Wnd.document, 'mozVisibilityState', {
            value: "visible",
            writable: false
        })
        Wnd.Object.defineProperty(Wnd.document, 'msVisibilityState', {
            value: "visible",
            writable: false
        })
        if (Wnd.document.originalAEL == undefined) {
            Wnd.document.originalAEL = Wnd.document.addEventListener;
        }
        Wnd.document.addEventListener = function(eventType, method, options) {
            Wnd.console.log(`type ${eventType} registered with`, method)
            if (eventType == 'mozvisibilitychange' || eventType == 'webkitvisibilitychange' || eventType == 'msvisibilitychange' || eventType == 'visibilitychange') {
                return;
            } else {
                return Wnd.document.originalAEL.apply(this, arguments)
            }
        }
    }, 100); // "anti" anti cheat incase anything gets added ig ill have to hide all these public vars
    Wnd.SpoofStage = "spoof.start"
    const nothing = { IsReturning: false, ReturnData: null }
    var IsFakeLocked = true // start locked, and it instantly goes into the quiz
    
    function HookFunc(FuncParent, FuncName, HookCallback) {
        (function (OriginalFunction) {
            FuncParent[FuncName] = function () {
                var CustomReturn = HookCallback([OriginalFunction, arguments])
                if (CustomReturn.IsReturning == true) {
                    arguments[2](CustomReturn.ReturnData) // return fake data with fake locked mode variable
                    return CustomReturn.ReturnData; // prevent communication with locker-ext
                }
                var ReturnValue = OriginalFunction.apply(this, arguments)
    
                return ReturnValue;
            }
        }(FuncParent[FuncName]))
    }
    
    function HandleSMHook(HookData) {
        var ReturnData = nothing;
        const ExtId = HookData[1][0]
        if (ExtId != "gndmhdcefbhlchkhipcnnbkcmicncehk") { return nothing; }
    
        const ReqCmd = HookData[1][1]['command']
    
        switch (ReqCmd) {
            case 'lock':
                IsFakeLocked = true
                ReturnData.IsReturning = true
                ReturnData.ReturnData = { locked: IsFakeLocked }
                break;
            case 'isLocked':
                ReturnData.IsReturning = true
                ReturnData.ReturnData = { locked: IsFakeLocked }
                break;
            case 'unlock':
                IsFakeLocked = false
                ReturnData.IsReturning = true
                ReturnData.ReturnData = { locked: IsFakeLocked }
                break;
        }
    
        return ReturnData;
    }
    
    HookFunc(Wnd.chrome.runtime, 'sendMessage', HandleSMHook);
})

google-forms-unlocker's People

Contributors

xnasuni avatar

Stargazers

pollux avatar Jgc7 avatar Moz avatar  avatar Jero on Github avatar  avatar

Watchers

 avatar

google-forms-unlocker's Issues

omg

this is coded like extremely bad i tested it on chrome firefox and like my chromebook and they all work so hopefully it works for every one else that wnats to u se it but this code is so unreadable i cant bleieve it even works

ill organize it if i can later i got more important things

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.