mirror of
https://github.com/eaglerforge/EaglerForgeInjector
synced 2025-07-23 06:01:38 -09:00
Merge pull request #74 from eaglerforge/main
prevent injection of invalid clients
This commit is contained in:
commit
c2b8ab2b40
12
injector.js
12
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user