kopia lustrzana https://github.com/RootMyTV/RootMyTV.github.io
Cosmetic updates
rodzic
b23cd4cf03
commit
73fa69e2e4
|
@ -39,8 +39,13 @@ article > p {
|
|||
margin: 1em;
|
||||
}
|
||||
|
||||
article a, article a:visited {
|
||||
color: #d653dd;
|
||||
}
|
||||
|
||||
.slider-bar {
|
||||
width: 90%;
|
||||
height: 4em;
|
||||
margin: 2em auto;
|
||||
border: 1px solid #fff;
|
||||
position: relative;
|
||||
|
@ -49,7 +54,6 @@ article > p {
|
|||
|
||||
box-shadow: 0 0 1px 1px #fff, 0 0 1em 0.5em #731178, inset 0 0 1em 0.5em #731178, inset 0 0 1px 1px #fff;
|
||||
/**/
|
||||
background: black;
|
||||
}
|
||||
|
||||
/* Use pre-baked glow effect to improve perf on the TV itself */
|
||||
|
@ -70,78 +74,78 @@ background-position: center;
|
|||
background-repeat: no-repeat;
|
||||
}
|
||||
}*/
|
||||
.slider-button {
|
||||
z-index: 1;
|
||||
display: block;
|
||||
border: 1px solid #fff;
|
||||
border-radius: 0.5em;
|
||||
margin: 0.4em;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
box-sizing:border-box;
|
||||
left: 0%;
|
||||
width: 15%;
|
||||
height: 80%;
|
||||
text-align: center;
|
||||
.slider-button {
|
||||
z-index: 1;
|
||||
display: block;
|
||||
border: 1px solid #fff;
|
||||
border-radius: 0.5em;
|
||||
margin: 0.4em;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
box-sizing:border-box;
|
||||
left: 0%;
|
||||
width: 15%;
|
||||
height: 80%;
|
||||
text-align: center;
|
||||
|
||||
box-shadow: 0 0 1px 1px #fff, 0 0 1em 0.2em #0bb6be, inset 0 0 1em 0.2em #0bb6be, inset 0 0 1px 1px #fff;
|
||||
/**/
|
||||
box-shadow: 0 0 1px 1px #fff, 0 0 1em 0.2em #0bb6be, inset 0 0 1em 0.2em #0bb6be, inset 0 0 1px 1px #fff;
|
||||
/**/
|
||||
}
|
||||
.slider-button > p {
|
||||
cursor: grab;
|
||||
font-family: 'Orbitron', sans-serif;
|
||||
font-size: 3em;
|
||||
margin: 0;
|
||||
color: black;
|
||||
margin-top: -0.3em;
|
||||
|
||||
text-shadow: 0 0 3px #d4ffff, 0 0 3px #d4ffff, 0 0 3px #d4ffff, 0 0 1em #0bb6be, 0 0 0.3em #0bb6be, 0 0 0.3em #0bb6be;
|
||||
/**/
|
||||
}
|
||||
.slider-text {
|
||||
margin: 0;
|
||||
display: block;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-family: 'Orbitron', sans-serif;
|
||||
font-size: 2.5em;
|
||||
color: black;
|
||||
|
||||
text-shadow: 0 0 3px #d4ffff, 0 0 3px #d4ffff, 0 0 3px #d4ffff, 0 0 1em #0bb6be, 0 0 0.2em #0bb6be;
|
||||
/**/
|
||||
padding-top: 0.04em;
|
||||
padding-bottom: 0.12em;
|
||||
|
||||
|
||||
position: relative;
|
||||
}
|
||||
.slider-text:after {
|
||||
content: "slide to root";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
text-shadow: none;
|
||||
width: 100%;
|
||||
|
||||
background-clip: text;
|
||||
-webkit-background-clip: text;
|
||||
-moz-background-clip: text;
|
||||
text-fill-color: transparent;
|
||||
-webkit-text-fill-color: transparent;
|
||||
-moz-text-fill-color: transparent;
|
||||
background-image: linear-gradient(270deg, #000 0%, #11bbc2 15%, #000 30%, #000 100%);
|
||||
animation: Shine 3000s linear infinite;
|
||||
/**/
|
||||
}
|
||||
|
||||
@keyframes Shine {
|
||||
0%{
|
||||
background-position: 0 0;
|
||||
}
|
||||
.slider-button > p {
|
||||
cursor: grab;
|
||||
font-family: 'Orbitron', sans-serif;
|
||||
font-size: 3em;
|
||||
margin: 0;
|
||||
color: black;
|
||||
margin-top: -0.3em;
|
||||
|
||||
text-shadow: 0 0 3px #d4ffff, 0 0 3px #d4ffff, 0 0 3px #d4ffff, 0 0 1em #0bb6be, 0 0 0.3em #0bb6be, 0 0 0.3em #0bb6be;
|
||||
/**/
|
||||
}
|
||||
.slider-text {
|
||||
margin: 0;
|
||||
display: block;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-family: 'Orbitron', sans-serif;
|
||||
font-size: 2.5em;
|
||||
color: black;
|
||||
|
||||
text-shadow: 0 0 3px #d4ffff, 0 0 3px #d4ffff, 0 0 3px #d4ffff, 0 0 1em #0bb6be, 0 0 0.2em #0bb6be;
|
||||
/**/
|
||||
padding-top: 0.04em;
|
||||
padding-bottom: 0.12em;
|
||||
|
||||
|
||||
position: relative;
|
||||
}
|
||||
.slider-text:after {
|
||||
content: "slide to root";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
text-shadow: none;
|
||||
width: 100%;
|
||||
|
||||
background-clip: text;
|
||||
-webkit-background-clip: text;
|
||||
-moz-background-clip: text;
|
||||
text-fill-color: transparent;
|
||||
-webkit-text-fill-color: transparent;
|
||||
-moz-text-fill-color: transparent;
|
||||
background-image: linear-gradient(270deg, #000 0%, #11bbc2 15%, #000 30%, #000 100%);
|
||||
animation: Shine 3000s linear infinite;
|
||||
/**/
|
||||
}
|
||||
|
||||
@keyframes Shine {
|
||||
0%{
|
||||
background-position: 0 0;
|
||||
}
|
||||
100%{
|
||||
background-position: 1000000px 0; /* FIXME: should be percentage, but that breaks it */
|
||||
}
|
||||
100%{
|
||||
background-position: 1000000px 0; /* FIXME: should be percentage, but that breaks it */
|
||||
}
|
||||
}
|
||||
|
||||
#log {
|
||||
width: 100%;
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>RootMyTV - Stage 1</title>
|
||||
<meta name="viewport" content="width=1280">
|
||||
<link rel="stylesheet" href="common.css" />
|
||||
</head>
|
||||
|
||||
|
@ -11,13 +13,28 @@
|
|||
</header>
|
||||
<hr>
|
||||
<section class="content-center">
|
||||
<button id="exploit" class="slider-bar">
|
||||
Press to root
|
||||
</button>
|
||||
<article>
|
||||
<pre id="log"></pre>
|
||||
<article id="main-article">
|
||||
<p>
|
||||
This webpage will exploit your LG webOS smart TV, gain local root privileges,
|
||||
and install the <a href="https://github.com/webosbrew/webos-homebrew-channel">
|
||||
webOS Homebrew Channel.</a> If you don't know what that means, please
|
||||
read our documentation and writeup <a href="https://github.com/RootMyTV/RootMyTV.github.io">here.</a>
|
||||
</p>
|
||||
<p>
|
||||
Once you're ready to proceed, drag the slider below
|
||||
(or press "5") to begin.
|
||||
</p>
|
||||
<div class="slider-bar">
|
||||
<div class="slider-button"><p>-></p></div>
|
||||
<p class="slider-text">slide to root</p>
|
||||
</div>
|
||||
<p>
|
||||
Note: If you are visting this page from a device that isn't your TV,
|
||||
you will need to know your TV's local IP address.
|
||||
</p>
|
||||
</article>
|
||||
</section>
|
||||
<hr>
|
||||
|
||||
<script>
|
||||
window.ORIGIN_URL =
|
||||
|
@ -29,6 +46,94 @@
|
|||
alert('error: ' + JSON.stringify(err) + '\n' + err.fileName + ' ' + err.lineNumber);
|
||||
};
|
||||
</script>
|
||||
<script>
|
||||
/* slider animation logic */
|
||||
var slider = document.getElementsByClassName("slider-button")[0];
|
||||
var sliderText = document.getElementsByClassName("slider-text")[0];
|
||||
var startX = 0;
|
||||
var endX = 0;
|
||||
var posX = 0;
|
||||
var grabbed = false;
|
||||
var velX = 0;
|
||||
var lastUpdate = Date.now();
|
||||
var prevPosX = 0;
|
||||
|
||||
function slidermousedown(e) {
|
||||
e.preventDefault();
|
||||
startX = e.clientX;
|
||||
grabbed = true;
|
||||
endX = Math.floor(slider.parentElement.clientWidth * 0.827);
|
||||
|
||||
//console.log("mousedown");
|
||||
|
||||
window.onmousemove = slidermousemove;
|
||||
window.onmouseup = slidermouseup;
|
||||
return false;
|
||||
}
|
||||
|
||||
function slidermousemove(e) {
|
||||
e.preventDefault();
|
||||
//console.log("mousemove");
|
||||
var deltaX = e.clientX - startX;
|
||||
if (deltaX < 0) {
|
||||
deltaX = 0;
|
||||
} else if (deltaX > endX) {
|
||||
deltaX = endX;
|
||||
}
|
||||
posX = deltaX; // XXX fixme
|
||||
}
|
||||
|
||||
function slidermouseup(e) {
|
||||
//console.log("mouseup");
|
||||
window.onmousemove = null;
|
||||
window.onmouseup = null;
|
||||
velX = 0;
|
||||
if (posX == endX) {
|
||||
console.log("slid!");
|
||||
begin_exploit();
|
||||
slider.onmousedown = null;
|
||||
} else {
|
||||
grabbed = false;
|
||||
}
|
||||
}
|
||||
|
||||
function animate_tick() {
|
||||
var now = Date.now();
|
||||
var dt = now - lastUpdate;
|
||||
ticks = dt/(1000/60);
|
||||
if (ticks > 4) ticks = 4;
|
||||
lastUpdate = now;
|
||||
|
||||
if (!grabbed && posX != 0) {
|
||||
var accel = (0.5 + posX/200) * ticks;
|
||||
velX -= accel;
|
||||
posX += velX * ticks;
|
||||
|
||||
if (posX < 0) {
|
||||
velX *= -0.3;
|
||||
posX *= -0.3;
|
||||
}
|
||||
|
||||
if (posX < 0.1) {
|
||||
posX = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//document.getElementById("fps").innerText = Math.floor(1000/dt);
|
||||
|
||||
if (prevPosX != posX) {
|
||||
slider.style.left = Math.floor(posX) + "px";
|
||||
sliderText.style.opacity = 1-(posX/endX);
|
||||
}
|
||||
prevPosX = posX;
|
||||
window.requestAnimationFrame(animate_tick);
|
||||
}
|
||||
|
||||
|
||||
|
||||
slider.onmousedown = slidermousedown;
|
||||
window.requestAnimationFrame(animate_tick);
|
||||
</script>
|
||||
<script>
|
||||
// Exploit data: url navigation for browsers which didn't have following patch
|
||||
// applied yet (webOS 3.x):
|
||||
|
@ -173,12 +278,15 @@
|
|||
log("An unexpected error occured: " + err.toString());
|
||||
}
|
||||
}
|
||||
document.querySelector('#exploit').addEventListener('click', function () {
|
||||
function begin_exploit() {
|
||||
// replace main body with log window
|
||||
document.querySelector("#main-article").innerHTML = "<pre id='log'></pre>";
|
||||
|
||||
// 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>
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
|
Ładowanie…
Reference in New Issue