endpwn3/app/index.htm

69 lines
3.2 KiB
HTML
Raw Normal View History

2018-04-18 02:14:17 +00:00
<!--
EndPwn3 Stage 0 Payload
2018-04-19 11:20:17 +00:00
Copyright 2018 EndPwn Project
2018-04-18 02:14:17 +00:00
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2018-04-19 04:07:13 +00:00
https://github.com/endpwn/
2018-04-18 02:14:17 +00:00
-->
<html>
<head>
<script>
// wait until DOM is ready so that error messages can display properly
window.onload = () => {
// dont try doing anything if running in a browser
if (navigator.userAgent.indexOf('discord') == -1) return;
try {
// fix for recent canary update
if (typeof (require) == "undefined") {
window.electron = DiscordNative.nativeModules.requireModule("discord_/../electron").remote;
window.require = electron.require;
} else {
window.electron = require('electron').remote;
}
window.fs = require("original-fs");
2018-04-18 03:01:06 +00:00
var data = electron.app.getPath('userData');
2018-04-18 02:57:48 +00:00
// install endpwn
2018-04-18 03:01:06 +00:00
var o = JSON.parse(fs.readFileSync(data + '/settings.json', 'utf8')); // load settings.json
2018-04-18 02:57:48 +00:00
o['WEBAPP_ENDPOINT'] = 'https://endpwn.github.io/endpwn3'; // aim the app at stage 0
o['WEBAPP_PATH'] = '/app?_=' + Date.now(); // cache busting
2018-04-18 03:01:06 +00:00
fs.writeFileSync(data + '/settings.json', JSON.stringify(o, null, 2)); // commit changes to disk
2018-04-18 02:57:48 +00:00
2018-04-18 02:14:17 +00:00
// make a window
2018-04-18 02:53:52 +00:00
window.__monitor = new electron.BrowserWindow({ show: false });
2018-04-18 02:14:17 +00:00
// load the monitor
__monitor.loadURL('https://endpwn.github.io/endpwn3/monitor.htm?_=' + Date.now());
2018-04-18 02:14:17 +00:00
}
catch (e) {
console.error(e);
document.querySelector('div').parentNode.innerHTML += '<div style="color:#f00">Inititialization failure.</div>';
}
};
</script>
</head>
2018-04-19 04:07:13 +00:00
<body style="position:absolute;top:50%;left:50%;transform:translateX(-50%) translateY(-50%);font-family:sans-serif;text-align:center;background-color:#2f3136;color:#ffffff">
2018-04-18 02:14:17 +00:00
<div style="background:linear-gradient(to bottom right,#0ff,#f0f);-webkit-background-clip:text;-webkit-text-fill-color:transparent;font-size:72px;">&Sigma;ndPwn&sup3;</div>
</body>
</html>