minor changes, included mini tutorial, version inc
This commit is contained in:
32
README.md
32
README.md
@@ -1,5 +1,33 @@
|
||||
# wtv minisrv node.js
|
||||
|
||||
The ***wtv minisrv***, or "***hacktv_updsrv***" project is an ambitious node.js project to have a mini WebTV server that supports wtv-encryption for advanced level access.
|
||||
The ***wtv minisrv***, or "***hacktv_updsrv***" project is a node.js project that provides a mini WebTV Server, with wtv-encryption support for advanced level box access.
|
||||
|
||||
This open source server is not yet ready for public use, but is available for anyone wanting to try to help advance it.
|
||||
This open source server is in alpha status. Use at your own risk.
|
||||
|
||||
### Current status:
|
||||
- Can encrypt and decrypt SECURE ON and arbitrary encrypted data
|
||||
- Can handle psuedo encryption (box sends SECURE ON but does not encrypt)
|
||||
- Can handle client "relogin" and "reconnect" events
|
||||
|
||||
### Current issues:
|
||||
- Probably can't handle more than one box at a time
|
||||
- Power cycling box and re-connecting via ConnectSetup may invalidate encryption until server is restarted
|
||||
- wtv-update:/update does not yet function as intended
|
||||
|
||||
### Feature Todo:
|
||||
- Test and enable flashrom flashing functionality (at least for LC2 and higher)
|
||||
- (maybe) Proper wtv-star (generic service outage page) support (maybe useful for allowing a unit to multiple sub-minisrvs).
|
||||
- (maybe) implement HTTP proxy (needs to be able to defluff most of the web, think retro WAP converter)
|
||||
- (maybe) enable "internet mode" (let user outside of minisrv)
|
||||
- (maybe) wtvchat stuff
|
||||
- (probably not) url tokenizer
|
||||
|
||||
### How To Use:
|
||||
- Install [node.js](https://nodejs.org/en/download/)
|
||||
- Download a snapshot (either of master, or of any commit/branch/relase/tag etc)
|
||||
- Extract zip somewhere and enter that directory with a command prompt
|
||||
- Run `npm install`
|
||||
- Check any configuration (services.json)
|
||||
- Run `node app.js`
|
||||
- Test with a WebTV Viewer or connect with a real box
|
||||
- To connect with a real box, you will need to open ports in your firewall and have a way to connect your WebTV (and preferably reroute 10.0.0.1 to the server)
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
# wtv minisrv node.js
|
||||
|
||||
The ***wtv minisrv***, or "***hacktv_updsrv***" project is an ambitious node.js project to have a mini WebTV server that supports wtv-encryption for advanced level access.
|
||||
|
||||
This open source server is not yet ready for public use, but is available for anyone wanting to try to help advance it.
|
||||
|
||||
Current status:
|
||||
- Can encrypt and decrypt SECURE ON and arbitrary encrypted data
|
||||
- Can handle psuedo encryption (box sends SECURE ON but does not encrypt)
|
||||
- Can handle client "relogin" and "reconnect" events
|
||||
|
||||
Current issues:
|
||||
- Probably can't handle more than one box at a time
|
||||
- Power cycling box and re-connecting via ConnectSetup may invalidate encryption until server is restarted
|
||||
- wtv-update:/update does not yet function as intended
|
||||
|
||||
Feature Todo:
|
||||
- Test and enable flashrom flashing functionality (at least for LC2 and higher)
|
||||
- Proper wtv-star (generic service error page) support.
|
||||
- (maybe) implement HTTP proxy (needs to be able to defluff most of the web, think retro WAP converter)
|
||||
- (maybe) enable "internet mode" (let user outside of minisrv)
|
||||
- (maybe) wtvchat stuff
|
||||
- (probably not) url tokenizer
|
||||
@@ -1,2 +0,0 @@
|
||||
var wtvtest = new WTVSec();
|
||||
wtvtest.Test();
|
||||
@@ -7,8 +7,11 @@ Content-type: text/html
|
||||
<head>
|
||||
<meta
|
||||
http-equiv=refresh
|
||||
content="0; url=client:showalert?message=Successfully%20expired%20service%20URL%20cache&buttonlabel1=Okay&buttonaction1=wtv-home%3A%2Fhome%3F"
|
||||
content="1; url=wtv-home:/home?"
|
||||
>
|
||||
<body bgcolor="black">
|
||||
<body bgcolor="black" text="gold" link="gold" vlink="gold" alink="gold">
|
||||
Successfully expired service URL cache<br>
|
||||
Any previously cached pages should be reloaded from the network.<br><br>
|
||||
<a href="wtv-home:/home">Go Home</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -12,13 +12,10 @@ var WTVSec = require('./wtvsec.js');
|
||||
|
||||
var zdebug = false;
|
||||
|
||||
var pubip = "192.168.11.8";
|
||||
var ports = [];
|
||||
|
||||
var service_vault_dir = __dirname + "/ServiceVault";
|
||||
|
||||
//pubip = getPublicIP();
|
||||
|
||||
function getServiceString(service) {
|
||||
if (service === "all") {
|
||||
var out = "";
|
||||
@@ -59,22 +56,6 @@ function setSessionData(ssid, key, value) {
|
||||
}
|
||||
|
||||
|
||||
function getPublicIP() {
|
||||
var options = {
|
||||
host: 'www.planeptune.org',
|
||||
path: '/ip.php'
|
||||
}
|
||||
var request = https.get(options, function (res) {
|
||||
var data = '';
|
||||
res.on('data', function (chunk) {
|
||||
data += chunk;
|
||||
});
|
||||
res.on('end', function () {
|
||||
return data;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function getFile(path, deps = false) {
|
||||
var dir = null;
|
||||
if (deps) dir = __dirname + "/ServiceDeps/";
|
||||
@@ -660,11 +641,16 @@ async function handleSocket(socket) {
|
||||
var z_title = "zefie's wtv minisrv v" + require('./package.json').version;
|
||||
console.log("**** Welcome to " + z_title + " ****");
|
||||
console.log(" *** Reading service configuration...");
|
||||
var services_configured = JSON.parse(fs.readFileSync(__dirname + "/services.json"));
|
||||
try {
|
||||
var services_configured = JSON.parse(fs.readFileSync(__dirname + "/services.json"));
|
||||
} catch (e) {
|
||||
throw("ERROR: Could not read services.json", e);
|
||||
}
|
||||
var service_ip = services_configured.config.service_ip;
|
||||
Object.keys(services_configured.services).forEach(function (k) {
|
||||
services_configured.services[k].name = k;
|
||||
if (!services_configured.services[k].host) {
|
||||
services_configured.services[k].host = pubip;
|
||||
services_configured.services[k].host = service_ip;
|
||||
}
|
||||
if (services_configured.services[k].port) {
|
||||
ports.push(services_configured.services[k].port);
|
||||
@@ -700,5 +686,5 @@ bind_ports.forEach(function (v) {
|
||||
});
|
||||
initstring = initstring.substring(0, initstring.length - 2);
|
||||
|
||||
console.log(" * Started server on ports " + initstring + "... Public IP is " + pubip);
|
||||
console.log(" * Started server on ports " + initstring + "... Service IP is " + service_ip);
|
||||
|
||||
|
||||
@@ -42,8 +42,7 @@
|
||||
<Content Include="ServiceVault\wtv-star\images\WebTVLogoJewel.gif" />
|
||||
<Content Include="ServiceVault\wtv-tricks\blastcache.txt" />
|
||||
<Content Include="ServiceVault\wtv-tricks\go-offline.js" />
|
||||
<Content Include="ServiceVault\wtv-update\content\diskmaps\htvupdate-g1.txt" />
|
||||
<Content Include="ServiceVault\wtv-update\content\diskmaps\htvupdate-m1.txt" />
|
||||
<Content Include="ServiceVault\wtv-update\content\diskmaps\htvupdate.txt" />
|
||||
<Content Include="ServiceVault\wtv-update\content\htvupdate\Games\cSetup.html" />
|
||||
<Content Include="ServiceVault\wtv-update\content\htvupdate\Games\Games.html" />
|
||||
<Content Include="ServiceVault\wtv-update\content\htvupdate\MattMan\Tricks\tricks.html" />
|
||||
@@ -58,14 +57,12 @@
|
||||
<Content Include="ServiceVault\wtv-head-waiter\finalize-security.js" />
|
||||
<Content Include="ServiceVault\wtv-head-waiter\login-stage-two.js" />
|
||||
<Content Include="ServiceVault\wtv-head-waiter\login.js" />
|
||||
<Content Include="ServiceVault\wtv-head-waiter\test.js" />
|
||||
<Content Include="ServiceVault\wtv-home\splash.txt" />
|
||||
<Content Include="ServiceVault\wtv-log\log.js" />
|
||||
<Content Include="wtvsec.js">
|
||||
<SubType>Code</SubType>
|
||||
</Content>
|
||||
<Content Include="package.json" />
|
||||
<Content Include="README.md" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="ServiceVault\" />
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hacktv_updsrv",
|
||||
"version": "0.5.2",
|
||||
"version": "0.6.0",
|
||||
"description": "hacktv_updsrv",
|
||||
"main": "app.js",
|
||||
"author": {
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
{
|
||||
"config": {
|
||||
"service_ip": "192.168.11.8"
|
||||
},
|
||||
"services": {
|
||||
|
||||
"wtv-1800": {
|
||||
|
||||
@@ -4,7 +4,7 @@ var crypto = require('crypto');
|
||||
|
||||
class WTVSec {
|
||||
//initial_shared_key = CryptoJS.lib.WordArray.random(8);
|
||||
initial_shared_key_b64 = "CC5rWmRUE0o=";
|
||||
initial_shared_key_b64 = "CC5rWmRUE0o="; // You can change this but it doesn't mean much for security. Just make sure its static. 8 bytes base64 encoded.
|
||||
initial_shared_key = null;
|
||||
current_shared_key = null;
|
||||
challenge_key = null;
|
||||
|
||||
Reference in New Issue
Block a user