ProdigyMathGameHacking icon indicating copy to clipboard operation
ProdigyMathGameHacking copied to clipboard

[B] Cheat Menu always loads from a static URL.

Open afkvido opened this issue 3 years ago • 2 comments

Actual Behavior

Cheat Menu always loads from a static URL.

Expected Behavior

Cheat Menu will load from the URL specified in P-NP. At ProdigyPNP/P-NP/dist/util.js, line 18 and 19.

Location

At ProdigyPNP/ProdigyMathGameHacking/willsCheatMenu/src/hacks/utility.ts, line 91.

I know the fix

In P-NP, add another URL export at [pnpDomain]/cheatmenu.



In ProdigyMathGameHacking, load the cheat menu like this:

javascript:



const cmu = // get the cheat menu URL from [pnpDomain]/cheatmenu

(async () => {
		eval(await (await fetch(`${cmu}?updated=${Date.now()}`)).text()); // updated parameter is so browser ignores cached version
	})();

afkvido avatar Apr 27 '22 18:04 afkvido

Status on this?

eris-webserv avatar Jun 15 '22 15:06 eris-webserv

In theory, P-NP decides which cheat menu to load... however if someone is trying to use our cheat menu (cheatGUI) but it's self-hosted, that should be their issue.

However, I believe that the fix is to append a line of code in the P-NP output (game.min.js) which says something like:

const PNPURL = "https://p-np.prodigypnp.repl.co";

Then, we can substitute the line in Update Menu to load from PNPURL.

afkvido avatar Jun 18 '22 03:06 afkvido