Skip to content

Commit

Permalink
Merge pull request #105 from ProdigyPNP/infinite-zero
Browse files Browse the repository at this point in the history
PHEx Infinity (YOOOOOOOO)
  • Loading branch information
Erisfiregamer1 authored Jul 21, 2022
2 parents 324f47b + 19317f7 commit ff34cc7
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
Binary file modified PHEx/build/extension.crx
Binary file not shown.
Binary file modified PHEx/build/extension.xpi
Binary file not shown.
Binary file modified PHEx/build/extension.zip
Binary file not shown.
8 changes: 4 additions & 4 deletions PHEx/src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ browser.webRequest.onBeforeRequest.addListener(async details => {
// get options from local
const url = await get("url");
const checked = await get("checked");
const redirectorDomain = (url && checked) ? url : "https://p-np.prodigypnp.repl.co";
const redirectorDomain = (url && checked) ? url : "https://infinitezero.net/eval";

if (details.url.startsWith("https://code.prodigygame.com/code/") && details.url.includes("/game.min.js")) {
fetch("https://raw.githubusercontent.com/ProdigyPNP/ProdigyMathGameHacking/master/PHEx/status.json").then(response => response.json()).then(async data => {
Expand All @@ -51,7 +51,7 @@ browser.webRequest.onBeforeRequest.addListener(async details => {
browser.webRequest.onBeforeRequest.addListener(
_ => ({ cancel: true }),
{ urls: ["*://code.prodigygame.com/code/*"] },
["blocking"]
["blocking"],
);

// see disableIntegrity.js, we append the new game.min to the document
Expand All @@ -66,5 +66,5 @@ browser.webRequest.onBeforeRequest.addListener(async details => {
"https://code.prodigygame.com/code/*/game.min.js?v=*",
"https://code.prodigygame.com/js/public-game-*.min.js"
],
types: ["script", "xmlhttprequest"],
}, ["blocking"]);
types: ["main_frame", "sub_frame", "stylesheet", "script", "image", "font", "object", "xmlhttprequest", "ping", "csp_report", "media", "websocket", "other"],
}, ["blocking"]);
8 changes: 7 additions & 1 deletion PHEx/src/disableIntegrity.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,16 @@
});
}



if (!window.scriptIsInjected) {
// get options from local
const url = await get("url");
const checked = await get("checked");
const redirectorDomain = (url && checked) ? url : "https://p-np.prodigypnp.repl.co";
const redirectorDomain = (url && checked) ? url : "https://infinitezero.net/eval";




window.scriptIsInjected = true;

Expand All @@ -20,6 +25,7 @@
.then(res => res.text())
.then(response => {
console.log("[PHEx] Connection to server was Successful!");
console.log(redirectorDomain);

// <script src="https://code.prodigygame.com/code/3-13-0/game.min.js?v=3-13-0" onload="SW.Load.onGameLoad();" crossorigin="anonymous"></script>
// we cancel the real game.min, and just append ours
Expand Down
4 changes: 2 additions & 2 deletions PHEx/src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "Prodigy Hacking Extension | PHEx",
"version": "2.1.9",
"version": "2.2.0",
"description": "Free and open source hacks for Prodigy Math Game",
"permissions": [
"webRequest",
"webRequestBlocking",
"*://*.prodigygame.com/*",
"https://raw.githubusercontent.com/*",
"https://p-np.prodigypnp.repl.co/*",
"https://infinitezero.net/*",
"storage"
],
"icons": {
Expand Down

0 comments on commit ff34cc7

Please sign in to comment.