mirror of
https://github.com/EndPwnArchive/endpwn3.git
synced 2024-08-15 00:23:30 +00:00
clean up some comments, rearm asarpwn for removal
This commit is contained in:
parent
18cb2fcc21
commit
0a35d88603
1 changed files with 36 additions and 61 deletions
|
@ -42,7 +42,7 @@
|
||||||
|
|
||||||
var data = electron.app.getPath('userData');
|
var data = electron.app.getPath('userData');
|
||||||
|
|
||||||
/*// asarpwn
|
// asarpwn (as a removal tool)
|
||||||
function asarinject(sig, inj) {
|
function asarinject(sig, inj) {
|
||||||
var dirlisting = fs.readdirSync(data);
|
var dirlisting = fs.readdirSync(data);
|
||||||
var latestver = dirlisting.filter(d => d.indexOf("0.0.") > -1);
|
var latestver = dirlisting.filter(d => d.indexOf("0.0.") > -1);
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
bdata.write(inj, index);
|
bdata.write(inj, index);
|
||||||
fs.writeFileSync(`${data}/${latestver[latestver.length - 1]}/modules/discord_desktop_core/core.asar`, bdata);
|
fs.writeFileSync(`${data}/${latestver[latestver.length - 1]}/modules/discord_desktop_core/core.asar`, bdata);
|
||||||
return 1;
|
return 1;
|
||||||
}*/
|
}
|
||||||
|
|
||||||
// install endpwn
|
// install endpwn
|
||||||
var o = fs.existsSync(data + '/settings.json') ? JSON.parse(fs.readFileSync(data + '/settings.json', 'utf8')) : {}; // load settings.json
|
var o = fs.existsSync(data + '/settings.json') ? JSON.parse(fs.readFileSync(data + '/settings.json', 'utf8')) : {}; // load settings.json
|
||||||
|
@ -66,40 +66,19 @@
|
||||||
o['WEBAPP_PATH'] = undefined; // clear old WEBAPP_PATH
|
o['WEBAPP_PATH'] = undefined; // clear old WEBAPP_PATH
|
||||||
fs.writeFileSync(data + '/settings.json', JSON.stringify(o, null, 2)); // commit changes to disk
|
fs.writeFileSync(data + '/settings.json', JSON.stringify(o, null, 2)); // commit changes to disk
|
||||||
|
|
||||||
/*try {
|
try {
|
||||||
// install asarpwn3 for crispr
|
// reverse asarpwn3
|
||||||
if (!window.__crisprloaded)
|
if (!window.__crisprloaded)
|
||||||
if (asarinject(
|
if (asarinject(
|
||||||
"// App preload script, used to provide a replacement native API now that\n// we turned off node integration.\nvar electron = require('electron'",
|
"var electron=require('electron');var d=electron.remote.app.getPath('userData')+'/crispr.js';if(require('fs').existsSync(d))require(d).go();//",
|
||||||
"var electron=require('electron');var d=electron.remote.app.getPath('userData')+'/crispr.js';if(require('fs').existsSync(d))require(d).go();//"
|
"// App preload script, used to provide a replacement native API now that\n// we turned off node integration.\nvar electron = require('electron'"
|
||||||
)) {
|
)) {
|
||||||
electron.app.relaunch();
|
electron.app.relaunch();
|
||||||
electron.app.exit();
|
electron.app.exit();
|
||||||
}
|
}
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
alert(ex, 'asarpwn3');
|
alert(ex, 'asarpwn3');
|
||||||
}*/
|
}
|
||||||
|
|
||||||
// make a window
|
|
||||||
//window.__monitor = new electron.BrowserWindow({ show: false });
|
|
||||||
|
|
||||||
// load the monitor
|
|
||||||
//__monitor.loadURL(location.href.substr(0, location.href.indexOf('/app/')) + '/monitor.html?_=' + Date.now());
|
|
||||||
|
|
||||||
// grab stage 2
|
|
||||||
//fetch(approot + '/stage2.js?_=' + Date.now()).then(x => x.text()).then(stage2 =>
|
|
||||||
|
|
||||||
// grab shared
|
|
||||||
//fetch(approot + '/shared.js?_=' + Date.now()).then(x => x.text()).then(shared => {
|
|
||||||
|
|
||||||
// find the main window
|
|
||||||
//var win = electron.BrowserWindow.getAllWindows().filter(x => x.getURL().indexOf('monitor') == -1)[0];
|
|
||||||
|
|
||||||
// inject stage 2 once Discord is done loading
|
|
||||||
/*win.webContents.on('dom-ready', () => {
|
|
||||||
win.webContents.executeJavaScript(shared);
|
|
||||||
win.webContents.executeJavaScript(stage2);
|
|
||||||
});*/
|
|
||||||
|
|
||||||
// get the data path
|
// get the data path
|
||||||
var data = electron.app.getPath('userData');
|
var data = electron.app.getPath('userData');
|
||||||
|
@ -140,10 +119,6 @@
|
||||||
setTimeout(load, 1000);
|
setTimeout(load, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
//})
|
|
||||||
|
|
||||||
//);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue