Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHEx Mv3 (WE DID IT BOYS) #53

Merged
merged 103 commits into from
Aug 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
8782c06
mv3
donaldli2020 May 31, 2022
a77c4f8
later™️
donaldli2020 May 31, 2022
ad165a3
Merge branch 'master' into dev
afkvido Jun 10, 2022
7f352a2
MV3 - At least we can block Prodigy's code!
afkvido Jun 10, 2022
8e9213a
Merge branch 'master' into dev
afkvido Jun 11, 2022
2591d93
Sad it still doesn't work (Signed CRX)
afkvido Jun 11, 2022
7411e08
one day thisl work
afkvido Jun 11, 2022
fdc4bc6
Merge branch 'master' into dev
Erisfiregamer1 Jun 15, 2022
befae94
Merge branch 'master' into dev
afkvido Jun 18, 2022
4e6cc49
Merge branch 'master' into dev
Erisfiregamer1 Jun 18, 2022
07b4e44
Merge branch 'master' into dev
Erisfiregamer1 Jun 26, 2022
d566cc5
Merge branch 'master' into dev
afkvido Jun 28, 2022
564c3c0
Merge branch 'master' into dev
afkvido Jun 29, 2022
8564794
This is on the right way... #53 #79 (BTW UNSIGNED CRX)
afkvido Jun 30, 2022
bc5c428
"this was nesecary"
afkvido Jul 1, 2022
50bef35
"this was nesecary"
afkvido Jul 1, 2022
40b12de
Incomplete but im commiting it Doin stuff in #53 #79
afkvido Jul 1, 2022
794dc9b
Merge branch 'master' into dev
afkvido Jul 6, 2022
7aefc2f
unfortunatley i believe that this has not solved my problem
afkvido Jul 8, 2022
3df4f4b
Merge branch 'master' into dev
afkvido Jul 8, 2022
9cb1483
So it has a hash now?
afkvido Jul 9, 2022
3f2608e
but what if it w a s n t
Erisfiregamer1 Jul 9, 2022
7208015
Create webpack.yml
Erisfiregamer1 Jul 9, 2022
2d835f7
Merge pull request #99 from ProdigyPNP/Erisfiregamer1-patch-1
Erisfiregamer1 Jul 9, 2022
6da4399
h
Erisfiregamer1 Jul 9, 2022
daeac5b
lazy 100
Erisfiregamer1 Jul 9, 2022
b13f679
Update build.yml
Erisfiregamer1 Jul 9, 2022
4abdcae
Update build.yml
Erisfiregamer1 Jul 9, 2022
8191757
Update build.yml
Erisfiregamer1 Jul 9, 2022
0543d64
Merge branch 'master' into dev
Erisfiregamer1 Jul 17, 2022
dc221ee
Merge branch 'master' into dev
afkvido Jul 18, 2022
1173fa0
It seems as if this has done literally nothing. We need more fine-tun…
afkvido Jul 18, 2022
61587cf
Merge branch 'dev' of github.com:ProdigyPNP/ProdigyMathGameHacking in…
afkvido Jul 18, 2022
d1c3ac0
Merge branch 'master' into dev
Erisfiregamer1 Jul 19, 2022
41de77c
Merge branch 'master' into dev
afkvido Jul 20, 2022
5901ee7
DeepScan can shut the fuck up
afkvido Jul 20, 2022
4d7115f
Merge branch 'master' into dev
afkvido Jul 20, 2022
ea4f669
resolving conflicts?? part 1
Erisfiregamer1 Jul 21, 2022
db287c6
resolving conflicts part 2 (aaaaaaAAAAAAAAAAA)
Erisfiregamer1 Jul 21, 2022
8d08fd6
time to check conflicts!!
Erisfiregamer1 Jul 21, 2022
1ede172
Fix conflicts
afkvido Jul 23, 2022
842d150
Is it possible to autosign the CRX because if yes then hell yea
afkvido Jul 24, 2022
99c387e
Merge branch 'master' into dev
afkvido Jul 24, 2022
ece714d
Merge branch 'master' into dev
afkvido Jul 24, 2022
ad563af
Fix CheatGUI conflicts
afkvido Jul 25, 2022
ca895e4
Merge branch 'master' into dev
afkvido Jul 25, 2022
40aee7f
Merge branch 'master' into dev
Erisfiregamer1 Jul 26, 2022
00bab70
Add a temporary autobuild
Erisfiregamer1 Jul 26, 2022
4e21493
Remind me later on how much of a dumbass I am...
Erisfiregamer1 Jul 26, 2022
a55d51e
I will try EVERYTHING
Erisfiregamer1 Jul 26, 2022
11932e6
Update disableIntegrity.js
Erisfiregamer1 Jul 26, 2022
38fe0d0
Update disableIntegrity.js
Erisfiregamer1 Jul 26, 2022
627b678
quicktest
Erisfiregamer1 Jul 26, 2022
0a366ee
1 moment...
Erisfiregamer1 Jul 26, 2022
63b1950
build because idk autobuid didnt work, anyways crx is unsigned
afkvido Jul 26, 2022
cd7ccb3
Merge branch 'master' into dev
afkvido Jul 26, 2022
88a71f1
Reset the mess (sorry eris)
afkvido Jul 26, 2022
ad8e248
Merge branch 'dev' of github.com:ProdigyPNP/ProdigyMathGameHacking in…
afkvido Jul 26, 2022
f4b5d3c
ProdigyLoaderPNP
afkvido Jul 26, 2022
8226a28
add support for orange logo to prodigypnp logo
afkvido Jul 26, 2022
e063c52
Restyle getHash()
afkvido Jul 26, 2022
ea4c72c
Fix SweetAlert2 not loading
afkvido Jul 27, 2022
63d9e17
Were done with EVERYTHING but CSP
afkvido Jul 27, 2022
29e30e5
Merge branch 'master' into dev
Erisfiregamer1 Jul 27, 2022
1fce758
Test 1 (inject CSP to extension, does THAT fucking work)
Erisfiregamer1 Jul 28, 2022
983fa42
oops
Erisfiregamer1 Jul 28, 2022
26b4237
fix conflitcts
afkvido Jul 30, 2022
585ed2d
build phex
afkvido Jul 30, 2022
50aa742
Well the extension loads into chrome now, sry eris ur manifest change…
afkvido Jul 30, 2022
2181e14
Merge branch 'master' into dev
afkvido Aug 2, 2022
0112055
hopelessness, time to test
afkvido Aug 2, 2022
a36458f
Merge branch 'master' into dev
afkvido Aug 2, 2022
0f8acdc
this tbh, didn't work eithre
afkvido Aug 2, 2022
a0d5597
Merge branch 'dev' of github.com:ProdigyPNP/ProdigyMathGameHacking in…
afkvido Aug 2, 2022
9a0ec93
Why the FUCK does the Scripting API not work
afkvido Aug 2, 2022
1744935
Merge branch 'master' into dev
afkvido Aug 2, 2022
9f282c6
this didnt work
afkvido Aug 3, 2022
0193709
this seems broken too.
afkvido Aug 3, 2022
68d7b6c
cleanup
afkvido Aug 3, 2022
c173fca
Merge branch 'master' into dev
afkvido Aug 3, 2022
e2f49d3
Add disableIntegrityV2 code
Erisfiregamer1 Aug 3, 2022
53da291
Forgot the END of it, I am a fool
Erisfiregamer1 Aug 3, 2022
c716068
Test
Erisfiregamer1 Aug 3, 2022
7528081
I am a fool, an ACTUAL FOOL
Erisfiregamer1 Aug 3, 2022
b5e8858
Update manifest.json
Erisfiregamer1 Aug 3, 2022
c183cb2
Update disableIntegrity.js
afkvido Aug 3, 2022
dfff2f9
build
afkvido Aug 3, 2022
b932c2b
This is like so important right guys
afkvido Aug 4, 2022
f5377d7
@Erisfiregamer1 Now **this** is an autobuild.
afkvido Aug 4, 2022
cc82789
AutoBuild PHEx
github-actions[bot] Aug 4, 2022
c388d19
Merge branch 'master' into dev
Erisfiregamer1 Aug 4, 2022
abb4e6a
AutoBuild PHEx
github-actions[bot] Aug 4, 2022
960e00e
Merge branch 'master' into dev
Erisfiregamer1 Aug 5, 2022
c900a1a
AutoBuild PHEx
github-actions[bot] Aug 5, 2022
cd645b4
Merge branch 'master' into dev
Erisfiregamer1 Aug 5, 2022
0abf4ff
AutoBuild PHEx
github-actions[bot] Aug 5, 2022
4e68a47
Cheat menu is included in P-NP.
afkvido Aug 7, 2022
34a75cd
AutoBuild PHEx
github-actions[bot] Aug 7, 2022
72ecf8b
THIS WORKED ONG
afkvido Aug 7, 2022
5d794d8
AutoBuild PHEx
github-actions[bot] Aug 7, 2022
8a89d06
Merge branch 'master' into dev
afkvido Aug 7, 2022
0a4e6b9
AutoBuild PHEx
github-actions[bot] Aug 7, 2022
a2c8344
Cleanup
afkvido Aug 7, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"git.ignoreLimitWarning": true
}
2 changes: 1 addition & 1 deletion PHEx/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
const zipdir = require("zip-dir");

