From d6ee24ca52d5621e8e86d4768f2cc8ff163587a1 Mon Sep 17 00:00:00 2001 From: ZXMushroom63 Date: Tue, 18 Mar 2025 15:33:02 +0800 Subject: [PATCH] prevent injection of invalid clients --- injector.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/injector.js b/injector.js index c0b4607..892919c 100644 --- a/injector.js +++ b/injector.js @@ -74,6 +74,14 @@ function entriesToStaticVariableProxy(entries, prefix, clinitList) { return proxy; } async function processClasses(string) { + if (string.includes("__eaglerforgeinjector_installation_flag__")) { + backgroundLog("Detected input containing EFI installation flag.", true); + return alert("this file already has EaglerForge injected in it, you nonce.\nif you're trying to update, you need a vanilla file.") + } + if (!string.includes("function nmc_Minecraft_startGame(")) { + backgroundLog("Detected invalid input.\nPlease ensure file is unsigned, unminified and unobfuscated.", true); + return alert("This file does not match the requirements for EaglerForgeInjector. (not unminified & unobfuscated). Check info.") + } if (globalThis.doShronk) { if (!confirm("The minify step is extremely slow, especially on lower-end devices, and can take upwards of 15 minutes.")) { return; @@ -350,10 +358,6 @@ document.querySelector("#giveme").addEventListener("click", () => { var patchedFile = string; if (globalThis.doEaglerforge) { - if (string.includes("__eaglerforgeinjector_installation_flag__")) { - backgroundLog("Detected input containing EFI installation flag.", true); - return alert("this file already has EaglerForge injected in it, you nonce.\nif you're trying to update, you need a vanilla file."); - } patchedFile = await processClasses(patchedFile); } else if (globalThis.doShronk) { patchedFile = await shronk(patchedFile);