diff --git a/src/client/shared/antiantidebugger.ts b/src/client/shared/antiantidebugger.ts new file mode 100644 index 0000000..7ef40b3 --- /dev/null +++ b/src/client/shared/antiantidebugger.ts @@ -0,0 +1,26 @@ +import { ScramjetClient } from "../client"; + +export default function (client: ScramjetClient) { + client.Proxy("console.clear", { + apply(ctx) { + // fuck you + ctx.return(undefined); + }, + }); + + const log = console.log; + client.Trap("console.log", { + set(ctx, v) { + // is there a legitimate reason to let sites do this? + }, + get(ctx) { + return log; + }, + }); + + client.Proxy("URL.revokeObjectURL", { + apply(ctx) { + ctx.return(undefined); + }, + }); +} diff --git a/src/client/shared/console.ts b/src/client/shared/console.ts deleted file mode 100644 index 4c4a578..0000000 --- a/src/client/shared/console.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { ScramjetClient } from "../client"; - -export default function (client: ScramjetClient) { - client.Proxy("console.clear", { - apply(ctx) { - // fuck you - ctx.return(undefined); - }, - }); -}