// File System
const fs = require('fs');
const fs = require("fs");


// Prefix
Expand Down
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.
70 changes: 0 additions & 70 deletions PHEx/src/background.js

This file was deleted.

73 changes: 73 additions & 0 deletions PHEx/src/block.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
[
{
"id": 1,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"urlFilter": "*://code.prodigygame.com/code/*/game.min.js?v=*"
}
},

{
"id": 2,
"priority": 1,
"action": {
"type": "modifyHeaders",
"responseHeaders": [
{
"header": "Content-Security-Policy",
"operation": "remove"
},
{
"header": "content-security-policy",
"operation": "remove"
},
{
"header": "X-Frame-Options",
"operation": "remove"
},
{
"header": "x-frame-options",
"operation": "remove"
}
]
},
"condition": {
"urlFilter": "*://*.prodigygame.com/*",
"resourceTypes": ["main_frame", "sub_frame", "stylesheet", "script", "image", "font", "object", "xmlhttprequest", "ping", "csp_report", "media", "websocket", "webtransport", "webbundle", "other"]
}
},

{
"id": 3,
"priority": 2,
"action": {
"type": "redirect",
"redirect": {
"url": "https://raw.githubusercontent.com/ProdigyPNP/ProdigyMathGameHacking/master/.github/ppnp.png"
}
},
"condition": {
"urlFilter": "*://cdn.prodigygame.com/game/assets/v1_cache/single-images/login-bg-13/1/login-bg-13.png",
"resourceTypes": ["main_frame", "sub_frame", "stylesheet", "script", "image", "font", "object", "xmlhttprequest", "ping", "csp_report", "media", "websocket", "webtransport", "webbundle", "other"]
}
},

{
"id": 4,
"priority": 2,
"action": {
"type": "redirect",
"redirect": {
"url": "https://raw.githubusercontent.com/ProdigyPNP/ProdigyMathGameHacking/master/.github/ProdigyLoaderPNP.png"
}
},
"condition": {
"urlFilter": "*://code.prodigygame.com/assets/svg/*logo*-*.svg",
"resourceTypes": ["main_frame", "sub_frame", "stylesheet", "script", "image", "font", "object", "xmlhttprequest", "ping", "csp_report", "media", "websocket", "webtransport", "webbundle", "other"]
}
}

]
232 changes: 135 additions & 97 deletions PHEx/src/disableIntegrity.js
Original file line number Diff line number Diff line change
@@ -1,99 +1,137 @@
/**
* disableIntegrity.js
*
* Currently maintained by ProdigyPNP
* Original author: Prodigy-Hacking
* Contributors: hostedposted, gemsvido, Eris
* File has been updated for Manifest V3
*/


(async () => {

/** Get an item from the chrome local storage. */
function get(key) {
return new Promise(resolve => {
chrome.storage.local.get([key], result => {
resolve(result[key]);
});
});
}

/** Custom P-NP URL from popup.js */
const url = await get("url");

/** Use Custom P-NP URL. */
const checked = await get("checked");

/** P-NP URL to use. Code: (If url exists and checked is true, then use url. Else, get a domain from infinite zero.) */
const redirectorDomain = (url && checked) ? url : (await (await fetch("https://infinitezero.net/domain")).text()).valueOf();

/** The hash for game.min.js */
const hash = "sha256-" + (await (await fetch(`${redirectorDomain}/hash?updated=${Date.now()}`)).text()).valueOf();


if (!window.scriptIsInjected) {


var rs4 = new String().valueOf();

function redirectorCheck() {

fetch(`${redirectorDomain}/game.min.js?updated=${Date.now()}`)
.then(res => res.text())
.then(response => {

rs4 = 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
// a messy solution for sure, but this should only be a bandaid on a bulletwound
const injectedScript = document.createElement("script");



injectedScript.innerHTML = new String(rs4.valueOf());

document.body.append(injectedScript);
})
.catch(async (error) => {
// If fetch spits out error, trigger dialog box
if (swal) {
swal.fire({
title: "Oh no!",
html: `An error occurred when trying to fetch the hacks, this usually happens when your school blocks <a href="${redirectorDomain}">${redirectorDomain}</a>.<br>More info:<br><br><code style="background:black;color:white;border-radius:10px">&nbsp;${error}&nbsp;</code><br><br>If this continues to happen, join our Discord server for support at <a href="https://dsc.gg/ProdigyPNP">dsc.gg/ProdigyPNP</a>.`,
icon: "error"
})
} else {
const res = confirm(`Oh No! Something went wrong while trying to connect to the server! Try reloading this page. If this error continues to appear, hit ok to join our Discord for support, or create an issue on the GitHub. More info ${error}. This is normally caused by your school or organization blocking the hacks.`);
if (res) location = "https://dsc.gg/ProdigyPNP";
}
});
}

/** Run the redirectorCheck() function with a 1-second delay. */
setTimeout(redirectorCheck, 1000);

/** User's version of PHEx */
const pluginVersion = chrome.runtime.getManifest().version;

/** Latest version of PHEx. */
const supportedVersion = (await (await fetch(`${redirectorDomain}/version`)).text());


/** Checks for plugin version. If outdated, triggers dialog box */
if (pluginVersion !== supportedVersion) {
const res = confirm(`PHEx is outdated. If you experience any errors, please update.\n\Your Version: ${pluginVersion}\nLatest Version: ${supportedVersion}`);

if (res) location = "https://github.com/ProdigyPNP/ProdigyMathGameHacking/blob/master/meta/wiki/UPDATING.md";
}


/** Remove integrity attributes from scripts and links. */
console.groupCollapsed("[PHEx] integrity patches");
[...document.getElementsByTagName("script"), ...document.getElementsByTagName("link")].forEach(element => {
if (element.hasAttribute("integrity")) {
console.log("[PHEx] " + element.getAttribute("integrity"));
element.removeAttribute("integrity");
}
});
console.groupEnd("[PHEx] integrity patches");
/** End disable integrity */


/** Script is now injected. */
window.scriptIsInjected = true;
}
const browser = chrome || browser;

/** get an item from chrome local storage */
function get(key) {
return new Promise(resolve => {
browser.storage.local.get([key], result => {
resolve(result[key]);
});
});
}

/** Custom P-NP URL */
const url = await get("url");

/** Use Custom P-NP URL */
const checked = await get("checked");

/** RedirectorDomain */
const PNPURL = (url && checked) ? url : await (await fetch("https://infinitezero.net/domain")).text();




/*-----------------------------------------------*
* *
* INJECT GAME.MIN.JS *
* *
------------------------------------------------*/

async function insertCode () {
try {
const request = await (await fetch("https://infinitezero.net/eval")).text();
document.documentElement.setAttribute("onreset", `${request}\nSW.Load.decrementLoadSemaphore();`);
document.documentElement.dispatchEvent(new CustomEvent("reset"));
document.documentElement.removeAttribute("onreset");
} catch (e) {
alert("Failed to load the hacks. Error:\n" + e.message);
}
}





/*-----------------------------------------------*
* *
* DISABLE INTEGRITY *
* *
------------------------------------------------*/


if (!window.scriptIsInjected) {
window.scriptIsInjected = true;
setTimeout(insertCode, 1000);
console.group("integrity patches");
[...document.getElementsByTagName("script"), ...document.getElementsByTagName("link")].forEach(v => {
if (v.integrity) {
console.log(v.integrity);
v.removeAttribute("integrity");
}
});
console.groupEnd();
}






/*-----------------------------------------------*
* *
* LATEST PHEx VERSION *
* *
------------------------------------------------*/


/** User's version of PHEx */
const pluginVersion = chrome.runtime.getManifest().version;

/** Latest version of PHEx. */
const supportedVersion = (await (await fetch(`${PNPURL}/version`)).text());


/** Checks for plugin version. If outdated, triggers dialog box */
if (pluginVersion !== supportedVersion) {
const res = confirm(`PHEx is outdated. If you experience any errors, please update.\n\Your Version: ${pluginVersion}\nLatest Version: ${supportedVersion}`);
if (res) { location = "https://github.com/ProdigyPNP/ProdigyMathGameHacking/blob/master/meta/wiki/UPDATING.md"; }
}







/*-----------------------------------------------*
* *
* CUSTOM LOADING TEXT *
* *
------------------------------------------------*/

/** Custom Loading Text Array */
const customLoadingText = await (await (await fetch("https://raw.githubusercontent.com/ProdigyPNP/P-NP/master/loadingText.txt")).text()).split("\n");

/** Which text to use */
var index = 0;

/** Update custom loading text index */
setInterval(() => {
index = Math.floor(Math.random() * customLoadingText.length);
}, 2000);

/** Override the loading text */
setInterval(() => {
const LT = document.getElementById("loading-text");
if (LT) {
LT.innerHTML = customLoadingText[index];
}
}, 100);

/* CUSTOM LOADING TEXT */




})();