exploit: support saving of exploit page to disk

pull/4/head
Piotr Dobrowolski 2021-04-25 22:40:40 +02:00
rodzic d8ccc66d6b
commit 271f73db13
1 zmienionych plików z 7 dodań i 3 usunięć

Wyświetl plik

@ -20,7 +20,9 @@
</section>
<script>
window.ORIGIN_URL = window.location.protocol === 'data:' ? '__START_ORIGIN__' : window.location.href;
window.ORIGIN_URL =
window.location.protocol === 'data:' ? '__START_ORIGIN__' :
window.location.protocol === 'file:' ? 'https://rootmy.tv' : window.location.href;
window.onerror = function (err) {
console.error(err);
@ -171,9 +173,11 @@
log("An unexpected error occured: " + err.toString());
}
}
document.querySelector('#exploit').addEventListener('click', function () {
bootstrap('localhost', new URL('stage2.html', ORIGIN_URL).href);
// Allow people to download the exploit page to manually set target IP,
// in case direct on-tv deployment fails for some reason.
var target = window.location.protocol === 'file:' ? prompt('Enter IP address of Your TV') : 'localhost';
bootstrap(target, new URL('stage2.html', ORIGIN_URL).href);
});
</script>
</body>