mirror of
https://github.com/eaglerforge/EaglerForgeInjector
synced 2025-07-23 14:11:16 -09:00
prevent injection of invalid clients
This commit is contained in:
parent
f2a1daa635
commit
d6ee24ca52
12
injector.js
12
injector.js
@ -74,6 +74,14 @@ function entriesToStaticVariableProxy(entries, prefix, clinitList) {
|
|||||||
return proxy;
|
return proxy;
|
||||||
}
|
}
|
||||||
async function processClasses(string) {
|
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 (globalThis.doShronk) {
|
||||||
if (!confirm("The minify step is extremely slow, especially on lower-end devices, and can take upwards of 15 minutes.")) {
|
if (!confirm("The minify step is extremely slow, especially on lower-end devices, and can take upwards of 15 minutes.")) {
|
||||||
return;
|
return;
|
||||||
@ -350,10 +358,6 @@ document.querySelector("#giveme").addEventListener("click", () => {
|
|||||||
var patchedFile = string;
|
var patchedFile = string;
|
||||||
|
|
||||||
if (globalThis.doEaglerforge) {
|
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);
|
patchedFile = await processClasses(patchedFile);
|
||||||
} else if (globalThis.doShronk) {
|
} else if (globalThis.doShronk) {
|
||||||
patchedFile = await shronk(patchedFile);
|
patchedFile = await shronk(patchedFile);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user