diff --git a/package-lock.json b/package-lock.json
index a846ae5..29d309b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9,13 +9,19 @@
"version": "0.0.0",
"license": "MIT",
"dependencies": {
+ "@fontsource/orbitron": "^5.0.19",
"@popperjs/core": "^2.11.8",
+ "@webosbrew/caniroot": "^1.0.1",
"bootstrap": "^5.3.3",
"bootstrap-icons": "^1.11.3",
"gsap": "^3.12.5",
- "marquee-content": "^4.2.0"
+ "htm": "^3.1.1",
+ "lodash-es": "^4.17.21",
+ "marquee-content": "^4.2.0",
+ "preact": "^10.22.0"
},
"devDependencies": {
+ "@types/lodash-es": "^4.17.12",
"autoprefixer": "^10.4.19",
"copy-webpack-plugin": "^12.0.2",
"css-loader": "^7.1.1",
@@ -33,6 +39,8 @@
"sass": "^1.76.0",
"sass-loader": "^14.2.1",
"style-loader": "^4.0.0",
+ "ts-loader": "^9.5.1",
+ "typescript": "^5.4.5",
"webpack": "^5.91.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.0.4"
@@ -95,6 +103,11 @@
"tslib": "^2.4.0"
}
},
+ "node_modules/@fontsource/orbitron": {
+ "version": "5.0.19",
+ "resolved": "https://registry.npmjs.org/@fontsource/orbitron/-/orbitron-5.0.19.tgz",
+ "integrity": "sha512-Lr/v3Zq/9Q7gAU+XFH9AEExqhCwTKYvJZsBN7wvVk1Tkl0M0fIbW7qh5Bk4b5rrTqT93hj+gsbd64NBdVTZKuw=="
+ },
"node_modules/@img/sharp-darwin-arm64": {
"version": "0.33.4",
"resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.4.tgz",
@@ -874,6 +887,21 @@
"integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
"dev": true
},
+ "node_modules/@types/lodash": {
+ "version": "4.17.5",
+ "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.5.tgz",
+ "integrity": "sha512-MBIOHVZqVqgfro1euRDWX7OO0fBVUUMrN6Pwm8LQsz8cWhEpihlvR70ENj3f40j58TNxZaWv2ndSkInykNBBJw==",
+ "dev": true
+ },
+ "node_modules/@types/lodash-es": {
+ "version": "4.17.12",
+ "resolved": "https://registry.npmjs.org/@types/lodash-es/-/lodash-es-4.17.12.tgz",
+ "integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==",
+ "dev": true,
+ "dependencies": {
+ "@types/lodash": "*"
+ }
+ },
"node_modules/@types/mime": {
"version": "1.3.5",
"resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz",
@@ -1110,6 +1138,11 @@
"@xtuc/long": "4.2.2"
}
},
+ "node_modules/@webosbrew/caniroot": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@webosbrew/caniroot/-/caniroot-1.0.1.tgz",
+ "integrity": "sha512-5fvLVk6kBzgSdpcE5qMc6x5xwVI5QCmYcLgXa1MI0BjGnmav307RHFEtGxMo2oWmjcv30rfMrXthxvMChT80kQ=="
+ },
"node_modules/@webpack-cli/configtest": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz",
@@ -2202,12 +2235,12 @@
}
},
"node_modules/braces": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
- "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
+ "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
"dev": true,
"dependencies": {
- "fill-range": "^7.0.1"
+ "fill-range": "^7.1.1"
},
"engines": {
"node": ">=8"
@@ -4194,9 +4227,9 @@
}
},
"node_modules/fill-range": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
- "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+ "version": "7.1.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
+ "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
"dev": true,
"dependencies": {
"to-regex-range": "^5.0.1"
@@ -4765,6 +4798,11 @@
"safe-buffer": "~5.1.0"
}
},
+ "node_modules/htm": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/htm/-/htm-3.1.1.tgz",
+ "integrity": "sha512-983Vyg8NwUE7JkZ6NmOqpCZ+sh1bKv2iYTlUkzlWmA5JD2acKoxd4KVxbMmxX/85mtfdnDmTFoNKcg5DGAvxNQ=="
+ },
"node_modules/html-bundler-webpack-plugin": {
"version": "3.13.0",
"resolved": "https://registry.npmjs.org/html-bundler-webpack-plugin/-/html-bundler-webpack-plugin-3.13.0.tgz",
@@ -6234,6 +6272,11 @@
"node": ">=8"
}
},
+ "node_modules/lodash-es": {
+ "version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz",
+ "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw=="
+ },
"node_modules/lower-case": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz",
@@ -7448,6 +7491,15 @@
"integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
"dev": true
},
+ "node_modules/preact": {
+ "version": "10.22.0",
+ "resolved": "https://registry.npmjs.org/preact/-/preact-10.22.0.tgz",
+ "integrity": "sha512-RRurnSjJPj4rp5K6XoP45Ui33ncb7e4H7WiOHVpjbkvqvA3U+N8Z6Qbo0AE6leGYBV66n8EhEaFixvIu3SkxFw==",
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/preact"
+ }
+ },
"node_modules/prepend-http": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz",
@@ -9030,6 +9082,105 @@
"node": ">=0.10.0"
}
},
+ "node_modules/ts-loader": {
+ "version": "9.5.1",
+ "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.5.1.tgz",
+ "integrity": "sha512-rNH3sK9kGZcH9dYzC7CewQm4NtxJTjSEVRJ2DyBZR7f8/wcta+iV44UPCXc5+nzDzivKtlzV6c9P4e+oFhDLYg==",
+ "dev": true,
+ "dependencies": {
+ "chalk": "^4.1.0",
+ "enhanced-resolve": "^5.0.0",
+ "micromatch": "^4.0.0",
+ "semver": "^7.3.4",
+ "source-map": "^0.7.4"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "peerDependencies": {
+ "typescript": "*",
+ "webpack": "^5.0.0"
+ }
+ },
+ "node_modules/ts-loader/node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/ts-loader/node_modules/chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "dev": true,
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/ts-loader/node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/ts-loader/node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "node_modules/ts-loader/node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/ts-loader/node_modules/source-map": {
+ "version": "0.7.4",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz",
+ "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==",
+ "dev": true,
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/ts-loader/node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/tslib": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
@@ -9073,6 +9224,19 @@
"node": ">= 0.6"
}
},
+ "node_modules/typescript": {
+ "version": "5.4.5",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz",
+ "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==",
+ "dev": true,
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=14.17"
+ }
+ },
"node_modules/uglify-js": {
"version": "3.17.4",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz",
@@ -9752,9 +9916,9 @@
"dev": true
},
"node_modules/ws": {
- "version": "8.16.0",
- "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz",
- "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==",
+ "version": "8.17.1",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz",
+ "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==",
"dev": true,
"engines": {
"node": ">=10.0.0"
diff --git a/package.json b/package.json
index 5ba462f..77b1065 100644
--- a/package.json
+++ b/package.json
@@ -14,13 +14,19 @@
"test": "npm run build"
},
"dependencies": {
+ "@fontsource/orbitron": "^5.0.19",
"@popperjs/core": "^2.11.8",
+ "@webosbrew/caniroot": "^1.0.1",
"bootstrap": "^5.3.3",
"bootstrap-icons": "^1.11.3",
"gsap": "^3.12.5",
- "marquee-content": "^4.2.0"
+ "htm": "^3.1.1",
+ "lodash-es": "^4.17.21",
+ "marquee-content": "^4.2.0",
+ "preact": "^10.22.0"
},
"devDependencies": {
+ "@types/lodash-es": "^4.17.12",
"autoprefixer": "^10.4.19",
"copy-webpack-plugin": "^12.0.2",
"css-loader": "^7.1.1",
@@ -38,6 +44,8 @@
"sass": "^1.76.0",
"sass-loader": "^14.2.1",
"style-loader": "^4.0.0",
+ "ts-loader": "^9.5.1",
+ "typescript": "^5.4.5",
"webpack": "^5.91.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.0.4"
diff --git a/src/pages/devmode.md b/src/pages/devmode.md
deleted file mode 100644
index e69de29..0000000
diff --git a/src/pages/rooting.md b/src/pages/rooting.md
deleted file mode 100644
index 587ef20..0000000
--- a/src/pages/rooting.md
+++ /dev/null
@@ -1,57 +0,0 @@
-# Root your TV
-
-## Root or Not?
-
-Before rooting your TV, please think about what you would like to do with a rooted TV.
-
-| Use Case | Root Required | Dev Mode |
-|--------------------------------------------------------------------------------|---------------|----------|
-| Use apps like Kodi, Moonlight, etc. | ✅ | ✅ |
-| No need for renewing developer mode per 1000 hours | ✅ | ❌ |
-| Amblight setup with [PicCap][PicCap]/[Hyperion][Hyperion]/[HyperHDR][HyperHDR] | ✅ | ❌ |
-| Change screensaver, wallpaper, etc. | ✅ | ❌ |
-| Remapping remote control buttons | ✅ | ❌ |
-
-## Can I root my TV?
-
-> [!IMPORTANT]
-> Root exploits are constantly being patched. This table may not be up-to-date.
-
-| webOS version | RootMy.TV | crashd | WTA | DEBUG via NVM | GetMeNow (GetMeIn) | DejaVuln |
-|---------------|----------------|----------------|----------------|---------------|--------------------|----------|
-| 1.0 - 2.0 | Not compatible | Not compatible | Not compatible | Works | ❌ | ❌ |
-| 3.0 - 3.4 | Not compatible | Not compatible | Not compatible | ^ | ❌ | ❌ |
-
-### Benefits of Rooting
-
-* No developer mode needed anymore - No need to worry about the dev mode timer or an LG account
-* Gain more control over your TV - Block ads and auto-updates
-* Increase privacy - Disable telemetry
-* More modifications - Custom wallpaper, screensaver, ambient lighting, etc.
-* Access webOS internals - Useful for researching and exploring the Linux system underlying webOS
-
-### Caveats of Rooting
-
-* Methods may get patched by LG - If you apply firmware updates, you may lose any homebrew apps and mods you've
- installed
-* Rooting is safe, but reckless changes are not - You could brick your TV if you don't have proper knowledge and ignore
- **[warnings](https://rootmy.tv/warning)**
-
-As of February 2024, LG has released multiple patches for the vulnerabilities we found.
-Depending on the firmware and model, there are multiple approaches to rooting a webOS TV.
-
-- [DejaVuln](https://github.com/throwaway96/dejavuln-autoroot) - For webOS 3.5 and up
-- [RootMy.TV](https://rootmy.tv/) - For webOS 3.4 and up, but very likely patched (read
- the [README](https://github.com/RootMyTV/RootMyTV.github.io?tab=readme-ov-file#readme) first!)
-- [crashd](https://gist.github.com/throwaway96/e811b0f7cc2a705a5a476a8dfa45e09f) - For webOS 4.0 and up; patched
-- [WTA](https://gist.github.com/throwaway96/b171240ef59d7f5fd6fb48fc6dfd2941) - For webOS 5 and up; patches being rolled
- out
-- [DEBUG via NVM](https://gist.github.com/throwaway96/827ff726981cc2cbc46a22a2ad7337a1) - Works on all webOS versions
- prior to 4.0 (plus NetCast/GP) but requires opening up the TV (no permanent hardware modifications)
-- GetMeIn - May work on webOS up to 3.4 on certain models, but don't use the original binary from the XDA thread
-
-[PicCap]: https://github.com/TBSniller/piccap
-
-[Hyperion]:https://github.com/webosbrew/hyperion-webos
-
-[HyperHDR]:https://github.com/webosbrew/hyperhdr-webos-loader
\ No newline at end of file
diff --git a/src/views/can-i-root/app.scss b/src/views/can-i-root/app.scss
new file mode 100644
index 0000000..e0a5a4d
--- /dev/null
+++ b/src/views/can-i-root/app.scss
@@ -0,0 +1,13 @@
+@import "@fontsource/orbitron/900";
+
+h1.rootmytv {
+ font-family: 'Orbitron', sans-serif;
+ font-weight: 900;
+ color: #000;
+ font-size: 4em;
+ text-shadow: 0 0 3px #d4ffff, 0 0 3px #d4ffff, 0 0 3px #d4ffff, 0 0 1em #0bb6be, 0 0 0.2em #0bb6be;
+
+ sup {
+ text-shadow: 0 0px 2px white, 0 0px 2px white, 0 0 0.4em #731178, 0 2px 0.2em pink, 0 -3px 0.2em #aa0000;
+ }
+}
\ No newline at end of file
diff --git a/src/views/can-i-root/app.ts b/src/views/can-i-root/app.ts
new file mode 100644
index 0000000..d8faf87
--- /dev/null
+++ b/src/views/can-i-root/app.ts
@@ -0,0 +1,104 @@
+import {Component, html, render} from 'htm/preact';
+import {DeviceExploitAvailabilities, DeviceModel} from "@webosbrew/caniroot";
+import debounce from 'lodash-es/debounce';
+import {JSXInternal} from "preact/src/jsx";
+import TargetedInputEvent = JSXInternal.TargetedInputEvent;
+import {RenderableProps} from "preact";
+
+interface AppProps {
+ q?: string;
+}
+
+interface AppState {
+ term?: SearchTerm;
+ model?: DeviceModel;
+ availability?: DeviceExploitAvailabilities;
+}
+
+interface SearchTerm {
+ q: string;
+ model?: string;
+ firmware?: string;
+}
+
+function parseSearchTerm(q?: string): SearchTerm | undefined {
+ if (!q) return undefined;
+ const model = q.match(/[A-Z0-9-]{4,12}(?:\.[A-Z0-9]{2,4})?/)?.[0];
+ const firmware = q.match(/\d{2}\.\d{2}\.\d{2}/)?.[0];
+ return {q, model, firmware};
+}
+
+interface ExploitMethod {
+ name: string;
+ key: keyof DeviceExploitAvailabilities;
+ expert?: boolean;
+}
+
+class App extends Component Under construction Under construction
`}
+
+ ${this.exploits.map(exploit => {
+ const avail = state.availability?.[exploit.key];
+ const firmware = state.term?.firmware ?? avail?.patched?.version;
+ const patched = (avail?.patched && firmware && firmware >= avail.patched.version) || false;
+ return avail && html`
+ ${exploit.name}
+ CanI.RootMy.TV α
+
+
+ {{/inline}}
+{{> page title="Can I root my TV?" }}
\ No newline at end of file
diff --git a/src/views/rooting/dejavuln.hbs b/src/views/rooting/dejavuln.hbs
new file mode 100644
index 0000000..3d2296d
--- /dev/null
+++ b/src/views/rooting/dejavuln.hbs
@@ -0,0 +1,4 @@
+{{#*inline "content"}}
+
@@ -105,15 +105,17 @@
9.x~
- Not rootable (yet)
+ ❌ Not rootable (yet)
- Patched in recent updates. + Patched in recent updates. Instructions
Works on some models running webOS 1.x and 2.x. + Instructions
Works on webOS 3.5 and up. Patches are being rolled out, starting from recent models. + Download and instructions.
Under construction
+{{/inline}} +{{> page title="WTA" }} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..7e62bc7 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + "sourceMap": true, + "target": "ES5", + "module": "ES2015", + "moduleResolution": "Node", + "strict": true + } +} \ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js index f7a463d..aa73c40 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -53,6 +53,10 @@ module.exports = { ], module: { rules: [ + { + test: /\.ts$/, + use: 'ts-loader', + }, { test: /\.(css|sass|scss)$/, use: ['css-loader', 'sass-loader'],