CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
Path: blob/main/cheats/global/floodGame.js
Views: 1236
/**1* @license StewartPrivateLicense-2.0.12* Copyright (c) 05Konz 20233*4* You may not reproduce or distribute any code inside this file without the licenser's permission.5* You may not copy, modify, steal, skid, or recreate any of the code inside this file.6* You may not under any circumstance republish any code from this file as your own.7*8* ALL TERMS STATED IN THE LINK BELOW APPLY ASWELL9* https://github.com/05Konz/Blooket-Cheats/blob/main/LICENSE10*/1112/* THE UPDATE CHECKER IS ADDED DURING COMMIT PREP, THERE MAY BE REDUNDANT CODE, DO NOT TOUCH */1314(() => {15const cheat = (async () => {16let i = document.createElement('iframe');17document.body.append(i);18window.prompt = i.contentWindow.prompt.bind(window);19i.remove();2021const id = prompt("Game ID:");22const name = prompt("Name:");23const amount = parseInt(prompt("Amount:"));2425let cache = Object.values(webpackJsonp.push([[], { ['']: (_, a, b) => { a.cache = b.c }, }, [['']]]).cache);26const axios = cache.find((x) => x.exports?.a?.get).exports.a;27const firebase = cache.find(x => x.exports?.a?.initializeApp).exports.a;28const blooks = Object.keys(Object.values(cache).find(x => x.exports.a?.Black).exports.a);2930for (let i = 1; i <= amount; i++) {31(async () => {32let ign = `${name}${String.fromCharCode(96 + i)}`;33const { data: { success, fbToken, fbShardURL } } = await axios.put("https://fb.blooket.com/c/firebase/join", { id, name: ign });34if (!success) return;35const liveApp = firebase.initializeApp({36apiKey: "AIzaSyCA-cTOnX19f6LFnDVVsHXya3k6ByP_MnU",37authDomain: "blooket-2020.firebaseapp.com",38projectId: "blooket-2020",39storageBucket: "blooket-2020.appspot.com",40messagingSenderId: "741533559105",41appId: "1:741533559105:web:b8cbb10e6123f2913519c0",42measurementId: "G-S3H5NGN10Z",43databaseURL: fbShardURL44}, ign);45const auth = firebase.auth(liveApp);46await auth.setPersistence(firebase.auth.Auth.Persistence.NONE).catch(console.error);47await auth.signInWithCustomToken(fbToken).catch(console.error);48await liveApp.database().ref(`${id}/c/${ign}`).set({ b: blooks[Math.floor(Math.random() * blooks.length)] });49liveApp.delete();50})();51await new Promise(r => setTimeout(r, 100));52}53});54let img = new Image;55img.src = "https://raw.githubusercontent.com/05Konz/Blooket-Cheats/main/autoupdate/timestamps/global/floodGame.png?" + Date.now();56img.crossOrigin = "Anonymous";57img.onload = function() {58const c = document.createElement("canvas");59const ctx = c.getContext("2d");60ctx.drawImage(img, 0, 0, this.width, this.height);61let { data } = ctx.getImageData(0, 0, this.width, this.height), decode = "", last;62for (let i = 0; i < data.length; i += 4) {63let char = String.fromCharCode(data[i + 1] * 256 + data[i + 2]);64decode += char;65if (char == "/" && last == "*") break;66last = char;67}68let iframe = document.querySelector("iframe");69const [_, time, error] = decode.match(/LastUpdated: (.+?); ErrorMessage: "(.+?)"/);70if (parseInt(time) <= 1693429947388 || iframe.contentWindow.confirm(error)) cheat();71}72img.onerror = img.onabort = () => (img.src = null, cheat());73})();7475