mirror of
https://github.com/EndPwnArchive/endpwn3.git
synced 2024-08-15 00:23:30 +00:00
uninstall function (hopefully this doesnt go horribly)
This commit is contained in:
parent
8efdb59e66
commit
e3c07eb5c2
1 changed files with 47 additions and 0 deletions
47
stage2.js
47
stage2.js
|
@ -41,4 +41,51 @@
|
|||
// call the entrypoint
|
||||
epapi.go('bootsyhax-dr1ft', 0, 1);
|
||||
|
||||
window.endpwn = {
|
||||
uninstall: function () {
|
||||
$api.ui.showDialog({
|
||||
title: 'EndPwn: confirm uninstallation',
|
||||
body: 'Are you sure you want to remove EndPwn from your client? You can reinstall it at any time.',
|
||||
confirmText: 'Yes', cancelText: 'No',
|
||||
|
||||
onConfirm: () => {
|
||||
|
||||
var data = $api.data;
|
||||
const Buffer = require('buffer').Buffer;
|
||||
|
||||
// asarpwn
|
||||
function asarinject(sig, inj) {
|
||||
var dirlisting = fs.readdirSync(data);
|
||||
var latestver = dirlisting.filter(d => d.indexOf("0.0.") > -1);
|
||||
|
||||
if (sig.length != inj.length) {
|
||||
throw 'signature and injection not same size'
|
||||
}
|
||||
var bdata = new Buffer(fs.readFileSync(`${data}/${latestver[latestver.length - 1]}/modules/discord_desktop_core/core.asar`));
|
||||
var index = bdata.indexOf(sig);
|
||||
if (index == -1) {
|
||||
return 0;
|
||||
}
|
||||
bdata.write(inj, index);
|
||||
fs.writeFileSync(`${data}/${latestver[latestver.length - 1]}/modules/discord_desktop_core/core.asar`, bdata);
|
||||
return 1;
|
||||
}
|
||||
|
||||
asarinject(
|
||||
"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'"
|
||||
);
|
||||
|
||||
$api.settings.set('WEBAPP_ENDPOINT');
|
||||
$api.settings.set('WEBAPP_PATH');
|
||||
|
||||
reload();
|
||||
|
||||
},
|
||||
onCancel: () => console.log('<3')
|
||||
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
})();
|
Loading…
Reference in a new issue