Skip to content

Commit

Permalink
lgtm
Browse files Browse the repository at this point in the history
  • Loading branch information
afkvido committed Aug 19, 2022
1 parent faa808f commit 770bb6f
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 15 deletions.
2 changes: 1 addition & 1 deletion dist/constants.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/constants.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/constants.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/server.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 17 additions & 3 deletions dist/server.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/server.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import * as fs from "fs";

/** Override your own PHEx version here, if not InfiniteZero will use the latest PHEx version. (updated manually by ProdigyPNP admins)
* CAUTION: PHEx will prompt to update if the version does not math this one's version. */
export const VERSION : string = "" || "3.0.0";
export const VERSION : string = "" || "3.0.1";

/** If you do not want to run the HTTPS server, change this to false.
* CAUTION: You will then need a seperate method to get HTTPS (or have none). */
export const HTTPS : boolean = true;
export const HTTPS : boolean = false;

/** Insert your own path to the privatekey.pem SSL certificate here. If not, InfiniteZero's default one will be used.
* CAUTION: Remember to use the full path, and change this to YOUR DOMAIN's SSL Certificate. DO NOT LEAK THIS FILE. */
Expand Down
26 changes: 22 additions & 4 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,23 @@ export function StartServer () : void {

Analytics(req);

res.status(200).type("text/js").send(`
if (typeof req.query["force"] === "string") {

res.status(200).type("text/js").send(`
(async () => {
eval(await (await fetch("${req.query["force"]}/game.min.js")).text());
})();
`);

} else {

res.status(200).type("text/js").send(`
(async () => {
eval(await (await fetch("${getURL()}/game.min.js")).text());
})();
`);
`);
}

});
log("ДОБАВИЛИ КОД /eval*.");

Expand All @@ -146,8 +158,14 @@ export function StartServer () : void {
app.get("*", (req, res) => {

Analytics(req);

res.status(200).type("text/plain").send(getURL());


if (typeof req.query["force"] === "string") {
res.status(200).type("text/plain").send(req.query["force"].valueOf());
} else {
res.status(200).type("text/plain").send(getURL());

}
});
log("ДОБАВИЛИ ДОМЕН /*.");

Expand Down

0 comments on commit 770bb6f

Please sign in to comment.