Does __proto__ patch make a problem ?

This commit is contained in:
Jean Ouina 2020-07-07 22:26:29 +02:00
parent 21c6a6fbc8
commit 9d7da23990
5 changed files with 430 additions and 432 deletions

File diff suppressed because one or more lines are too long

View File

@ -95,6 +95,7 @@ export const settings = {
"Ad Block": {id: "lightcord-4", info: "Block any BOT that dms you with an invite link. Even in an embed.", implemented: true, hidden: false, cat: "lightcord", category: "Lightcord"},
"Enable Lightcord Servers": {id: "lightcord-5", info: "Enable Lightcord's servers. Disabling this will disable custom badges.", implemented: true, hidden: false, cat: "lightcord", category: "Lightcord"},
"Disable typing": {id: "lightcord-7", info: "Don't let other see you're typing.", implemented: true, hidden: false, cat: "lightcord", category: "Lightcord"},
"Account Manager": {id: "lightcord-8", info: "Account Manager+Switcher.", implemented: true, hidden: false, cat: "lightcord", category: "Lightcord"},
/** Lightcord Window */
"Always-on-Top": {id: "lightcord-3", info: "Enable window's Always-on-Top mode, where Lightcord stays on top of other applications.", implemented: true, hidden: false, cat: "lightcord", category: "Window"},
@ -145,6 +146,7 @@ export const defaultCookie = {
"lightcord-5": true,
"lightcord-6": true,
"lightcord-7": false,
"lightcord-8": false,
};

View File

@ -1,102 +1,100 @@
import localStorageFix from "./localStorageFix";
import loadingIcon from "./loadingIcon";
localStorageFix();
loadingIcon();
const deprecateGlobal = (key, value) => {
// value = typeof(value) !== "object" ? value : new Proxy(value, {
// get: function(obj, mod) {
// if (!obj.hasOwnProperty(mod)) return undefined;
// return obj[mod];
// },
// set: function(obj, mod) {
// if (obj.hasOwnProperty(mod)) return Utils.err("Deprecated Global", "Trying to overwrite deprecated BD globals");
// }
// });
Object.defineProperty(window, key, {
get() {
Utils.warn("Deprecated Global", `"${key}" will be removed in future versions. Please only use BdApi.`);
return value;
}
});
};
import * as Globals from "./0globals";
const globalKeys = Object.keys(Globals);
for (const key of globalKeys) deprecateGlobal(key, Globals[key]);
import BdApi from "./modules/bdApi";
import BDV2 from "./modules/v2";
import pluginModule from "./modules/pluginModule";
import themeModule from "./modules/themeModule";
import Utils from "./modules/utils";
import BDEvents from "./modules/bdEvents";
import settingsPanel from "./modules/settingsPanel";
import DataStore from "./modules/dataStore";
import ContentManager from "./modules/contentManager";
import ClassNormalizer from "./modules/classNormalizer";
deprecateGlobal("BDV2", BDV2);
deprecateGlobal("pluginModule", pluginModule);
deprecateGlobal("themeModule", themeModule);
deprecateGlobal("Utils", Utils);
deprecateGlobal("BDEvents", BDEvents);
deprecateGlobal("settingsPanel", settingsPanel);
deprecateGlobal("DataStore", DataStore);
deprecateGlobal("ContentManager", ContentManager);
deprecateGlobal("ClassNormalizer", ClassNormalizer);
window.BdApi = BdApi;
import Core from "./modules/core";
deprecateGlobal("mainCore", Core);
export default class CoreWrapper {
constructor(bdConfig) {
Core.setConfig(bdConfig);
}
init() {
// deprecateGlobal("mainCore", this.mainCore);
Core.init();
}
}
// function patchModuleLoad() {
// const namespace = "betterdiscord";
// const prefix = `${namespace}/`;
// const Module = require("module");
// const load = Module._load;
// // const resolveFilename = Module._resolveFilename;
// Module._load = function(request) {
// if (request === namespace || request.startsWith(prefix)) {
// const requested = request.substr(prefix.length);
// if (requested == "api") return BdApi;
// }
// return load.apply(this, arguments);
// };
// // Module._resolveFilename = function (request, parent, isMain) {
// // if (request === "betterdiscord" || request.startsWith("betterdiscord/")) {
// // const contentPath = PluginManager.getPluginPathByModule(parent);
// // if (contentPath) return request;
// // }
// // return resolveFilename.apply(this, arguments);
// // };
// return function() {
// Module._load = load;
// };
// }
// patchModuleLoad();
// var settingsPanel, voiceMode,, dMode, publicServersModule;
// var bdConfig = null;
require("request")// just in cache so plugin can require it too
import localStorageFix from "./localStorageFix";
import loadingIcon from "./loadingIcon";
localStorageFix();
loadingIcon();
const deprecateGlobal = (key, value) => {
// value = typeof(value) !== "object" ? value : new Proxy(value, {
// get: function(obj, mod) {
// if (!obj.hasOwnProperty(mod)) return undefined;
// return obj[mod];
// },
// set: function(obj, mod) {
// if (obj.hasOwnProperty(mod)) return Utils.err("Deprecated Global", "Trying to overwrite deprecated BD globals");
// }
// });
Object.defineProperty(window, key, {
get() {
Utils.warn("Deprecated Global", `"${key}" will be removed in future versions. Please only use BdApi.`);
return value;
}
});
};
import * as Globals from "./0globals";
const globalKeys = Object.keys(Globals);
for (const key of globalKeys) deprecateGlobal(key, Globals[key]);
import BdApi from "./modules/bdApi";
import BDV2 from "./modules/v2";
import pluginModule from "./modules/pluginModule";
import themeModule from "./modules/themeModule";
import Utils from "./modules/utils";
import BDEvents from "./modules/bdEvents";
import settingsPanel from "./modules/settingsPanel";
import DataStore from "./modules/dataStore";
import ContentManager from "./modules/contentManager";
import ClassNormalizer from "./modules/classNormalizer";
deprecateGlobal("BDV2", BDV2);
deprecateGlobal("pluginModule", pluginModule);
deprecateGlobal("themeModule", themeModule);
deprecateGlobal("Utils", Utils);
deprecateGlobal("BDEvents", BDEvents);
deprecateGlobal("settingsPanel", settingsPanel);
deprecateGlobal("DataStore", DataStore);
deprecateGlobal("ContentManager", ContentManager);
deprecateGlobal("ClassNormalizer", ClassNormalizer);
window.BdApi = BdApi;
import Core from "./modules/core";
deprecateGlobal("mainCore", Core);
export default class CoreWrapper {
constructor(bdConfig) {
Core.setConfig(bdConfig);
}
init() {
// deprecateGlobal("mainCore", this.mainCore);
Core.init();
}
}
// function patchModuleLoad() {
// const namespace = "betterdiscord";
// const prefix = `${namespace}/`;
// const Module = require("module");
// const load = Module._load;
// // const resolveFilename = Module._resolveFilename;
// Module._load = function(request) {
// if (request === namespace || request.startsWith(prefix)) {
// const requested = request.substr(prefix.length);
// if (requested == "api") return BdApi;
// }
// return load.apply(this, arguments);
// };
// // Module._resolveFilename = function (request, parent, isMain) {
// // if (request === "betterdiscord" || request.startsWith("betterdiscord/")) {
// // const contentPath = PluginManager.getPluginPathByModule(parent);
// // if (contentPath) return request;
// // }
// // return resolveFilename.apply(this, arguments);
// // };
// return function() {
// Module._load = load;
// };
// }
// patchModuleLoad();
// var settingsPanel, voiceMode,, dMode, publicServersModule;
// var bdConfig = null;

View File

@ -1,166 +1,167 @@
import {settings} from "../0globals";
import themeModule from "./themeModule";
export default new class V2 {
constructor() {
this.editorDetached = false;
this.WebpackModules = (() => {
const req = webpackJsonp.push([[], {__extra_id__: (module, exports, req) => module.exports = req}, [["__extra_id__"]]]);
delete req.m.__extra_id__;
delete req.c.__extra_id__;
const shouldProtect = theModule => {
if (theModule.remove && theModule.set && theModule.clear && theModule.get && !theModule.sort) return true;
if (theModule.getToken || theModule.getEmail || theModule.showToken) return true;
return false;
};
const protect = (theModule, isDefault) => {
let mod = !isDefault ? theModule.default : theModule
if(!mod)return theModule
if (mod.remove && mod.set && mod.clear && mod.get && !mod.sort) return null;
if (!mod.getToken && !mod.getEmail && !mod.showToken)return theModule
const proxy = new Proxy(mod, {
getOwnPropertyDescriptor: function(obj, prop) {
if (prop === "getToken" || prop === "getEmail" || prop === "showToken") return undefined;
return Object.getOwnPropertyDescriptor(obj, prop);
},
get: function(obj, func) {
if (func == "getToken") return () => "mfa.XCnbKzo0CLIqdJzBnL0D8PfDruqkJNHjwHXtr39UU3F8hHx43jojISyi5jdjO52e9_e9MjmafZFFpc-seOMa";
if (func == "getEmail") return () => "puppet11112@gmail.com";
if (func == "showToken") return () => true;
// if (func == "__proto__") return proxy;
return obj[func];
}
});
if(!isDefault){
return Object.assign({}, theModule, {default: proxy})
}
return proxy;
};
const find = (filter) => {
for (const i in req.c) {
if (req.c.hasOwnProperty(i)) {
const m = req.c[i].exports;
if (m && m.__esModule && m.default && filter(m.default)) return protect(m.default, true);
if (m && filter(m)) return protect(m, false);
}
}
// console.warn("Cannot find loaded module in cache");
return null;
};
const findAll = (filter) => {
const modules = [];
for (const i in req.c) {
if (req.c.hasOwnProperty(i)) {
const m = req.c[i].exports;
if (m && m.__esModule && m.default && filter(m.default)) modules.push(protect(m.default, true));
else if (m && filter(m)) modules.push(protect(m, false));
}
}
return modules;
};
const findByUniqueProperties = (propNames) => find(module => propNames.every(prop => module[prop] !== undefined));
const findByPrototypes = (protoNames) => find(module => module.prototype && protoNames.every(protoProp => module.prototype[protoProp] !== undefined));
const findByDisplayName = (displayName) => find(module => module.displayName === displayName);
return {find, findAll, findByUniqueProperties, findByPrototypes, findByDisplayName};
})();
this.internal = {
react: this.WebpackModules.findByUniqueProperties(["Component", "PureComponent", "Children", "createElement", "cloneElement"]),
reactDom: this.WebpackModules.findByUniqueProperties(["findDOMNode"])
};
this.getInternalInstance = e => e[Object.keys(e).find(k => k.startsWith("__reactInternalInstance"))];
window.Lightcord.BetterDiscord.V2 = this
}
initialize() {
}
joinBD1() {this.InviteActions.acceptInviteAndTransitionToInviteChannel("0Tmfo5ZbORCRqbAd");}
leaveBD1() {this.GuildActions.leaveGuild("86004744966914048");}
joinBD2() {this.InviteActions.acceptInviteAndTransitionToInviteChannel("2HScm8j");}
leaveBD2() {this.GuildActions.leaveGuild("280806472928198656");}
joinLC() {this.InviteActions.acceptInviteAndTransitionToInviteChannel("7eFff2A");}
leaveLC() {this.GuildActions.leaveGuild("705908350218666117");}
/**
* @type {typeof React}
*/
get react() {return this.internal.react;}
/**
* @type {typeof React}
*/
get React() {return this.internal.react;}
/**
* @type {typeof import("react-dom")}
*/
get reactDom() {return this.internal.reactDom;}
/**
* @type {typeof import("react-dom")}
*/
get ReactDom() {return this.internal.reactDom;}
/**
* @type {typeof React.Component}
*/
get reactComponent() {return this.internal.react.Component;}
/**
* @type {typeof React.Component}
*/
get ReactComponent() {return this.internal.react.Component;}
get anchorClasses() {return this.WebpackModules.findByUniqueProperties(["anchorUnderlineOnHover"]) || {anchor: "anchor-3Z-8Bb", anchorUnderlineOnHover: "anchorUnderlineOnHover-2ESHQB"};}
get slateEditorClasses() {return this.WebpackModules.findByUniqueProperties(["slateTextArea"]);}
get messageClasses() {return this.WebpackModules.findByUniqueProperties(["message", "containerCozy"]);}
get guildClasses() {
const guildsWrapper = BDModules.get(e => e.wrapper && e.unreadMentionsBar)[0];
const guilds = BDModules.get(e => e.guildsError && e.selected)[0]
const pill = BDModules.get(e => e.blobContainer)[0]
return Object.assign({}, guildsWrapper, guilds, pill);
}
get MessageContentComponent() {return this.WebpackModules.find(m => m.defaultProps && m.defaultProps.hasOwnProperty("disableButtons"));}
get MessageComponent() {return this.WebpackModules.find(m => m.default && m.default.displayName && m.default.displayName == "Message");}
get TimeFormatter() {return this.WebpackModules.findByUniqueProperties(["dateFormat"]);}
get TooltipWrapper() {return this.WebpackModules.findByDisplayName("Tooltip");}
get NativeModule() {return this.WebpackModules.findByUniqueProperties(["setBadge"]);}
get InviteActions() {return this.WebpackModules.findByUniqueProperties(["acceptInvite"]);}
get GuildActions() {return this.WebpackModules.findByUniqueProperties(["leaveGuild"]);}
get Tooltips() {return this.WebpackModules.find(m => m.hide && m.show && !m.search && !m.submit && !m.search && !m.activateRagingDemon && !m.dismiss);}
get KeyGenerator() {return this.WebpackModules.find(m => m.toString && /"binary"/.test(m.toString()));}
get LayerStack() {return this.WebpackModules.findByUniqueProperties(["popLayer"]);}
get UserStore() {return this.WebpackModules.findByUniqueProperties(["getCurrentUser"]);}
get ChannelStore() {return this.WebpackModules.findByUniqueProperties(["getChannel"]);}
get ChannelActions() {return this.WebpackModules.findByUniqueProperties(["openPrivateChannel"]);}
get PrivateChannelActions() {return this.WebpackModules.findByUniqueProperties(["selectPrivateChannel"]);}
openDM(userId) {
const selfId = this.UserStore.getCurrentUser().id;
if (selfId == userId) return;
const privateChannelId = this.ChannelStore.getDMFromUserId(userId);
if (privateChannelId) return this.PrivateChannelActions.selectPrivateChannel(privateChannelId);
this.ChannelActions.openPrivateChannel(selfId, userId);
}
parseSettings(cat) {
return Object.keys(settings).reduce((arr, key) => {
const setting = settings[key];
if (setting.cat === cat && setting.implemented && !setting.hidden) {
setting.text = key;
arr.push(setting);
} return arr;
}, []);
}
import {settings} from "../0globals";
import themeModule from "./themeModule";
export default new class V2 {
constructor() {
this.editorDetached = false;
this.WebpackModules = (() => {
const req = webpackJsonp.push([[], {__extra_id__: (module, exports, req) => module.exports = req}, [["__extra_id__"]]]);
delete req.m.__extra_id__;
delete req.c.__extra_id__;
const shouldProtect = theModule => {
if (theModule.remove && theModule.set && theModule.clear && theModule.get && !theModule.sort) return true;
if (theModule.getToken || theModule.getEmail || theModule.showToken) return true;
return false;
};
const protect = (theModule, isDefault) => {
let mod = !isDefault ? theModule.default : theModule
if(!mod)return theModule
if (mod.remove && mod.set && mod.clear && mod.get && !mod.sort) return null;
if (!mod.getToken && !mod.getEmail && !mod.showToken)return theModule
const proxy = new Proxy(mod, {
getOwnPropertyDescriptor: function(obj, prop) {
if (prop === "getToken" || prop === "getEmail" || prop === "showToken") return undefined;
return Object.getOwnPropertyDescriptor(obj, prop);
},
get: function(obj, func) {
if (func == "getToken" && obj.getToken) return () => "mfa.XCnbKzo0CLIqdJzBnL0D8PfDruqkJNHjwHXtr39UU3F8hHx43jojISyi5jdjO52e9_e9MjmafZFFpc-seOMa";
if (func == "getEmail" && obj.getEmail) return () => "puppet11112@gmail.com";
if (func == "showToken" && obj.showToken) return () => true;
if (func == "__proto__" && obj.__proto__) return proxy;
return obj[func];
}
});
if(!isDefault){
return Object.assign({}, theModule, {default: proxy})
}
return proxy;
};
const find = (filter) => {
for (const i in req.c) {
if (req.c.hasOwnProperty(i)) {
const m = req.c[i].exports;
if (m && m.__esModule && m.default && filter(m.default)) return protect(m.default, true);
if (m && filter(m)) return protect(m, false);
}
}
// console.warn("Cannot find loaded module in cache");
return null;
};
const findAll = (filter) => {
const modules = [];
for (const i in req.c) {
if (req.c.hasOwnProperty(i)) {
const m = req.c[i].exports;
if (m && m.__esModule && m.default && filter(m.default)) modules.push(protect(m.default, true));
else if (m && filter(m)) modules.push(protect(m, false));
}
}
return modules;
};
const findByUniqueProperties = (propNames) => find(module => propNames.every(prop => module[prop] !== undefined));
const findByPrototypes = (protoNames) => find(module => module.prototype && protoNames.every(protoProp => module.prototype[protoProp] !== undefined));
const findByDisplayName = (displayName) => find(module => module.displayName === displayName);
return {find, findAll, findByUniqueProperties, findByPrototypes, findByDisplayName};
})();
this.internal = {
react: this.WebpackModules.findByUniqueProperties(["Component", "PureComponent", "Children", "createElement", "cloneElement"]),
reactDom: this.WebpackModules.findByUniqueProperties(["findDOMNode"])
};
this.getInternalInstance = e => e[Object.keys(e).find(k => k.startsWith("__reactInternalInstance"))];
window.Lightcord.BetterDiscord.V2 = this
}
initialize() {
}
joinBD1() {this.InviteActions.acceptInviteAndTransitionToInviteChannel("0Tmfo5ZbORCRqbAd");}
leaveBD1() {this.GuildActions.leaveGuild("86004744966914048");}
joinBD2() {this.InviteActions.acceptInviteAndTransitionToInviteChannel("2HScm8j");}
leaveBD2() {this.GuildActions.leaveGuild("280806472928198656");}
joinLC() {this.InviteActions.acceptInviteAndTransitionToInviteChannel("7eFff2A");}
leaveLC() {this.GuildActions.leaveGuild("705908350218666117");}
/**
* @type {typeof React}
*/
get react() {return this.internal.react;}
/**
* @type {typeof React}
*/
get React() {return this.internal.react;}
/**
* @type {typeof import("react-dom")}
*/
get reactDom() {return this.internal.reactDom;}
/**
* @type {typeof import("react-dom")}
*/
get ReactDom() {return this.internal.reactDom;}
/**
* @type {typeof React.Component}
*/
get reactComponent() {return this.internal.react.Component;}
/**
* @type {typeof React.Component}
*/
get ReactComponent() {return this.internal.react.Component;}
get anchorClasses() {return this.WebpackModules.findByUniqueProperties(["anchorUnderlineOnHover"]) || {anchor: "anchor-3Z-8Bb", anchorUnderlineOnHover: "anchorUnderlineOnHover-2ESHQB"};}
get slateEditorClasses() {return this.WebpackModules.findByUniqueProperties(["slateTextArea"]);}
get messageClasses() {return this.WebpackModules.findByUniqueProperties(["message", "containerCozy"]);}
get guildClasses() {
const guildsWrapper = BDModules.get(e => e.wrapper && e.unreadMentionsBar)[0];
const guilds = BDModules.get(e => e.guildsError && e.selected)[0]
const pill = BDModules.get(e => e.blobContainer)[0]
return Object.assign({}, guildsWrapper, guilds, pill);
}
get MessageContentComponent() {return this.WebpackModules.find(m => m.defaultProps && m.defaultProps.hasOwnProperty("disableButtons"));}
get MessageComponent() {return this.WebpackModules.find(m => m.default && m.default.displayName && m.default.displayName == "Message");}
get TimeFormatter() {return this.WebpackModules.findByUniqueProperties(["dateFormat"]);}
get TooltipWrapper() {return this.WebpackModules.findByDisplayName("Tooltip");}
get NativeModule() {return this.WebpackModules.findByUniqueProperties(["setBadge"]);}
get InviteActions() {return this.WebpackModules.findByUniqueProperties(["acceptInvite"]);}
get GuildActions() {return this.WebpackModules.findByUniqueProperties(["leaveGuild"]);}
get Tooltips() {return this.WebpackModules.find(m => m.hide && m.show && !m.search && !m.submit && !m.search && !m.activateRagingDemon && !m.dismiss);}
get KeyGenerator() {return this.WebpackModules.find(m => m.toString && /"binary"/.test(m.toString()));}
get LayerStack() {return this.WebpackModules.findByUniqueProperties(["popLayer"]);}
get UserStore() {return this.WebpackModules.findByUniqueProperties(["getCurrentUser"]);}
get ChannelStore() {return this.WebpackModules.findByUniqueProperties(["getChannel"]);}
get ChannelActions() {return this.WebpackModules.findByUniqueProperties(["openPrivateChannel"]);}
get PrivateChannelActions() {return this.WebpackModules.findByUniqueProperties(["selectPrivateChannel"]);}
openDM(userId) {
const selfId = this.UserStore.getCurrentUser().id;
if (selfId == userId) return;
const privateChannelId = this.ChannelStore.getDMFromUserId(userId);
if (privateChannelId) return this.PrivateChannelActions.selectPrivateChannel(privateChannelId);
this.ChannelActions.openPrivateChannel(selfId, userId);
}
parseSettings(cat) {
return Object.keys(settings).reduce((arr, key) => {
const setting = settings[key];
if (setting.cat === cat && setting.implemented && !setting.hidden) {
setting.text = key;
arr.push(setting);
} return arr;
}, []);
}
};

View File

@ -1,147 +1,148 @@
let req
setReq()
class DangerousWebpackloader {
get modules(){
if(req){
return Object.values(req.c).filter(e => e && e.exports)
}else{
setReq()
if(req){
return Object.values(req.c).filter(e => e && e.exports)
}else{
return []
}
}
}
get(ids, modules){
if(typeof ids === "function"){
return (modules || this.modules).map((mdl) => {
if(mdl && typeof mdl.exports !== "undefined"){
return mdl.exports
}else{
return null
}
}).filter(e => e).filter(ids)
}else if(Array.isArray(ids)){
modules = modules || this.modules
return ids.map(id => this.get(id, modules))
}else{
modules = modules || this.modules
let module = modules.find(e => e.i === ids)
if(!module)return undefined
return module.exports
}
}
get default(){
return this
}
}
function filterDangerous(mods){
return mods.map(e => {
return protect(e)
})
}
function protect(exports){
let theModule = exports.exports
let mod = theModule.default
if(!mod)return exports
if (mod.remove && mod.set && mod.clear && mod.get && !mod.sort) return null;
if (!mod.getToken && !mod.getEmail && !mod.showToken)return exports
const proxy = new Proxy(mod, {
getOwnPropertyDescriptor: function(obj, prop) {
if (prop === "getToken" || prop === "getEmail" || prop === "showToken") return undefined;
return Object.getOwnPropertyDescriptor(obj, prop);
},
get: function(obj, func) {
if (func == "getToken") return () => "mfa.XCnbKzo0CLIqdJzBnL0D8PfDruqkJNHjwHXtr39UU3F8hHx43jojISyi5jdjO52e9_e9MjmafZFFpc-seOMa";
if (func == "getEmail") return () => "puppet11112@gmail.com";
if (func == "showToken") return () => true;
// if (func == "__proto__") return proxy;
return obj[func];
}
});
return Object.assign({}, exports, {exports: Object.assign({}, theModule, {default: proxy})})
}
class Webpackloader {
get modules(){
if(req){
return filterDangerous(Object.values(req.c).filter(e => e && e.exports))
}else{
setReq()
if(req){
return filterDangerous(Object.values(req.c).filter(e => e && e.exports))
}else{
return []
}
}
}
get(ids, modules){
if(typeof ids === "function"){
return (modules || this.modules).map((mdl) => {
if(mdl && typeof mdl.exports !== "undefined"){
return mdl.exports
}else{
return null
}
}).filter(e => e).filter(ids)
}else if(Array.isArray(ids)){
modules = modules || this.modules
return ids.map(id => this.get(id, modules))
}else{
modules = modules || this.modules
let module = modules.find(e => e.i === ids)
if(!module)return undefined
return module.exports
}
}
get default(){
return this
}
}
module.exports = new DangerousWebpackloader()
global.BDModules = new Webpackloader()
function setReq(){
try{
req = webpackJsonp.push([[], {__extra_id__: (mdl, exports, req) => mdl.exports = req}, [["__extra_id__"]]]);
if(req){
delete req.m.__extra_id__;
delete req.c.__extra_id__;/*
Object.defineProperty(req.c, "0", {
get: () => ({
i: 0,
l: true,
exports: require("react")
}),
configurable: false,
enumerable: true
})
Object.defineProperty(req.c, "856", {
get: () => ({
i: 856,
l: true,
exports: require("react")
}),
configurable: false,
enumerable: true
})
Object.defineProperty(req.c, "71", {
get: () => ({
i: 71,
l: true,
exports: require("react-dom")
}),
configurable: false,
enumerable: true
})*/
}
}catch(e){
req = undefined
}
let req
setReq()
class DangerousWebpackloader {
get modules(){
if(req){
return Object.values(req.c).filter(e => e && e.exports)
}else{
setReq()
if(req){
return Object.values(req.c).filter(e => e && e.exports)
}else{
return []
}
}
}
get(ids, modules){
if(typeof ids === "function"){
return (modules || this.modules).map((mdl) => {
if(mdl && typeof mdl.exports !== "undefined"){
return mdl.exports
}else{
return null
}
}).filter(e => e).filter(ids)
}else if(Array.isArray(ids)){
modules = modules || this.modules
return ids.map(id => this.get(id, modules))
}else{
modules = modules || this.modules
let module = modules.find(e => e.i === ids)
if(!module)return undefined
return module.exports
}
}
get default(){
return this
}
}
function filterDangerous(mods){
return mods.map(e => {
return protect(e)
})
}
function protect(exports){
let theModule = exports.exports
let mod = theModule.default
if(!mod)return exports
if (mod.remove && mod.set && mod.clear && mod.get && !mod.sort) return null;
if (!mod.getToken && !mod.getEmail && !mod.showToken)return exports
const proxy = new Proxy(mod, {
getOwnPropertyDescriptor: function(obj, prop) {
if (prop === "getToken" || prop === "getEmail" || prop === "showToken") return undefined;
return Object.getOwnPropertyDescriptor(obj, prop);
},
get: function(obj, func) {
if (func == "getToken" && obj.getToken) return () => "mfa.XCnbKzo0CLIqdJzBnL0D8PfDruqkJNHjwHXtr39UU3F8hHx43jojISyi5jdjO52e9_e9MjmafZFFpc-seOMa";
if (func == "getEmail" && obj.getEmail) return () => "puppet11112@gmail.com";
if (func == "showToken" && obj.showToken) return () => true;
if (func == "__proto__" && obj.__proto__) return proxy;
return obj[func];
}
});
return Object.assign({}, exports, {exports: Object.assign({}, theModule, {default: proxy})})
}
class Webpackloader {
get modules(){
if(req){
return filterDangerous(Object.values(req.c).filter(e => e && e.exports))
}else{
setReq()
if(req){
return filterDangerous(Object.values(req.c).filter(e => e && e.exports))
}else{
return []
}
}
}
get(ids, modules){
if(typeof ids === "function"){
return (modules || this.modules).map((mdl) => {
if(mdl && typeof mdl.exports !== "undefined"){
return mdl.exports
}else{
return null
}
}).filter(e => e).filter(ids)
}else if(Array.isArray(ids)){
modules = modules || this.modules
return ids.map(id => this.get(id, modules))
}else{
modules = modules || this.modules
let module = modules.find(e => e.i === ids)
if(!module)return undefined
return module.exports
}
}
get default(){
return this
}
}
module.exports = new DangerousWebpackloader()
global.BDModules = new Webpackloader()
function setReq(){
try{
req = webpackJsonp.push([[], {__extra_id__: (mdl, exports, req) => mdl.exports = req}, [["__extra_id__"]]]);
if(req){
delete req.m.__extra_id__;
delete req.c.__extra_id__;/*
Object.defineProperty(req.c, "0", {
get: () => ({
i: 0,
l: true,
exports: require("react")
}),
configurable: false,
enumerable: true
})
Object.defineProperty(req.c, "856", {
get: () => ({
i: 856,
l: true,
exports: require("react")
}),
configurable: false,
enumerable: true
})
Object.defineProperty(req.c, "71", {
get: () => ({
i: 71,
l: true,
exports: require("react-dom")
}),
configurable: false,
enumerable: true
})*/
}
}catch(e){
req = undefined
}
}