v0.9.6
- update: app.js: add really long timeout for closing missed sockets - update: app.js: fix for minibrowser connectivity - update: app.js: enhance security - update: wtv-home:/home: fix wtv-needs-upgrade -> wtv-need-upgrade - update: wtv-head-waiter:/login-stage-two: do not send wtv-settings:/get to minibrowser - update: wtv-1800:/preregister: Disconnect and clean up all previous sockets for the connecting SSID when hitting preregister. Also re-create wtvsec_login. - update: add initial wtv-capability-flags decoding, as well as wtv-tricks:/info demonstration - update: rename classes - minor update: quirky 'Special Thanks' in each custom class. - minor update: notice about Initial Shared Key and multiple minisrvs - update: wtv-music:/demo/index: update wtv-star image paths - update: app.js: fix unencrypted post - update: app.js: improve buffering and cleanup in attempt to fix occasional 'double-up' bug - update: info.js: remove debug dump of capabilities - Update: add test.js, syntax-testing script for `npm test` - Update: wtv-chat:/home experimental nick change page thanks to MattMan (chat still giving issues on real boxes, works in Viewer) - Update: README.md: Add ways to support the project
This commit is contained in:
@@ -6,6 +6,27 @@ if (request_headers["wtv-ticket"]) {
|
||||
gourl = "wtv-head-waiter:/login-stage-two?";
|
||||
}
|
||||
|
||||
if (socket.ssid) {
|
||||
if (ssid_sessions[socket.ssid].data_store) {
|
||||
if (ssid_sessions[socket.ssid].data_store.sockets) {
|
||||
var i = 0;
|
||||
ssid_sessions[socket.ssid].data_store.sockets.forEach(function (k) {
|
||||
if (typeof k != "undefined") {
|
||||
if (k != socket) {
|
||||
k.destroy();
|
||||
ssid_sessions[socket.ssid].data_store.sockets.delete(k);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
});
|
||||
if (i > 0 && zdebug) console.log(" # Closed", i, "previous sockets for", socket.ssid);
|
||||
}
|
||||
}
|
||||
if (ssid_sessions[socket.ssid].data_store.wtvsec_login) {
|
||||
delete ssid_sessions[socket.ssid].data_store.wtvsec_login;
|
||||
}
|
||||
}
|
||||
|
||||
headers = `200 OK
|
||||
Connection: Keep-Alive
|
||||
wtv-expire-all: wtv-
|
||||
|
||||
123
zefie_wtvp_minisrv/ServiceVault/wtv-chat/home.html
Normal file
123
zefie_wtvp_minisrv/ServiceVault/wtv-chat/home.html
Normal file
@@ -0,0 +1,123 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
Chat Home
|
||||
</title>
|
||||
</head>
|
||||
<body bgcolor="#101C1E" text="#A2ACB5" link="#CFC382" vlink="#E1EOE3" fontsize="medium" vspace=0 hspace=0>
|
||||
|
||||
<sidebar width=109>
|
||||
<table cellspacing=0 cellpadding=0>
|
||||
<tr>
|
||||
<td width=104 height=420 bgcolor=#777896 valign=top>
|
||||
<table cellspacing=0 cellpadding=0>
|
||||
<tr>
|
||||
<td height=7 colspan=3>
|
||||
<spacer type=vertical size=7>
|
||||
<tr>
|
||||
<td width=7>
|
||||
<spacer type=horizontal size=7>
|
||||
<td width=87 href="wtv-home:/home">
|
||||
<img src="images/htv_chat.gif" width=87 height=67>
|
||||
<td width=10>
|
||||
<spacer type=horizontal size=10>
|
||||
</table>
|
||||
<spacer type=vertical size=6>
|
||||
<table cellspacing=0 cellpadding=0 border=0>
|
||||
|
||||
<tr> <td bgcolor=#2E3A54 height=2 width=104 colspan=3>
|
||||
<tr>
|
||||
<td width=10 height=26>
|
||||
<td width=89 valign=middle>
|
||||
|
||||
|
||||
|
||||
|
||||
<td width=5>
|
||||
|
||||
</table>
|
||||
<td width=5 bgcolor=#2E3A54>
|
||||
</table>
|
||||
</sidebar>
|
||||
|
||||
|
||||
<table cellspacing=0 cellpadding=0 border=0>
|
||||
<tr>
|
||||
<td width=451 colspan=2 align=center bgcolor=#2E3A54>
|
||||
<spacer type=vertical size=13>
|
||||
<tr>
|
||||
<td><img src="wtv-chat:/images/top_corner_dark.jpg" width=8 height=8>
|
||||
<td width=60>
|
||||
<tr>
|
||||
<td bgcolor=#101C1E width=13>
|
||||
<spacer type=horizontal size=13>
|
||||
<td bgcolor=#101C1E width=438 valign=top>
|
||||
<table cellspacing=0 cellpadding=0>
|
||||
<tr>
|
||||
<td width=105 height=9><spacer type=vertical size=9>
|
||||
<td>
|
||||
</table>
|
||||
<tr>
|
||||
<td colspan=2>
|
||||
<table cellspacing=0 cellpadding=0 border=0>
|
||||
<tr>
|
||||
<td width=375 height=25 bgcolor=#101C1E gradcolor=#3C4652 gradangle=90>
|
||||
<table cellspacing=0 cellpadding=0 border=0>
|
||||
<tr>
|
||||
<td width=366 valign=middle>
|
||||
<blackface><font color=#D6D6D6>
|
||||
</font></blackface><td>
|
||||
<table cellspacing=0 cellpadding=0 border=0 bgcolor=#3C4652 gradcolor=#2E3A54 gradangle=90>
|
||||
<tr>
|
||||
<td height=16>
|
||||
<td width=3>
|
||||
<td width=100>
|
||||
<spacer type=vertical size=2><br>
|
||||
<font size=2 color=#E7CE4A><b>Chat Home</b></font>
|
||||
<td width=21>
|
||||
|
||||
<td width=34>
|
||||
</table>
|
||||
</table>
|
||||
</table>
|
||||
<spacer type=vertical size=12> <table cellspacing=0 cellpadding=0>
|
||||
<tr>
|
||||
<td colspan=3 height=12>
|
||||
<spacer type=vertical size=12> <tr>
|
||||
<td abswidth=14>
|
||||
<td>
|
||||
yo yo yo yo
|
||||
|
||||
enter your nick...
|
||||
|
||||
<td abswidth=20>
|
||||
<tr>
|
||||
<td height=10>
|
||||
|
||||
<td>
|
||||
<td colspan=2 height=2>
|
||||
<spacer>
|
||||
<tr>
|
||||
<td height=1>
|
||||
<tr>
|
||||
<td>
|
||||
<td colspan=2 height=2>
|
||||
<spacer>
|
||||
<tr>
|
||||
<td height=230><!--yo yo yo Change this if needed-->
|
||||
</table>
|
||||
<table cellspacing=0 cellpadding=0 width=100%>
|
||||
<tr>
|
||||
<form action="wtv-chat:/MakeChatPage?host=chat.irchat.tv&port=6667&channel=WebTV" ONSUBMIT="this.chatinput.focus()">
|
||||
<td abswidth=14>
|
||||
<td>
|
||||
<input id="chatinput" name="nick" type="text" value="" size=32 bgcolor=262626 text=ffc342 cursor=cc9933 font=proportional selected autoactivate nohighlight>
|
||||
<td align=right>
|
||||
<font color=e7ce4a><shadow>
|
||||
<input type=submit borderimage="file://ROM/Borders/ButtonBorder2.bif" value="Join" usestyle width=80>
|
||||
<td abswidth=9>
|
||||
</form>
|
||||
<tr> <TD HEIGHT=8>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
BIN
zefie_wtvp_minisrv/ServiceVault/wtv-chat/images/htv_chat.gif
Normal file
BIN
zefie_wtvp_minisrv/ServiceVault/wtv-chat/images/htv_chat.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
BIN
zefie_wtvp_minisrv/ServiceVault/wtv-chat/images/htv_chat.jpg
Normal file
BIN
zefie_wtvp_minisrv/ServiceVault/wtv-chat/images/htv_chat.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
@@ -96,7 +96,10 @@ wtv-demo-mode: 0
|
||||
wtv-wink-deferrer-retries: 3
|
||||
wtv-offline-mail-enable: false
|
||||
wtv-name-server: 8.8.8.8
|
||||
wtv-settings-url: wtv-setup:/get
|
||||
wtv-visit: wtv-home:/splash?
|
||||
`;
|
||||
if (ssid_sessions[socket.ssid].get('wtv-need-upgrade') != 'true') {
|
||||
headers += "wtv-settings-url: wtv-setup:/get\n";
|
||||
}
|
||||
headers += `wtv-visit: wtv-home:/splash?
|
||||
Content-Type: text/html`;
|
||||
}
|
||||
@@ -28,14 +28,13 @@ function go() {
|
||||
<p>
|
||||
<form name=access onsubmit="go()">
|
||||
<ul>
|
||||
<li><a href="client:relog">client:relog (direct)</a></li>
|
||||
<li><a href="wtv-tricks:/blastcache?return_to=wtv-home:/home">Clear Cache</a></li>
|
||||
<li><a href="wtv-flashrom:/willie" selected>Ultra Willies</a></li>
|
||||
<li><a href="client:relog">client:relog (direct)</a> ~ <a href="wtv-tricks:/blastcache?return_to=wtv-home:/home">Clear Cache</a></li>
|
||||
<li><a href="client:diskhax">DiskHax</a> ~ <a href="client:vfathax">VFatHax</a></li>
|
||||
<li><a href="wtv-flashrom:/willie" selected>Ultra Willies</a> ~ <a href="wtv-tricks:/info">Tricks Info</a></li>
|
||||
<li><a href="wtv-music:/demo/index">MIDI Music Demo</a></li>
|
||||
<li><a href="client:diskhax">DiskHax</a> - <a href="client:vfathax">VFatHax</a></li>
|
||||
<li>Old MSNTV DealerDemo: <a href="wtv-update:/DealerDemo">Download</a> ~ <a href="file://Disk/Demo/index.html">Access (after Download)</a></li>
|
||||
<li><a href="http://duckduckgo.com/lite/">DuckDuckGo Lite</a></li>`
|
||||
if (ssid_sessions[socket.ssid].get('wtv-needs-upgrade') != 'true') {
|
||||
if (ssid_sessions[socket.ssid].get('wtv-need-upgrade') != 'true') {
|
||||
data += `<li><input name=url `;
|
||||
|
||||
if (request_headers.query.url) {
|
||||
|
||||
@@ -22,7 +22,7 @@ WebTV Music Index
|
||||
<tr>
|
||||
<td width=10 height=26>
|
||||
<td width=105 valign=middle>
|
||||
<table cellspacing=0 cellpadding=0 href="client:showalert?message=%3Cfont%20size%3D%22small%22%3EPlease%20download%20HackTV%20from%3Cbr%3E%3Cbr%3E%3Ccenter%3Ehttp%3A%2F%2Fturdinc.kicks-ass.net%2FMsntv%2F%3C%2Fcenter%3E%3Cbr%3E%3Cbr%3Efor%20the%20complete%20WebTV%20Music%20Experience%21%3C%2Ffont%3E&image=wtv-star:/images/HackTVLogoJewel.gif&buttonlabel1=Okay&buttonaction1=client:donothing">
|
||||
<table cellspacing=0 cellpadding=0 href="client:showalert?message=%3Cfont%20size%3D%22small%22%3EPlease%20download%20HackTV%20from%3Cbr%3E%3Cbr%3E%3Ccenter%3Ehttp%3A%2F%2Fturdinc.kicks-ass.net%2FMsntv%2F%3C%2Fcenter%3E%3Cbr%3E%3Cbr%3Efor%20the%20complete%20WebTV%20Music%20Experience%21%3C%2Ffont%3E&image=wtv-star:/ROMCache/HackTVLogoJewel.gif&buttonlabel1=Okay&buttonaction1=client:donothing">
|
||||
<tr>
|
||||
<td height=1>
|
||||
<tr>
|
||||
@@ -35,7 +35,7 @@ WebTV Music Index
|
||||
<tr>
|
||||
<td width=10 height=26>
|
||||
<td width=105 valign=middle>
|
||||
<table cellspacing=0 cellpadding=0 href="client:showalert?message=%3Cfont%20size%3D%22small%22%3EPlease%20download%20HackTV%20from%3Cbr%3E%3Cbr%3E%3Ccenter%3Ehttp%3A%2F%2Fturdinc.kicks-ass.net%2FMsntv%2F%3C%2Fcenter%3E%3Cbr%3E%3Cbr%3Efor%20the%20complete%20WebTV%20Music%20Experience%21%3C%2Ffont%3E&image=wtv-star:/images/HackTVLogoJewel.gif&buttonlabel1=Okay&buttonaction1=client:donothing">
|
||||
<table cellspacing=0 cellpadding=0 href="client:showalert?message=%3Cfont%20size%3D%22small%22%3EPlease%20download%20HackTV%20from%3Cbr%3E%3Cbr%3E%3Ccenter%3Ehttp%3A%2F%2Fturdinc.kicks-ass.net%2FMsntv%2F%3C%2Fcenter%3E%3Cbr%3E%3Cbr%3Efor%20the%20complete%20WebTV%20Music%20Experience%21%3C%2Ffont%3E&image=wtv-star:/ROMCache/HackTVLogoJewel.gif&buttonlabel1=Okay&buttonaction1=client:donothing">
|
||||
<tr>
|
||||
<td height=1>
|
||||
<tr>
|
||||
@@ -48,7 +48,7 @@ WebTV Music Index
|
||||
<tr>
|
||||
<td width=10 height=26>
|
||||
<td width=105 valign=middle>
|
||||
<table cellspacing=0 cellpadding=0 href="client:showalert?message=%3Cfont%20size%3D%22small%22%3EPlease%20download%20HackTV%20from%3Cbr%3E%3Cbr%3E%3Ccenter%3Ehttp%3A%2F%2Fturdinc.kicks-ass.net%2FMsntv%2F%3C%2Fcenter%3E%3Cbr%3E%3Cbr%3Efor%20the%20complete%20WebTV%20Music%20Experience%21%3C%2Ffont%3E&image=wtv-star:/images/HackTVLogoJewel.gif&buttonlabel1=Okay&buttonaction1=client:donothing">
|
||||
<table cellspacing=0 cellpadding=0 href="client:showalert?message=%3Cfont%20size%3D%22small%22%3EPlease%20download%20HackTV%20from%3Cbr%3E%3Cbr%3E%3Ccenter%3Ehttp%3A%2F%2Fturdinc.kicks-ass.net%2FMsntv%2F%3C%2Fcenter%3E%3Cbr%3E%3Cbr%3Efor%20the%20complete%20WebTV%20Music%20Experience%21%3C%2Ffont%3E&image=wtv-star:/ROMCache/HackTVLogoJewel.gif&buttonlabel1=Okay&buttonaction1=client:donothing">
|
||||
<tr>
|
||||
<td height=1>
|
||||
<tr>
|
||||
@@ -74,7 +74,7 @@ WebTV Music Index
|
||||
<tr>
|
||||
<td width=10 height=26>
|
||||
<td width=105 valign=middle>
|
||||
<table cellspacing=0 cellpadding=0 href="client:showalert?message=%3Cfont%20size%3D%22small%22%3EPlease%20download%20HackTV%20from%3Cbr%3E%3Cbr%3E%3Ccenter%3Ehttp%3A%2F%2Fturdinc.kicks-ass.net%2FMsntv%2F%3C%2Fcenter%3E%3Cbr%3E%3Cbr%3Efor%20the%20complete%20WebTV%20Music%20Experience%21%3C%2Ffont%3E&image=wtv-star:/images/HackTVLogoJewel.gif&buttonlabel1=Okay&buttonaction1=client:donothing">
|
||||
<table cellspacing=0 cellpadding=0 href="client:showalert?message=%3Cfont%20size%3D%22small%22%3EPlease%20download%20HackTV%20from%3Cbr%3E%3Cbr%3E%3Ccenter%3Ehttp%3A%2F%2Fturdinc.kicks-ass.net%2FMsntv%2F%3C%2Fcenter%3E%3Cbr%3E%3Cbr%3Efor%20the%20complete%20WebTV%20Music%20Experience%21%3C%2Ffont%3E&image=wtv-star:/ROMCache/HackTVLogoJewel.gif&buttonlabel1=Okay&buttonaction1=client:donothing">
|
||||
<tr>
|
||||
<td height=1>
|
||||
<tr>
|
||||
@@ -87,7 +87,7 @@ WebTV Music Index
|
||||
<tr>
|
||||
<td width=10 height=26>
|
||||
<td width=105 valign=middle>
|
||||
<table cellspacing=0 cellpadding=0 href="client:showalert?message=%3Cfont%20size%3D%22small%22%3EPlease%20download%20HackTV%20from%3Cbr%3E%3Cbr%3E%3Ccenter%3Ehttp%3A%2F%2Fturdinc.kicks-ass.net%2FMsntv%2F%3C%2Fcenter%3E%3Cbr%3E%3Cbr%3Efor%20the%20complete%20WebTV%20Music%20Experience%21%3C%2Ffont%3E&image=wtv-star:/images/HackTVLogoJewel.gif&buttonlabel1=Okay&buttonaction1=client:donothing">
|
||||
<table cellspacing=0 cellpadding=0 href="client:showalert?message=%3Cfont%20size%3D%22small%22%3EPlease%20download%20HackTV%20from%3Cbr%3E%3Cbr%3E%3Ccenter%3Ehttp%3A%2F%2Fturdinc.kicks-ass.net%2FMsntv%2F%3C%2Fcenter%3E%3Cbr%3E%3Cbr%3Efor%20the%20complete%20WebTV%20Music%20Experience%21%3C%2Ffont%3E&image=wtv-star:/ROMCache/HackTVLogoJewel.gif&buttonlabel1=Okay&buttonaction1=client:donothing">
|
||||
<tr>
|
||||
<td height=1>
|
||||
<tr>
|
||||
|
||||
BIN
zefie_wtvp_minisrv/ServiceVault/wtv-tricks/images/About_bg.jpg
Normal file
BIN
zefie_wtvp_minisrv/ServiceVault/wtv-tricks/images/About_bg.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
@@ -0,0 +1,148 @@
|
||||
|
||||
var client_caps = null;
|
||||
|
||||
if (socket.ssid != null) {
|
||||
if (ssid_sessions[socket.ssid].data_store.capabilities) {
|
||||
client_caps = ssid_sessions[socket.ssid].data_store.capabilities;
|
||||
}
|
||||
}
|
||||
if (client_caps) {
|
||||
headers = `200 OK
|
||||
Content-Type: text/html`
|
||||
|
||||
|
||||
var client_label = "TODO";
|
||||
var boot_client_label = "TODO";
|
||||
var wtv_system_sysconfig_str = "TODO";
|
||||
|
||||
|
||||
var wtv_system_version = ssid_sessions[socket.ssid].get("wtv-system-version");
|
||||
var wtv_client_bootrom_version = ssid_sessions[socket.ssid].get("wtv-client-bootrom-version");
|
||||
var wtv_client_serial_number = filterSSID(ssid_sessions[socket.ssid].get("wtv-client-serial-number"));
|
||||
var wtv_client_rom_type = ssid_sessions[socket.ssid].get("wtv-client-rom-type");
|
||||
var wtv_system_chipversion_str = ssid_sessions[socket.ssid].get("wtv-system-chipversion");
|
||||
var wtv_system_sysconfig_hex = parseInt(ssid_sessions[socket.ssid].get("wtv-system-sysconfig")).toString(16);
|
||||
|
||||
var capabilities_table = new WTVClientCapabilities().capabilities_table;
|
||||
|
||||
|
||||
|
||||
data = `<html>
|
||||
<!--- *=* Copyright 1996, 1997 WebTV Networks, Inc. All rights reserved. --->
|
||||
<display nosave nosend skipback>
|
||||
<title>${minisrv_config.config.service_name} Info</title>
|
||||
|
||||
<sidebar width=20%>
|
||||
<img src="wtv-tricks:/images/About_bg.jpg">
|
||||
</sidebar>
|
||||
|
||||
<body bgcolor="#191919" text="#44cc55" link="36d5ff" vlink="36d5ff" vspace=0>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<h1>${minisrv_config.config.service_name} Info</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td height=20>
|
||||
<tr>
|
||||
<td valign=top align=right><shadow>Connected to:</shadow>
|
||||
<td width=10>
|
||||
<td valign=top>Mini Service
|
||||
<tr>
|
||||
<td valign=top align=right width=150><shadow>Service:</shadow>
|
||||
<td width=10>
|
||||
<td valign=top>${z_title}
|
||||
<tr>
|
||||
<td valign=top align=right><shadow>Client:</shadow>
|
||||
<td width=10>
|
||||
<td valign=top>&vers; (Build ${wtv_system_version} [${client_label}])
|
||||
<tr>
|
||||
<td valign=top align=right><shadow>Boot:</shadow>
|
||||
<td width=10>
|
||||
<td valign=top>&wtv-bootvers; (Build ${wtv_client_bootrom_version} [${boot_client_label}])
|
||||
<tr>
|
||||
<td height=20)
|
||||
<tr>
|
||||
<td valign=top align=right><shadow>Silicon serial ID:</shadow>
|
||||
<td width=10>
|
||||
<td valign=top>${wtv_client_serial_number}
|
||||
<tr>
|
||||
<td valign=top align=right><shadow>Connected at:</shadow>
|
||||
<td width=10>
|
||||
<td valign=top>&rate;
|
||||
<tr>
|
||||
<td valign=top align=right><shadow>Client IP number:</shadow>
|
||||
<td width=10>
|
||||
<td valign=top>${socket.remoteAddress}
|
||||
<tr>
|
||||
<td height=20>
|
||||
<tr>
|
||||
<td valign=top align=right><shadow>ROM type:</shadow>
|
||||
<td width=10>
|
||||
<td valign=top>${wtv_client_rom_type}
|
||||
<tr>
|
||||
<td valign=top align=right><shadow>Modem f/w (when available):</shadow>
|
||||
<td width=10>
|
||||
<td valign=top>&modem;
|
||||
`;
|
||||
if (ssid_sessions[socket.ssid].get("wtv-need-upgrade")) {
|
||||
data += `<tr>
|
||||
<td valign=top align=right><shadow>Mini-browser:</shadow>
|
||||
<td width=10>
|
||||
<td valign=top>Yes
|
||||
`;
|
||||
}
|
||||
data += `
|
||||
<tr>
|
||||
<td valign=top align=right><shadow>Chip version:</shadow>
|
||||
<td width=10>
|
||||
<td valign=top>${wtv_system_chipversion_str} (TODO)
|
||||
<tr>
|
||||
<td valign=top align=right><shadow>SysConfig:</shadow>
|
||||
<td width=10>
|
||||
<td valign=top>0x${wtv_system_sysconfig_hex.toUpperCase()}
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td height=20>
|
||||
<tr>
|
||||
<td valign=top align=right width=175><shadow>Client capabilities:</shadow>
|
||||
<td width=10>
|
||||
<td valign=top>
|
||||
</table>
|
||||
<table>
|
||||
`;
|
||||
|
||||
|
||||
// start loop
|
||||
|
||||
Object.keys(capabilities_table).forEach(function (k) {
|
||||
data += `<tr>
|
||||
<td valign=top align=right>${capabilities_table[k][1]}
|
||||
<td width=10>
|
||||
`;
|
||||
if (client_caps[capabilities_table[k][0]]) data += "<td valign=top>True\n";
|
||||
else data += "<td valign=top>False\n";
|
||||
});
|
||||
|
||||
// end loop
|
||||
|
||||
data += `
|
||||
</table>
|
||||
|
||||
<pre>
|
||||
|
||||
|
||||
${wtv_system_sysconfig_str}
|
||||
</pre>
|
||||
<br>
|
||||
|
||||
</body> </html>`;
|
||||
} else {
|
||||
var errpage = doErrorPage(400);
|
||||
headers = errpage[0];
|
||||
data = errpage[1];
|
||||
}
|
||||
Reference in New Issue
Block a user