- BREAKING CHANGE from v0.9.35 and eariler: Move accounts into subfolder of SessionStore
 - viewergen and viewer updates from @GraspYonOx
 - new homepage theme inspired by @GraspYonOx
 - connect setup also mostly by @GraspYonOx
 - numerous bug fixes
 - nntp-server-zefie is now on npmjs
 - implement proper nodejs debugging
   - will start to phase out using console.log for actual debugging
   - existing "debug" (verbose) messages will stay as is
   - future code debugging will use debug() to debug WIP, therefore not showing to most users if it is accidently left in
This commit is contained in:
zefie
2022-10-16 18:58:30 -04:00
parent b89e0e932c
commit c2a3081afd
91 changed files with 1653 additions and 1694 deletions

1
.gitignore vendored
View File

@@ -365,6 +365,7 @@ FodyWeavers.xsd
/zefie_wtvp_minisrv/user_config.json
/zefie_wtvp_minisrv/ServiceVault/wtv-home/home.zefie.html
/zefie_wtvp_minisrv/UserServiceVault/*-*/
/zefie_wtvp_minisrv/UserTemplates/*-*/
/zefie_wtvp_minisrv/ServiceLogPost/*.log
/zefie_wtvp_minisrv/SessionStore/*.json
/zefie_wtvp_minisrv/SessionStore/*/

View File

@@ -18,12 +18,20 @@ This open source server is in beta status. Use at your own risk.
- Custom Tellyscripts *(not yet customizable though)*
- Flat file client session store and registration system
- wtv-lzpf compression support by eMac (99.9%)
- wtv-favorites support
- wtv-news support (WIP)
- wtv-mail (within same server only)
- "PC Services" (node express with minisrv custom script processing)
- "ViewerGen" Generate "WebTV Viewer" (Windows WebTV Sim) with unique SSIDs
### Current issues:
- Mis-configuring wtv-disk:/sync DiskMaps may cause units to delete contents of partitions (need more info)
### Feature Todo:
- TellyScript generation and/or manipulation without external dependancies
- Finish wtv-news, complete with upstream integration support (cross-minisrv usenet)
- Finish wtv-guide
- Add wtv-author (Pagebuilder)
- ~~wtv-setup and bgm support~~ ***Done [v0.9.23](https://github.com/zefie/zefie_wtvp_minisrv/releases/tag/v0.9.23)***
- ~~wtv-cookie full support~~ ***Done [v0.9.13](https://github.com/zefie/zefie_wtvp_minisrv/releases/tag/v0.9.13)***
- ~~Flashrom flashing for bf0app old classic~~ ***Done [v0.9.9](https://github.com/zefie/zefie_wtvp_minisrv/releases/tag/v0.9.9)***
@@ -32,14 +40,15 @@ This open source server is in beta status. Use at your own risk.
- ~~Implement HTTP proxy (needs to be able to defluff most of the web, think retro WAP converter)~~ ***Done [v0.7.1](https://github.com/zefie/zefie_wtvp_minisrv/releases/tag/v0.7.1)***
### How To Use:
- Install [node.js](https://nodejs.org/en/download/). Be sure to say `Yes` when asked about `Chocolatey`.
- Install [node.js](https://nodejs.org/en/download/). If on Windows, be sure to say `Yes` when asked about `Chocolatey`.
- Install git (if on Windows, install from [Git for Windows](https://gitforwindows.org/)
- 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
- Enter `zefie_wtvp_minisrv` subdirectory
- Verify you are in the same directory as `app.js`, then run `npm install`
- Check any configuration. Create your override `user_config.json`. Especally `service_ip`. See [user_config_README.md](user_config_README.md) and [user_config.example.json](zefie_wtvp_minisrv/user_config.example.json) for more information.
- **Note:** The intended use is for all custom config to be in `user_config.json` and any custom service files to go in `UserServiceVault`. If you do not care about potential issues with future `git pull`, and will manually add new upstream `config.json` entries, you could use the standard `ServiceVault` and `config.json`
- Run `npm start` (note: if you are using node version 17 or newer, and are getting errors, try `npm start17`)
- Run `npm start` (**note**: if you are using node version 17 or newer, and are getting errors, try `npm start17`)
- If you have trouble running it on Windows, try a Linux machine, Windows may need a full development enviroment or extra steps.
- 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)
@@ -49,4 +58,11 @@ This open source server is in beta status. Use at your own risk.
- [Report Bugs](https://github.com/zefie/zefie_wtvp_minisrv/issues)
- [Add a Feature and send a Pull Request](https://github.com/zefie/zefie_wtvp_minisrv/pulls)
- Write and submit better documentation than I created (see Pull Request above)
- [Support financially on Patreon](https://www.patreon.com/zefie)
- **Content Creators**: Shout out this project, and my YouTube Channel (https://www.youtube.com/zefievideo)
- Financially Support:
- **Companies**: Reach out to biz@zefie.net to sponsor this project
- [Subscribe on Patreon](https://www.patreon.com/zefie)
- One-Time Support:
- [CashApp $altimit](https://cash.app/$altimit)
- Chime: $zefie
- [Credit Card or PayPal (powered by StreamElements)](https://zef.pw/ttv-tip)

BIN
minisrv_logo.xcf Normal file

Binary file not shown.

View File

@@ -372,3 +372,7 @@ FodyWeavers.xsd
# minisrv error log file
errors.log
# PageBuilder Vault
PageBuilderVault/http_pb/*
!PageBuilderVault/http_pb/clipart

Binary file not shown.

After

Width:  |  Height:  |  Size: 549 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

View File

@@ -0,0 +1,70 @@
<html><head>
<meta name="generator" content="WebTV Page Builder (Rebuilt by JarHead)">
<meta name="description" content="meow">
<title>Cat</title>
</head>
<body bgcolor="#eeeeee">
<table width="100%" cellspacing="4" cellpadding="4" border="0">
<tbody><center>
<font size="7" color="#000000"><b>Cat</b></font></center></td>
</tr><tr height="316">
<td width="101" height="316" background="clipart/styleMedia/CAT.gif"></td>
<td valign="top" height="316" bgcolor="#669999"><p><TABLE nocolor width=100%><TR>
<TD align=center>
<font color=#eeeeee>
<H3>
Cat
</H3>
</font>
</TD>
</TR><TR><td><CENTER>
<IMG SRC="clipart/Animals/Cats_n_Dogs/an00891_.gif">
</CENTER>
</TD>
</TR>
<TR>
<TD valign=top>is cool
</TD>
</TR>
</TABLE>
</p><p>&nbsp;</p></td>
</tr>
</tbody></table>
<table width="100%" cellspacing="2" cellpadding="0" border="0">
<tbody><tr height="0">
<td height="0">
<spacer type="block" width="30%" height="0">
</spacer></td><td height="0">
<spacer type="block" width="30%" height="0">
</spacer></td><td height="0">
<spacer type="block" width="30%" height="0">
</spacer></td></tr><tr>
<td colspan="3">
<hr>
</td>
</tr>
<tr>
<td width="30%" valign="middle">
<font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">
<b>
</b></font></td>
<td width="30%" valign="middle">
<center>
<font size="-2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"><i>
<a href="http://community.webtv.zone">Powered by WebTV</a>
</i></font></center>
</td>
<td width="30%" valign="middle" align="right">
<font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">
<b>
</b></font></td>
</tr>
<tr>
<td colspan="3">
<hr></td>
</tr>
</tbody></table>
<div style="position: static !important;"></div></body></html>

View File

@@ -0,0 +1,56 @@
<HTML>
<HEAD>
<SCRIPT language="JavaScript">
var gIsWebTV = false;
var AppName = new String;
AppName = window.navigator.appName;
if (AppName.indexOf("WebTV") >= 0 )
gIsWebTV = true;
</SCRIPT>
<TITLE>WebTV_88150</TITLE>
</HEAD>
<body
background="../clipart/styleMedia/ExternalBackground.gif"
bgcolor=#1e4261
text=AEBFD1 link=B8BDC7
vlink=B8BDC7
hspace=0
vspace=0
>
<table cellspacing=0 cellpadding=0 width=100%>
<tr>
<td width=22 rowspan=100><td><td><td><td><td width=22 rowspan=100>
<tr>
<td height=12>
<tr>
<td height=25 valign=top colspan=4>
<font size=+1 color=D1D1D1>Pages of WebTV_88150</font>
<tr>
<td height=14>
<tr><td height=10><tr><td>
<td width=5>
<td>
<table>
<tr><td colspan=2><font color=AEBFD1><B>
<a href=test/index.html>test</a>
</B></font>
<tr>
<td width=12>
<td><font size=-1>test description</font>
</table>
<tr><td height=10>
<tr><td height=10><tr><td>
<td width=5>
<td>
<table>
<tr><td colspan=2><font color=AEBFD1><B>
<a href=Cat/index.html>Cat</a>
</B></font>
<tr>
<td width=12>
<td><font size=-1>meow</font>
</table>
<tr><td height=10>
<tr><td height=10></table>
</BODY>
</HTML>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@@ -0,0 +1,111 @@
<html><head>
<meta name="generator" content="WebTV Page Builder (Rebuilt by JarHead)">
<meta name="description" content="test description">
<title>test</title>
</head>
<body vlink="#ffff99" text="#cccccc" link="#ffcc00" bgcolor="#333333" background="clipart/styleMedia/spacefield.gif"><center>
<font size="7" color=#cccccc><b>
test
</b></font>
<p>
<table>
<tbody><tr><td>
</td>
</tr>
</tbody></table>
</center><p>
<table>
<tbody><tr><td><center><table nocolor="" cellspacing="0" cellpadding="0"><tbody><tr><td>
<font color=#cccccc>
<h3>
my test list
</h3>
</font>
</td></tr><tr><td height="0"><spacer type="block" width="80"> </spacer></td></tr><tr><td><ul type="DISC">
<li>
this is a test
</li>
</ul>
</td>
</tr><tr><td><ul type="DISC">
<li>
listing 2
</li>
</ul>
</td>
</tr><tr><td><ul type="DISC">
<li>
whoa its 3
</li>
</ul>
</td>
</tr><tr><td><ul type="DISC">
<li>
fuck its 4!
</li>
</ul>
</td>
</tr></td>
</tr></tbody></table>
</center><p><TABLE nocolor width=100%><TR>
<TD align=center>
<font color=#cccccc>
<H3>
my ancient pc
</H3>
</font>
</TD>
</TR><TR><td><CENTER>
<IMG SRC="clipart/Business/BS00095_.gif">
</CENTER>
</TD>
</TR>
<TR>
<TD valign=top>my webtv is better
</TD>
</TR>
</TABLE>
</p></td>
</tr>
</tbody></table>
</center>
<table width="100%" cellspacing="2" cellpadding="0" border="0">
<tbody><tr height="0">
<td height="0">
<spacer type="block" width="30%" height="0">
</spacer></td><td height="0">
<spacer type="block" width="30%" height="0">
</spacer></td><td height="0">
<spacer type="block" width="30%" height="0">
</spacer></td></tr><tr>
<td colspan="3">
<hr>
</td>
</tr>
<tr>
<td width="30%" valign="middle">
<font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">
<b>
</b></font></td>
<td width="30%" valign="middle">
<center>
<font size="-2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"><i>
<a href="http://community.webtv.zone">Powered by WebTV</a>
</i></font></center>
</td>
<td width="30%" valign="middle" align="right">
<font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">
<b>
</b></font></td>
</tr>
<tr>
<td colspan="3">
<hr></td>
</tr>
</tbody></table>
</center>
<div style="position: static !important;"></div></body></html>

View File

@@ -1,23 +1,21 @@
-----BEGIN CERTIFICATE-----
MIID1TCCAr2gAwIBAgIUQzfMpYgezM0u/aOpBIYzCTSNuSgwDQYJKoZIhvcNAQEL
BQAwejELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAk5ZMRcwFQYDVQQKDA5aZWZpZSBO
ZXR3b3JrczEQMA4GA1UECwwHbWluaXNydjETMBEGA1UEAwwKbWluaXNydl9jYTEe
MBwGCSqGSIb3DQEJARYPemVmaWVAemVmaWUubmV0MB4XDTIyMTAxMjAzMzQzOVoX
DTIyMTExMTAzMzQzOVowejELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAk5ZMRcwFQYD
VQQKDA5aZWZpZSBOZXR3b3JrczEQMA4GA1UECwwHbWluaXNydjETMBEGA1UEAwwK
bWluaXNydl9jYTEeMBwGCSqGSIb3DQEJARYPemVmaWVAemVmaWUubmV0MIIBIjAN
BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzo8+u/9kJcQY+mOKLxYNOtNSWqlu
fwSKpo/kCMbCkM4TCJiaKHWwtXeT5tgrYPqg6s3nHpG2arwI/sxX6fy86s9i8bu5
NEaO6/Czii0gQLXznURPaCPKp2dJEpcrFvqsB/Ej7Bm2cZH4BaOW9CeaMdrSXK1e
Tlwem1XHPeFnIPGQr3sYp2CNcB3TWzNkGGDPB2CBcR+qB2Fnjb7aEcd5t4imJqT6
BPTiDB234v3glcEaDBIr3bT/YGZuRn7Ou8qAVKlfT4iDsgHkpW+V7RYRocfAynPF
mSxQf2i4hIfvK2mGhdpcQGH5WTOp6K9xIv/lGIZcb29xoAeICplq3/u24wIDAQAB
o1MwUTAdBgNVHQ4EFgQUG8IOPoOiwIA1GI/3pANtftkD7BwwHwYDVR0jBBgwFoAU
G8IOPoOiwIA1GI/3pANtftkD7BwwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0B
AQsFAAOCAQEAaG63vM/KbOfx/wzg8dZE6j/h8Ai0wJ1iXXvBLa23+fpZwfHIMH/A
uvkap+OzX3oI8fdalReY11+WONfzA4pyuNPtluwkngSLjT8YSfHfM3MUM6LKt5x4
rRNBNN74H8A7q5UDA/SD2M1HjcOkFNlH4XrE6Uy/ColCVV9cYGPdx1rKwiQiKK7Q
Nr+6awAYHzQ2kdrZ4kneBZqAWAuIzjjWMxcgVwCHpb4rV0u3j/uhIos/8Q6NtLA7
EqW0qMWmpJ9DlqfhLXqVCgfPyxGNpvTom0lw6J8OL8U6d+oaeVTZW44/3A8wNjJ+
Gd2qQMxupodfV3LVyREvDpM+cowW6q+qHA==
MIIDeTCCAmGgAwIBAgIUObgvDtDTX7MTcGb7D1QCB2ezqv0wDQYJKoZIhvcNAQEL
BQAwSzELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRcwFQYDVQQKDA5a
ZWZpZSBOZXR3b3JrczEQMA4GA1UECwwHbWluaXNydjAgFw0yMjExMTQwMTE3MDNa
GA8yMTIyMTAyMTAxMTcwM1owSzELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZ
b3JrMRcwFQYDVQQKDA5aZWZpZSBOZXR3b3JrczEQMA4GA1UECwwHbWluaXNydjCC
ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL6xkPAnKJntwd+k0GzprJYw
P5WSGTtB3V2B7aVJJhXbck3z/ko1g73nMdbReH9ruRQzHgYOiTGVLUI76RkfCqts
VjJiYbGuNREcIq6LMO4boMzfAH7K/0va7VV1K5aL7v/ZXIq61xvSuef61kJpeTAT
T411eeWCTsHgqBNqcHLLf1qDoRugUpJk8dz9aWeG4LSDKTSigA4+kj9hXicyiQn0
ZQdgXw1G0FDXdb+lnFZKpVTRne7gXL4WegwLlAQV453228u97WQmd0+OujH9gm89
tlk8WZqrVcren1vdbyJ9+zRPnUkwH53C08/fuwu7vYT+/AR0unQ8VWaQ/+3BW6MC
AwEAAaNTMFEwHQYDVR0OBBYEFOP1MtW6WNC+ang1Q2AFjN5hfVLtMB8GA1UdIwQY
MBaAFOP1MtW6WNC+ang1Q2AFjN5hfVLtMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZI
hvcNAQELBQADggEBAK+IOv9w/fekp70FZ1G48ftQUYR02ezn+9EyGbfPfkZSdUyW
kE8T0iYzZBcDvf/qd6XxhlN5KMOJXDBzbGpZeg5bQa4jBsbdSLLaq7f0WcFUGGyk
+LQdwwzd2jnEq826ZQvjJcR/tn4lyxAuoalfm0C5/45vz6c0E/U4sh6XHga8dVAj
T2TZMtLoAAB/k3uAc4S6SShfoR/l88XzaIN112kLfZ8HINRhnR4Lgs6jhnUqmPdB
KGd0M0XBZG9XEWMbic9j0FP5CoVzmSJJV8OYnFaXfGkNLOb4kOQikA+xj8HttQwI
CPPmtu8YdMTAfQ/I2c163EXpxbFJ2wYS2KKLQmQ=
-----END CERTIFICATE-----

View File

@@ -1,22 +1,22 @@
-----BEGIN CERTIFICATE-----
MIIDnDCCAoSgAwIBAgIULCdoiUdXwTXF3qsxau5hOdxSiKQwDQYJKoZIhvcNAQEL
BQAwejELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAk5ZMRcwFQYDVQQKDA5aZWZpZSBO
ZXR3b3JrczEQMA4GA1UECwwHbWluaXNydjETMBEGA1UEAwwKbWluaXNydl9jYTEe
MBwGCSqGSIb3DQEJARYPemVmaWVAemVmaWUubmV0MCAXDTIyMTAxMzAwNTIwMFoY
DzIxMjIwOTE5MDA1MjAwWjB/MQswCQYDVQQGEwJVUzERMA8GA1UECAwITmV3IFlv
cmsxFzAVBgNVBAoMDlplZmllIE5ldHdvcmtzMRAwDgYDVQQLDAdtaW5pc3J2MRIw
EAYDVQQDDAlsb2NhbGhvc3QxHjAcBgkqhkiG9w0BCQEWD3plZmllQHplZmllLm5l
dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN5R/V1oF69ZvKyz0toA
1f2+b1BUkYivtiVYlSavAqS2EiqhKCNZdreFIuIMHo8v0npir3VxXxwwVBM2+DPQ
sp08wUCu9nLidYYBMl4qlRRANmd5i6uQ0ErLceSPv/KfkDeVfd63rrKvQCxBqhFi
OI/ZI+bxkK+P7fAntKJ35abKDQyJ4NblAb+AUXvxo+HsCaX8Gyox8cbLFGrkNICY
Pe9YcuY899OhuY/vBLTkkLXKyynG7nLaGYc39uNGg/SI0ZWcAEC1q0uRVB5ed3X7
BfpIlP60wxLi8eX7DANDyoRJ/vOSF5RIilmrPM6bXnAMYRmsUb+Z3Wjc8NRBZCC/
5a0CAwEAAaMTMBEwDwYDVR0RBAgwBocEfwAAATANBgkqhkiG9w0BAQsFAAOCAQEA
nFPOU9HRjf/i5r8qS8VodNbZRVD0+aemdJobdvmlBbNn+Uh2k4sYcBse9dI2ZGbB
5Z0sxAAJXdynVqzrhIQzZUDsZFi1mBI8rpo6hGdL7QU2aepiDDb4dBpt3Xc8XcmT
SeXV5sPTZC4wT8t/IJh6wAynPKmBl1BveTtml4BHiNS2YKYK3LrTkpxRhoAiBatf
km4+UiL/6nskBhLuKkLLYTgA1VwrbnzSMjGWkJ8F9E9xsXrcK29eyCYhKJXETO5T
Npdk7Hl8qbbe8/a99XRxZzi/rcf5VjnQ3CmxE/+jV99efhrCyc1l0EwS04qfjUhA
mRVCPS3bpgPbKkCHe7TGXw==
MIIDnjCCAoagAwIBAgIUMq37VqD3bJeWGUGJWRbFRoJY1v0wDQYJKoZIhvcNAQEL
BQAwSzELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRcwFQYDVQQKDA5a
ZWZpZSBOZXR3b3JrczEQMA4GA1UECwwHbWluaXNydjAgFw0yMjExMTQwMTE4NTBa
GA8yMTIyMTAyMTAxMTg1MFoweTELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAk5ZMRcw
FQYDVQQKDA5aZWZpZSBOZXR3b3JrczEQMA4GA1UECwwHbWluaXNydjESMBAGA1UE
AwwJbG9jYWxob3N0MR4wHAYJKoZIhvcNAQkBFg96ZWZpZUB6ZWZpZS5uZXQwggEi
MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC1csdxdUTf50Zwk7VYCE1riTSM
siq3iqO3obh8SFbsIO+WKTfTatU+fmqby2eVmT6XNKJzLKil9QMWPFp6WcWSRCcg
v2hc13OJDk1/Zb3psWOPU0jSXAfdrE2IzdlG6lLgj91GViN/PJEgaq74GZcIhXf5
UiUyxUP/jpP41AXwJYgD1ZL19r3qY6XG3DjmQjDROzkvTohDZQJxYd82bahVAp2H
Jx5omm6uQ1x17o5OcUY2kqAAqs6ChKHg435jCi7/B+caWMqhNpubPb2mykLZGVlv
1oVyT/nr06UgU6NLNC2HW8tKinhxzPAtSgMY9PltGXLdkto0Br9FkgF/xSN/AgMB
AAGjSjBIMB8GA1UdIwQYMBaAFOP1MtW6WNC+ang1Q2AFjN5hfVLtMAkGA1UdEwQC
MAAwGgYDVR0RBBMwEYIJbG9jYWxob3N0hwR/AAABMA0GCSqGSIb3DQEBCwUAA4IB
AQCgZePBrgXb3eOH6HQlOJ2hB0gjb9EmkGTFC9eMJs/2ggl9E6pb5r3vsmyMnfbP
tA7KCm6A6WMbMq89wTy6vcRfVrr2TaQgUTJRApkvEtx2sAR5uPICPZPJNRVt7lVT
SnsWYLiI5IC5Omu+lCeEyFhi0XZIF0JofU2XfZN1lv1VTOUHTpfRngAxLk2cyvmY
xIeRwOBgM4C1Qyb6OSM8C/b6i/j7nVFZ9SyD/ryI8qeouTd/kzz02NElKtrAIgp3
nGapIKcvFxKu5SyUV+T+KOXCD/JArfAgwLEP+fMg821p/MpbSpx8aeCdAmYYrInM
4w7wJR4XLq1S/UYZM9Ryw7Bu
-----END CERTIFICATE-----

View File

@@ -1,27 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEA3lH9XWgXr1m8rLPS2gDV/b5vUFSRiK+2JViVJq8CpLYSKqEo
I1l2t4Ui4gwejy/SemKvdXFfHDBUEzb4M9CynTzBQK72cuJ1hgEyXiqVFEA2Z3mL
q5DQSstx5I+/8p+QN5V93reusq9ALEGqEWI4j9kj5vGQr4/t8Ce0onflpsoNDIng
1uUBv4BRe/Gj4ewJpfwbKjHxxssUauQ0gJg971hy5jz306G5j+8EtOSQtcrLKcbu
ctoZhzf240aD9IjRlZwAQLWrS5FUHl53dfsF+kiU/rTDEuLx5fsMA0PKhEn+85IX
lEiKWas8zptecAxhGaxRv5ndaNzw1EFkIL/lrQIDAQABAoIBAH8A+aulrnom2okS
hW6ysYyugKq0VRtvva9iBnq92dW8iW4++E4Raqd2cDIQWFjWKfhubeu6o2nYFf+Q
FISNQaxfq8rG6NVCl37BKkPvMZELCclc/zQ4mzVPObYnhLEXBG0sgmZ8Klm7kf52
WLBrmwJaOo9RCqWwpG3gUOnLcq8vhvqKEXRzqaHqPtWJEuU09FgXt55/8eydykvE
JqP9W1iLpwYgknSkC65QKxpWrKx1h9JbkKUzOx4H51WzR2qVDT3VVK+5J7LvonSI
p1eEDGH8g3kWp6T0qwaUTkVINS4hhg/l5XPEqKkTNayKIJeSrEkfgs0sL/D9cxTI
gswml6ECgYEA/E7RJa8xXDqthtw/Uxss5wfANquufBxl9c0Spp2M1SfMSXGTQ+SQ
6mUGsWdiFhv98vPVv4JDfjvOSonppG9+cd2+kSignCeEt33hMb6cgp9QpG0PC22C
B2JqWtN4YuS8D+Hms5ZwC1XSavXCD8gPspXlo6jM6Q/3fPZxZr+xvzkCgYEA4ZLV
rOwODiPRB3DL+Y01KJZQvHGbU9QRAjAfqpdJ6UagueKQB6I/GxCKwtZbG1l2RreM
vjhvDf8oWW4Oe+Ff9PXp/A4C42RbPKTKIUNLiDd+qVsn9yT2dypibb3W6pzLQru7
gT72ERCwb/yAoIbwLSUpudarRxASOBiCxgJO5hUCgYAdQE4DHnKMjMj9b59v1SC5
kC56qCDMhsZTXvkgk/d15u1KPn6iSmd6pUfHXYMDqS8h8Z8AWuvUQL7D6YVK6Rox
vVGQprMoJ3S9iTyIdd7TTgEdbv9lhcajcIeADDBS1s3u0XPbsj8/MS359JARIFKh
k7tR5AoNoypANJolHWhQEQKBgQC8iPV+6m109AqppWVW1ucvXTNtzaZ9kioFIiPV
eU2VZCrCMtMfDkSgYlsYLgFIAqYQxSkldBWeJT2cQZhpgh2pqEBBI5TWafK35SPs
WUqwN3HuKvpkXsiBITPTdXBD93kL9czqYa1Y5hISB4Gaqi3kDcOqR/owEwanTBVB
WnyHYQKBgQChNn7uvIIUzQKoxYyvXk5NVIb1xey64deOVnayg66s6oHF9UHtynay
equq5maSgyF3Ft597koiG7ylMkcXkdsmUPos26ZSDlgqYC9v+VopqQB3T06ltyGA
lOjjVjzofTSzMvQ1UFbDoogelpnZNn8koKrgrUuZL+A0VLEYQTFITg==
MIIEpAIBAAKCAQEAtXLHcXVE3+dGcJO1WAhNa4k0jLIqt4qjt6G4fEhW7CDvlik3
02rVPn5qm8tnlZk+lzSicyyopfUDFjxaelnFkkQnIL9oXNdziQ5Nf2W96bFjj1NI
0lwH3axNiM3ZRupS4I/dRlYjfzyRIGqu+BmXCIV3+VIlMsVD/46T+NQF8CWIA9WS
9fa96mOlxtw45kIw0Ts5L06IQ2UCcWHfNm2oVQKdhyceaJpurkNcde6OTnFGNpKg
AKrOgoSh4ON+Ywou/wfnGljKoTabmz29pspC2RlZb9aFck/569OlIFOjSzQth1vL
Sop4cczwLUoDGPT5bRly3ZLaNAa/RZIBf8UjfwIDAQABAoIBAQCSqFoyB1ILE5jo
p0rdA6Dn+TdDPUKvpVxcsVc3BRVUt+5O1bPsqx3+7BjpIcfwr7Nabc2cAA20TcwX
7eJHoEXDylhB7NPCrtYQgkH7ZdXRjHJnRy7F8GLfNkRY/eDPo9gm78Eu97KrRd4b
cH9Jww1DcvWczFuKpM0oQyqw5VaDWcUGK7VWuLYLMX2E9wlqwjrE+F2uyEAW2qB4
Nef+UvjyW3nGLlGEyUTLNo+P+dWERwFEHObkBykVgWl7BTY62S4RJbtrIFiULnzc
UzngvJHTX24zCCDUQlfVPGAcF7PAhK0JFrNnmQPBIvlXixj+cKtR2SzusoD8q6g6
JNrvttlRAoGBAOmHnlZqtKO5Qj8IypSxL7+Lex7/LGwbG6+479k+4XEge+i/5k5m
i+AIcD4EkKzoon/35PWXEtdkRfNobRPCAKSAfUEg0wBl0imLl7+zK1K8GGIHnMKS
jUt+9dtOe97l1EUIza4Xp4nkldkgmoz0bUTHfxciohHD0UYQYWhgLLgpAoGBAMbo
Rj1vm/1DVoeyAiBOSCRxprUakIuxnhlf+AqnWhLdkmLw2BYkQAwmNkZ1/96r4tev
mzu1BPboOJZfON+/ZShMmZ4i82emOgXSMZUjKMW/u9M9pZPbv5Z/++ohN9vwxBcT
B9xDbV3cVvNaDBl3N3egAkyTOOPudDCMDgYOvBNnAoGAa1Aq7sMyJ1pmmtjLXvDd
ZEQQW/oey77ZRjLR5R8EMhwfVKF6j+SHunemPJmUciClK/EagdDek6Q8kNIX7dBk
wzNYW6ldzPz9SqIfJbSL4AUXn1SoMLFvxJWfHRw/x/oNRXv6KFouXytvwMs+ui9I
VyblvBfqKge2D2BPossvQaECgYABVd3i27T4ZlNWZeONw/jIBdtQq/T8exzMntBT
gfwg1Ev/Tg6lV2j2q+sBXhlxrUXAnPU12WlHHxgCKnF/TxGmy5zcau+nan5JO7gJ
gErtyPPB31AVRgxrPkC6ua5eU6d9YCtVVz6MusX6rEgYg6xjqTdavEJNhXRSPx54
+/BXUQKBgQCCNSXWhCZFmsWXsLc0X6d+NXhzqmSJjeey05cQY2uGkGGtQLooLzEQ
xHjptVFaQ76m3LwO7c9bk02RUpX4fDxA4r/Hk8JcaJsvSS+BkgYCFC9qYxi7wVjq
eSYDbGxIpK5TDk3Y9VXZqGZvfRcqhj3KSMvetovUUY9eJ5bXVQO65A==
-----END RSA PRIVATE KEY-----

View File

@@ -18,7 +18,8 @@ var logos = {
}
var disksets = {
0: null
0: null,
98: "HackTV_min.zip"
}
var viewer_stock_md5s = {
@@ -26,7 +27,7 @@ var viewer_stock_md5s = {
"WebTVIntel--1.1.exe": "ce7b6d1734b5e3d1cbd5f068609223d1",
"WebTVIntel--2.5.exe": "4c5754bb8b69739b6f414c2d159051da",
"WebTVIntel--1.0-HE.exe": "391f303fd70034e69d3a50583de72c89",
"WebTVIntel--2.5-HE.exe": "f0207865693a45ba76b9057dcb8ea672"
"WebTVIntel--2.5-HE.exe": "64edab977ec19a663c5842176bec306a"
}
@@ -334,6 +335,8 @@ if (request_headers.query.viewer &&
client_ssid = generateSSID();
var viewer_file = viewers[request_headers.query.viewer];
var needs_hacktv_mini = (viewer_file === "WebTVIntel--2.5-HE.exe") ? true : false
console.log('needs_hacktv_mini', needs_hacktv_mini)
if (!viewer_file) {
errpage = wtvshared.doErrorPage("500", null, socket.minisrv_pc_mode)
headers = errpage[0];
@@ -378,7 +381,7 @@ Content-Disposition: attachment; filename="${viewer_file.replace(".exe", ".zip")
var zip = new AdmZip();
zip.addZipComment("Viewer SSID: " + client_ssid);
zip.addFile(viewer_file, patched_file);
zip.addFile(viewer_file.replace("--", "-" + client_ssid + "-"), patched_file);
if (!request_headers.query.viewer_only) {
var romset_zip = new AdmZip(viewergen_resource_dir + viewer_file.replace(".exe", "").replace("WebTVIntel", "AppData") + ".zip");
var zipEntries = romset_zip.getEntries();
@@ -396,8 +399,10 @@ Content-Disposition: attachment; filename="${viewer_file.replace(".exe", ".zip")
zip.addFile(zipEntry.entryName, zipEntry.getData());
}
});
if (request_headers.query.diskset) {
var diskset_file = disksets[parseInt(request_headers.query.diskset) || 0];
if (request_headers.query.diskset || needs_hacktv_mini) {
var diskset_file = 0;
if (needs_hacktv_mini) diskset_file = disksets[98];
else diskset_file = disksets[parseInt(request_headers.query.diskset) || 0];
if (diskset_file) {
var diskset_zip = new AdmZip(viewergen_resource_dir + diskset_file);
var zipEntries = diskset_zip.getEntries();

View File

@@ -2,7 +2,8 @@ var minisrv_service_file = true;
var gourl = "wtv-head-waiter:/login?";
if (socket.ssid) {
if (session_data) {
if (session_data.loadSessionData() == true) {
console.log(" * Loaded session data from disk for", wtvshared.filterSSID(socket.ssid))
session_data.setSessionData("registered", (session_data.getSessionData("registered") == true) ? true : false);
@@ -58,10 +59,12 @@ if (session_data.data_store.wtvsec_login) {
var file_path = null;
var bf0app_update = false;
var romtype = session_data.get("wtv-client-rom-type");
var send_tellyscript = (minisrv_config.services[service_name].send_tellyscripts && !request_headers.query.relogin && !request_headers.query.guest_login);
var bootrom = parseInt(session_data.get("wtv-client-bootrom-version"));
var send_tellyscript = (minisrv_config.services[service_name].send_tellyscripts && !request_headers.query.relogin && !request_headers.query.guest_login && !bootrom !== 0);
var wtv_script_id = parseInt(session_data.get("wtv-script-id"));
var bootrom = session_data.get("wtv-client-bootrom-version");
var wtv_script_mod = parseInt(session_data.get("wtv-script-mod"));
if ((request_headers.query.reconnect || request_headers.query.relogin) && wtv_script_id != 0) send_tellyscript = false;
if (wtv_script_id !== 0 && wtv_script_mod !== 0) send_tellyscript = false;
if (send_tellyscript) {
if (minisrv_config.services[service_name].send_tellyscript_ssid_whitelist) {
var send_telly_to_ssid = (minisrv_config.services[service_name].send_tellyscript_ssid_whitelist.findIndex(element => element == socket.ssid) != -1)

View File

@@ -7,7 +7,6 @@ var auth = wtva.isAuthorized();
function generateFormField(type, confvar, options = null) {
if (confvar.indexOf('.') > 0) {
var confvar_split = confvar.split('.');
console.log(confvar_split)
// not operater error resistant, be mindful if you modify this page
if (user_config.config[confvar_split[0]])
var confvar_value = user_config.config[confvar_split[0]][confvar_split[1]] || minisrv_config.config[confvar_split[0]][confvar_split[1]]
@@ -125,9 +124,9 @@ contact the server operator (eg. email, Discord, Twitter, etc...)
<tr><td absheight=60 valign=top>
<font size=-1><b>service_name</b><br>The name of the service (eg. WebTV)
<tr><td absheight=90 valign=top>
<font size=-1><b>service_logo</b><br>The logo for the service. Filename only. Must exist in the SharedROMCache service vault.
<tr><td absheight=70 valign=top>
<font size=-1><b>service_splash_logo</b><br>The splash page logo for the service. Absolute path. Can be file:// or wtv url.
<font size=-1><b>service_logo</b><br>The logo for the service. Absolute URL, or file name in the Shared ROMCache.
<tr><td absheight=90 valign=top>
<font size=-1><b>service_splash_logo</b><br>The splash page logo for the service. Absolute URL, or file name in the Shared ROMCache.
<tr><td absheight=60 valign=top>
<font size=-1><b>show_detailed_splash</b><br>Show service information and client connection speed on the splash page.
<tr><td absheight=60 valign=top>
@@ -163,7 +162,7 @@ When disabled, accounts will not be able to use passwords, if they had a passwor
The size of the field on the login password page
</table>
<TD WIDTH=15>
<TD WIDTH=198 absheight=1620 VALIGN=top ALIGN=left colspan=2>
<TD WIDTH=198 absheight=1640 VALIGN=top ALIGN=left colspan=2>
<form action="wtv-admin:/validate-operator-tweaks">
<input type=hidden name=autosubmit value=true autosubmit=onleave>
<table cellspacing=0 cellpadding=5>
@@ -182,13 +181,13 @@ ${generateFormField('input', 'service_owner_contact')}
<td absheight=90 valign=top>
${generateFormField('input', 'service_owner_contact_method')}
<tr>
<td absheight=60 valign=top>
<td absheight=55 valign=top>
${generateFormField('input', 'service_name')}
<tr>
<td absheight=90 valign=top>
<td absheight=85 valign=top>
${generateFormField('input', 'service_logo')}
<tr>
<td absheight=70 valign=top>
<td absheight=90 valign=top>
${generateFormField('input', 'service_splash_logo')}
<tr>
<td absheight=60 valign=top>
@@ -197,7 +196,7 @@ ${generateFormField('checkbox', 'show_detailed_splash')}
<td absheight=60 valign=top>
${generateFormField('checkbox', 'hide_ssid_in_logs')}
<tr>
<td absheight=70 valign=top>
<td absheight=80 valign=top>
${generateFormField('checkbox', 'filter_passwords_in_logs')}
<tr>
<td absheight=50 valign=top>

View File

@@ -18,9 +18,18 @@ if (auth === true) {
Object.keys(request_headers.query).forEach((k) => {
if (k === "autosubmit") return;
var v = request_headers.query[k];
// enable_multi_query may send ["false", "on"] for checkboxes due to webtvism
if (isArray(v)) v = v[(v.length - 1)];
// convert numbers back to int before writing to config
if (!isNaN(parseInt(v))) v = parseInt(v);
// convert string back to boolean before writing to config
if (v === "on" || v === "true" || v === "false") v = wtvshared.parseBool(v);
if (k.indexOf("-") > 0) {
// handle sub-config items
var s = k.split("-");
if (!user_config.config[s[0]]) user_config.config[s[0]] = {}
user_config.config[s[0]][s[1]] = v;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 372 B

After

Width:  |  Height:  |  Size: 1006 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -14,17 +14,17 @@ if (foldername)
{
if (folder_array.length < minisrv_config.services[service_name].max_folders)
{
//if (session_data.favstore.checkFolderName(foldername) == true)
//{
if (session_data.favstore.checkFolderName(foldername) == true)
{
session_data.favstore.createFolder(foldername);
headers = `300 OK
Connection: Keep-Alive
Content-Type: text/html
Location: wtv-favorite:/favorite
wtv-expire-all: wtv-favorite:`
//} else {
// headers = `400 That folder name is not valid. Choose a different name and try again.`
//}
} else {
headers = `400 That folder name is not valid. Choose a different name and try again.`
}
} else {
headers = `400 You can only have ${minisrv_config.services[service_name].max_folders} folders at one time. Delete some folders and try again.`
}

View File

@@ -26,30 +26,28 @@ data = `<html><head>
<title>
Favorite folders
</title>
</head><body fontsize="large" vspace="0" hspace="0" vlink="189cd6" text="44cc55" link="189cd6" bgcolor="191919"><display ${(minisrv_config.services[service_name].max_folders <= 14) ? "noscroll" : ""}>
<display ${(minisrv_config.services[service_name].max_folders <= 14) ? "noscroll" : ""}>
</head><body fontsize="large" vspace="0" hspace="0" vlink="189cd6" text="44cc55" link="189cd6" bgcolor="191919">
<sidebar width="109" height="384">
<table cellspacing="0" cellpadding="0" bgcolor="284a52">
<tbody><tr><td absheight="196" valign="top">
<tr><td absheight="196" valign="top">
<table absheight="196" cellspacing="0" cellpadding="0">
<tbody><tr>
<tr>
<td width="100%" valign="top" height="50%">
<table cellspacing="0" cellpadding="0">
<tbody><tr>
<tr>
<td colspan="3" absheight="1" width="100%">
</td></tr><tr>
<td abswidth="6">
</td><td absheight="79" width="100%" align="center">
<table href="wtv-home:/home" absheight="79" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr>
<tr>
<td width="100%" align="center">
<img src="wtv-home:/ROMCache/WebTVLogoJewel.gif" width="87" height="67">
</td></tr></tbody></table>
</td></tr></table>
</td><td abswidth="5">
</td></tr><tr><td colspan="3" absheight="2" width="100%" bgcolor="1f3136">
<img src="wtv-home:/ROMCache/Spacer.gif" width="1" height="1">
@@ -57,98 +55,99 @@ Favorite folders
</td></tr><tr><td colspan="3" absheight="2" width="100%" bgcolor="436f79">
<img src="wtv-home:/ROMCache/Spacer.gif" width="1" height="1"> </td></tr><tr><td absheight="32" colspan="3" width="100%">
<table cellspacing="0" cellpadding="0">
<tbody><tr><td abswidth="5" absheight="26">
<tr><td abswidth="5" absheight="26">
</td><td width="100%">
<table href="wtv-favorite:/serve-add-folder-page?favorite_folder_name=Personal" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr><td>
<tr><td>
<table cellspacing="0" cellpadding="0">
<tbody><tr><td><shadow><font size="-1" color="E7CE4A">
<tr><td><shadow><font size="-1" color="E7CE4A">
Add folder&nbsp;&nbsp;
</font></shadow></td></tr></tbody></table>
</td></tr></tbody></table>
</font></shadow></td></tr></table>
</td></tr></table>
</td><td abswidth="5">
</td></tr><tr><td colspan="3" absheight="2" width="104" bgcolor="1f3136">
<img src="wtv-home:/ROMCache/Spacer.gif" width="1" height="1">
</td></tr><tr><td absheight="1">
</td></tr><tr><td colspan="3" absheight="2" width="104" bgcolor="436f79">
<img src="wtv-home:/ROMCache/Spacer.gif" width="1" height="1">
</td></tr></tbody></table>
</td></tr></table>
</td></tr><tr><td absheight="32" colspan="3" width="100%">
<table cellspacing="0" cellpadding="0">
<tbody><tr><td abswidth="5" absheight="26">
<tr><td abswidth="5" absheight="26">
</td><td width="100%">
<table href="wtv-favorite:/serve-discard-folders?favorite_folder_name=Personal" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr><td>
<tr><td>
<table cellspacing="0" cellpadding="0">
<tbody><tr><td><shadow><font size="-1" color="E7CE4A">
<tr><td><shadow><font size="-1" color="E7CE4A">
Remove&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</font></shadow></td></tr></tbody></table>
</td></tr></tbody></table>
</font></shadow></td></tr></table>
</td></tr></table>
</td><td abswidth="5">
</td></tr><tr><td colspan="3" absheight="2" width="104" bgcolor="1f3136">
<img src="wtv-home:/ROMCache/Spacer.gif" width="1" height="1">
</td></tr><tr><td absheight="1">
</td></tr><tr><td colspan="3" absheight="2" width="104" bgcolor="436f79">
<img src="wtv-home:/ROMCache/Spacer.gif" width="1" height="1">
</td></tr></tbody></table>
</td></tr></table>
</td></tr><tr><td absheight="32" colspan="3" width="100%">
<table cellspacing="0" cellpadding="0">
<tbody><tr><td abswidth="5" absheight="26">
<tr><td abswidth="5" absheight="26">
</td><td width="100%">
<table href="wtv-home:/throwerror" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr><td>
<tr><td>
<table cellspacing="0" cellpadding="0">
<tbody><tr><td><shadow><font size="-1" color="E7CE4A">
<tr><td><shadow><font size="-1" color="E7CE4A">
Help&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</font></shadow></td></tr></tbody></table>
</td></tr></tbody></table>
</font></shadow></td></tr></table>
</td></tr></table>
</td><td abswidth="5">
</td></tr><tr><td colspan="3" absheight="2" width="104" bgcolor="1f3136">
<img src="wtv-home:/ROMCache/Spacer.gif" width="1" height="1">
</td></tr><tr><td absheight="1">
</td></tr><tr><td colspan="3" absheight="2" width="104" bgcolor="436f79">
<img src="wtv-home:/ROMCache/Spacer.gif" width="1" height="1">
</td></tr></tbody></table>
</td></tr></tbody></table>
</td></tr></tbody></table>
</td></tr></table>
</td></tr></table>
</td></tr></table>
</td><td abswidth="5" background="ROMCache/Shadow.gif"><img src="wtv-home:/ROMCache/Spacer.gif" width="1" height="1">
</td></tr><tr><td absheight="188" valign="top">
<table absheight="188" cellspacing="0" cellpadding="0">
<tbody><tr><td width="100%"><img src="wtv-home:/ROMCache/Spacer.gif" width="100%" height="1">
<tr><td width="100%"><img src="wtv-home:/ROMCache/Spacer.gif" width="100%" height="1">
</td><td valign="bottom" align="right"><img src="ROMCache/FavoritesBanner.gif" width="50" height="188">
</td></tr></tbody></table>
</td></tr></table>
</td><td abswidth="5" background="ROMCache/Shadow.gif"><img src="wtv-home:/ROMCache/Spacer.gif" width="1" height="1">
</td></tr></tbody></table>
</td></tr></table>
</sidebar>
<table width="451" cellspacing="0" cellpadding="0" bgcolor="2b2b2b">
<tbody><tr>
<tr>
<td width="4" height="16"><img src="wtv-home:/ROMCache/Spacer.gif" width="1" height="1">
</td></tr><tr>
<td width="16"><img src="wtv-home:/ROMCache/Spacer.gif" width="1" height="1">
</td><td><table cellspacing="0" cellpadding="0">
<tbody><tr><td align="left">
<tr><td align="left">
<shadow><blackface><font color="e7ce4a">
Favorite folders
for ${session_data.getSessionData("subscriber_username") || "You"}
</font><blackface><shadow>
</shadow></blackface></blackface></shadow></td></tr></tbody></table>
</shadow></blackface></blackface></shadow></td></tr></table>
</td></tr><tr>
<td width="4" height="14"><img src="wtv-home:/ROMCache/Spacer.gif" width="1" height="1">
</td></tr></tbody></table>
</td></tr></table>
<table cellspacing="0" cellpadding="0">
<tbody><tr><td valign="top" align="left">
<tr><td valign="top" align="left">
<table width="225" cellspacing="0" cellpadding="0">
<tbody><tr><td width="225" valign="middle" height="42" background="ROMCache/LeftTop.gif" align="center">
<tr><td width="225" valign="middle" height="42" background="ROMCache/LeftTop.gif" align="center">
<table width="50%" cellspacing="0" cellpadding="0">
<tbody><tr><td width="40" height="20">
<tr><td width="40" height="20">
</td><td maxlines="1" width="140" height="20" align="center">
<a href="wtv-favorite:/serve-browser?favorite_folder_name=${folder_array[0]}" selected="">
<font size="-1">
<limittext value="${folder_array[0]}" width="140"></limittext></font></a><font size="-1">
</font>
</td><td width="20">
</td></tr></tbody></table>`
</td></tr></table>`
var kval = 0;
// process evens
Object.keys(folder_array).forEach(function (k) {
@@ -158,14 +157,14 @@ for ${session_data.getSessionData("subscriber_username") || "You"}
// Left Middle
data += `</td></tr><tr><td width="225" valign="middle" height="42" background="ROMCache/LeftMiddle.gif" align="center">
<table width="50%" cellspacing="0" cellpadding="0">
<tbody><tr><td width="40" height="20">
<tr><td width="40" height="20">
</td><td maxlines="1" width="140" height="20" align="center">
<a href="wtv-favorite:/serve-browser?favorite_folder_name=${folder_array[k]}">
<font size="-1">
<limittext value="${folder_array[k]}" width="140"></limittext></font></a><font size="-1">
</font>
</td><td width="20">
</td></tr></tbody></table>`;
</td></tr></table>`;
kval = k;
}
});
@@ -175,10 +174,10 @@ for ${session_data.getSessionData("subscriber_username") || "You"}
if (folder_array.length % 2 == 0) {
data += `</td></tr><tr><td width="225" valign="middle" height="42" background="ROMCache/LeftBottom.gif" align="center">
<table width="50%" cellspacing="0" cellpadding="0">
<tbody><tr><td width="40" height="20">
<tr><td width="40" height="20">
</td><td maxlines="1" width="140" height="20" align="center">
</td><td width="20">
</td></tr></tbody></table>`;
</td></tr></table>`;
}
}
@@ -186,40 +185,40 @@ for ${session_data.getSessionData("subscriber_username") || "You"}
if (folder_array.length == 1) {
// no folder 2
data += `<tr><td><table cellspacing="0" cellpadding="0">
<tbody><tr><td width="6" height="12"><img src="wtv-home:/ROMCache/Spacer.gif" width="1" height="1">
<tr><td width="6" height="12"><img src="wtv-home:/ROMCache/Spacer.gif" width="1" height="1">
</td><td width="20">
</td></tr></tbody></table>
</tr><td></td></tr></tbody></table>
</td></tr></table>
</tr><td></td></tr></table>
</td><td valign="top" align="left">
<table width="225" cellspacing="0" cellpadding="0">
<tbody><tr><td absheight="20" bgcolor="2b2b2b">
<tr><td absheight="20" bgcolor="2b2b2b">
</td></tr><tr><td width="225" valign="middle" height="42" background="ROMCache/RightTopEdgeOnly.gif" align="center">
<table width="50%" cellspacing="0" cellpadding="0">
<tbody><tr><td width="5" height="20">
<tr><td width="5" height="20">
</td><td maxlines="1" width="140" height="20" align="center">
</font>
</td><td width="20">
</td></tr></tbody></table>`
</td></tr></table>`
} else {
// process folder 2 (id 1)
data += `<tr><td><table cellspacing="0" cellpadding="0">
<tbody><tr><td width="6" height="12"><img src="wtv-home:/ROMCache/Spacer.gif" width="1" height="1">
<tr><td width="6" height="12"><img src="wtv-home:/ROMCache/Spacer.gif" width="1" height="1">
</td><td width="20">
</td></tr></tbody></table>
</tr><td></td></tr></tbody></table>
</td></tr></table>
</tr><td></td></tr></table>
</td><td valign="top" align="left">
<table width="225" cellspacing="0" cellpadding="0">
<tbody><tr><td absheight="21" bgcolor="2b2b2b">
<tr><td absheight="21" bgcolor="2b2b2b">
</td></tr><tr><td width="225" valign="middle" height="42" background="ROMCache/RightTop.gif" align="center">
<table width="50%" cellspacing="0" cellpadding="0">
<tbody><tr><td width="5" height="20">
<tr><td width="5" height="20">
</td><td maxlines="1" width="140" height="20" align="center">
<a href="wtv-favorite:/serve-browser?favorite_folder_name=${folder_array[1]}">
<font size="-1">
<limittext value="${folder_array[1]}" width="140"></limittext></font></a><font size="-1">
</font>
</td><td width="20">
</td></tr></tbody></table>`;
</td></tr></table>`;
}
// process odds
@@ -230,14 +229,14 @@ for ${session_data.getSessionData("subscriber_username") || "You"}
// Right Middle
data += `</td></tr><tr><td width="225" valign="middle" height="42" background="ROMCache/RightMiddle.gif" align="center">
<table width="50%" cellspacing="0" cellpadding="0">
<tbody><tr><td width="5" height="20">
<tr><td width="5" height="20">
</td><td maxlines="1" width="140" height="20" align="center">
<a href="wtv-favorite:/serve-browser?favorite_folder_name=${folder_array[k]}">
<font size="-1">
<limittext value="${folder_array[k]}" width="140"></limittext></font></a><font size="-1">
</font>
</td><td width="20">
</td></tr></tbody></table>`;
</td></tr></table>`;
}
});
@@ -246,20 +245,19 @@ for ${session_data.getSessionData("subscriber_username") || "You"}
if (folder_array.length % 2 != 0) {
data += `</td></tr><tr><td width="225" valign="middle" height="42" background="ROMCache/RightBottom.gif" align="center">
<table width="50%" cellspacing="0" cellpadding="0">
<tbody><tr><td width="5" height="20">
<tr><td width="5" height="20">
</td><td maxlines="1" width="140" height="20" align="center">
</td><td width="20">
</td></tr></tbody></table>`;
</td></tr></table>`;
}
}
data += `
</td></tr></tbody></table>
</td></tr></tbody></table>
</td></tr></table>
</td></tr></table>
<table cellspacing="0" cellpadding="0">
<tbody><tr><td width="451" height="2" background="ROMCache/FoldersCoverBorder.gif"><img src="wtv-home:/ROMCache/Spacer.gif" width="1" height="1">
</td></tr></tbody></table>
<tr><td width="451" height="2" background="ROMCache/FoldersCoverBorder.gif"><img src="wtv-home:/ROMCache/Spacer.gif" width="1" height="1">
</td></tr></table>
</display></body></html>

View File

@@ -1,5 +1,6 @@
var minisrv_service_file = true;
request_is_async = true;
var request_is_async = true;
var bf0app_update = false;
var request_path = request_headers.request_url.replace(service_name + ":/", "");

View File

@@ -1,6 +1,5 @@
var minisrv_service_file = true;
const WTVFlashrom = require(classPath + "/WTVFlashrom.js");
request_is_async = true;
// this build can be local or on zefie's server

View File

@@ -1,6 +1,5 @@
var minisrv_service_file = true;
const WTVFlashrom = require(classPath + "/WTVFlashrom.js");
request_is_async = true;
var bf0app_update = false;

View File

@@ -1,7 +1,5 @@
var minisrv_service_file = true;
const WTVFlashrom = require(classPath + "/WTVFlashrom.js");
var wtvflashrom;
request_is_async = true;
if (!request_headers.query.path) {
@@ -13,15 +11,23 @@ if (!request_headers.query.path) {
var request_path = request_headers.query.path;
// read flashrom header info into array using WTVFlashrom class
wtvflashrom.getFlashromMeta(request_path, function (data) {
processLC2DownloadPage(request_headers.query.path, data, (request_headers.query.numparts ? request_headers.query.numparts : null));
wtvflashrom.getFlashromMeta(request_path, function (data, headers) {
processLC2DownloadPage(data, headers, (request_headers.query.numparts ? request_headers.query.numparts : null));
});
}
async function processLC2DownloadPage(path, flashrom_info, numparts = null) {
async function processLC2DownloadPage(flashrom_info, headers, numparts = null) {
if (typeof flashrom_info === 'string') {
// zefie_flashrom_server error
data = flashrom_info;
headers += "\nminisrv-no-mail-count: true";
headers += "\nwtv-expire-all: wtv-flashrom:/get-lc2-page?";
headers += "\nwtv-expire-all: wtv-flashrom:/content";
sendToClient(socket, headers, data);
return false;
}
if (numparts != null) flashrom_info.part_count = parseInt(numparts);
if (!flashrom_info.part_count) flashrom_info.part_count = parseInt(flashrom_info.message.substring(flashrom_info.message.length - 4).replace(/\D/g, ''));
console.log(flashrom_info);
if (parseInt(flashrom_info.part_number) >= 0 && flashrom_info.rompath && flashrom_info.next_rompath) {
if (!flashrom_info.message && flashrom_info.is_bootrom) {
flashrom_info.message = "BootRom Part " + (flashrom_info.part_number + 1) + " of " + flashrom_info.part_count;
@@ -31,7 +37,8 @@ async function processLC2DownloadPage(path, flashrom_info, numparts = null) {
}
headers = `200 OK
Content-type: text/html`
Content-type: text/html
minisrv-no-mail-count: true`
data = `<html>
<head>
@@ -97,16 +104,10 @@ data += `
<upgradeblock width=250 height=15
nexturl="${flashrom_info.next_rompath}"
errorurl="${service_name}:/lc2-download-failed?"
blockurl="${flashrom_info.rompath}"`;
data += `
blockurl="${flashrom_info.rompath}"
lastblock="${flashrom_info.is_last_part}"
curblock="` + (flashrom_info.part_number + 1) + `"
`;
if (flashrom_info.part_count) {
data += `totalblocks="${flashrom_info.part_count}"`;
}
data += `>
curblock="${(flashrom_info.part_number + 1)}"${(flashrom_info.part_count) ? `
totalblocks="${flashrom_info.part_count}">` : `>`}
<font size="-1" color="#D6DFD0">
<br>
<img src="${service_name}:/ROMCache/Spacer.gif" width=2 height=10><br>
@@ -150,6 +151,9 @@ ${flashrom_info.message}
} else {
var errpage = wtvshared.doErrorPage(400)
headers = errpage[0];
headers += "\nminisrv-no-mail-count: true";
headers += "\nwtv-expire-all: wtv-flashrom:/get-lc2-page?";
headers += "\nwtv-expire-all: wtv-flashrom:/content";
data = errpage[1];
}
sendToClient(socket, headers, data);

View File

@@ -10,6 +10,7 @@ var romtype = session_data.get("wtv-client-rom-type");
if (request_headers.query.numparts) url += "&numparts=" + request_headers.query.numparts;
}
headers = "300 OK\n";
headers += "minisrv-no-mail-count: true\n";
headers += "wtv-visit: " + url + "\n";
headers += "Location: " + url + "\n";
headers += "Content-type: text/html";

View File

@@ -1,7 +1,8 @@
var minisrv_service_file = true;
headers = `200 OK
Content-type: text/html`
Content-type: text/html
minisrv-no-mail-count: true`
data = `<html>

View File

@@ -1,6 +1,5 @@
var minisrv_service_file = true;
const WTVFlashrom = require(classPath + "/WTVFlashrom.js");
request_is_async = true;
// this build can be local or on zefie's server

View File

@@ -86,7 +86,7 @@ minisrv-no-mail-count: true
Content-Type: text/html`;
if (client_challenge_response) {
headers += `
wtv-encrypted: true`;
wtv-encrypted: ${(request_headers['wtv-encrypted']) ? wtvshared.parseBool(request_headers['wtv-encrypted']) : true}`;
if (wtvsec_login) session_data.data_store.wtvsec_login.update_ticket = true;
}
if (limitedLoginRegistered && session_data.getUserPasswordEnabled()) gourl = "wtv-head-waiter:/password?";

View File

@@ -1,17 +1,19 @@
var minisrv_service_file = true;
var gourl = null;
var bootrom = parseInt(session_data.get("wtv-client-bootrom-version"));
if (!session_data.isRegistered() && (!request_headers.query.guest_login || !minisrv_config.config.allow_guests)) gourl = "wtv-register:/splash?";
var home_url = "wtv-home:/home?";
if (gourl) {
headers = `200 OK
wtv-open-isp-disabled: false
`;
headers = "200 OK\n";
if (bootrom !== 0) headers += "wtv-open-isp-disabled: false\n";
if (!session_data.isRegistered() && (!request_headers.query.guest_login || !minisrv_config.config.allow_guests)) {
// fake logged in for reg
session_data.setUserLoggedIn(true);
headers += `wtv-encrypted: true
headers += `wtv-encrypted: ${(request_headers['wtv-encrypted']) ? wtvshared.parseBool(request_headers['wtv-encrypted']) : true}
${getServiceString('wtv-register')}
${getServiceString('wtv-head-waiter')}
${getServiceString('wtv-star')}
@@ -91,13 +93,16 @@ wtv-client-date: `+ strftime("%a, %d %b %Y %H:%M:%S", new Date(new Date().toUTCS
wtv-country: US
wtv-language-header: en-US,en
wtv-noback-all: wtv-
wtv-visit: client:closeallpanels
wtv-expire-all: client:closeallpanels
wtv-transition-override: off
wtv-smartcard-inserted-message: Contacting service
wtv-ssl-timeout: 240
wtv-login-timeout: 7200
`;
if (bootrom !== 0) {
headers += `wtv-visit: client:closeallpanels
wtv-expire-all: client:closeallpanels
`;
}
if (!limitedLogin && !limitedLoginRegistered) {
session_data.assignMailStore();
headers += getServiceString('all', { "exceptions": ["wtv-register"] });
@@ -175,11 +180,11 @@ wtv-inactive-timeout: 1440
wtv-show-time-enabled: true
wtv-allow-dsc: true
wtv-tourist-enabled: true
wtv-open-isp-disabled: false
wtv-offline-mail-enable: false
wtv-demo-mode: 0
wtv-wink-deferrer-retries: 3
wtv-name-server: 8.8.8.8`;
if (bootrom !== 0) { headers += "\nwtv-open-isp-disabled: false" }
}
}
if (!request_headers.query.reconnect) headers += "\nwtv-visit: " + gourl;

View File

@@ -9,7 +9,8 @@ if (request_headers.query.relogin) gourl += "relogin=true";
else if (request_headers.query.reconnect) gourl += "reconnect=true";
else gourl += "initial_login=true"
if (request_headers.query.guest_login) {
var bootrom = parseInt(session_data.get("wtv-client-bootrom-version"));
if (request_headers.query.guest_login || bootrom === 0) {
if (gourl.substr(-1) != "?") gourl += "&";
gourl += "guest_login=true";
if (request_headers.query.skip_splash) gourl += "&skip_splash=true";

View File

@@ -1,392 +1,302 @@
var minisrv_service_file = true;
if (request_headers.query.url) {
headers = `300 OK
Location: ${request_headers.query.url}`;
} else {
headers = `200 OK
headers =`200 OK
Connection: Keep-Alive
wtv-expire-all: wtv-home:/splash
wtv-expire-all: wtv-flashrom:
Content-type: text/html`
var cryptstatus = (wtv_encrypted ? "Encrypted" : "Not Encrypted")
var comp_type = wtvmime.shouldWeCompress(session_data, 'text/html');
var compstatus = "uncompressed";
switch (comp_type) {
case 1:
compstatus = "wtv-lzpf";
break;
case 2:
compstatus = "gzip (level 9)";
break;
}
var unread_mailcount = session_data.mailstore.countUnreadMessages(0)
var mailbox_gif_num = 0; // no messages
if (unread_mailcount > 0) {
if (unread_mailcount == 1) mailbox_gif_num = 1;
else mailbox_gif_num = 2;
}
data = `<HTML>
<HEAD>
<TITLE>Home for ${session_data.getSessionData("subscriber_username") || "minisrv"}</TITLE>
<DISPLAY noscroll fontsize="medium">
</HEAD>
<body background="wtv-home:/images/BackgroundGradient_dark.gif" text="44cc55" link="36d5ff" vlink="36d5ff" hspace=0 vspace=0 >
<sidebar width=138>
<table cellspacing=0 cellpadding=0 bgcolor="202020" gradcolor=080808>
<!-- BEGIN LOGO SPAN -->
<tr>
<td width=138 absheight=112 valign=top align=center>
<img src="file://rom/Images/Spacer.gif" width=1 height=9><br>
<a HREF="client:showservices">
<img src="file://rom/Images/Spacer.gif" width=1 height=2>
<img src="${minisrv_config.config.service_logo}"" width=127 height=98>
</A>
<!-- BEGIN SEPARATOR -->
<tr>
<td absheight=5>
<table cellspacing=0 cellpadding=0>
<tr>
<td abswidth=138 absheight=2 valign=middle align=center bgcolor="000000">
<img src="file://rom/Images/Spacer.gif" width=1 height=1>
<tr>
<td abswidth=138 absheight=1 valign=top align=left>
<tr>
<td abswidth=138 absheight=2 valign=top align=left bgcolor="181818">
<img src="file://rom/Images/Spacer.gif" width=1 height=1>
</table>
<!-- END LOGO SPAN -->
<!-- BEGIN SPAN -->
<tr>
<td absheight=25>
<table cellspacing=0 cellpadding=0>
<tr>
<td height=2>
<tr>
<td abswidth=7>
<td abswidth=125>
<table cellspacing=0 cellpadding=0 href="client:relogin">
<tr>
<td>
<table cellspacing=0 cellpadding=0>
<tr>
<td>
<shadow><font size=3 color=e7ce4a>Login</font></shadow>
</table>
</table>
<td abswidth=6>
</table>
<!-- BEGIN SEPARATOR -->
<tr>
<td absheight=5>
<table cellspacing=0 cellpadding=0>
<tr>
<td abswidth=138 absheight=2 valign=middle align=center bgcolor="000000">
<img src="file://rom/Images/Spacer.gif" width=1 height=1>
<tr>
<td abswidth=138 absheight=1 valign=top align=left>
<tr>
<td abswidth=138 absheight=2 valign=top align=left bgcolor="181818">
<img src="file://rom/Images/Spacer.gif" width=1 height=1>
</table>
<!-- END SPAN -->
<!-- BEGIN SPAN -->
<tr>
<td absheight=25>
<table cellspacing=0 cellpadding=0>
<tr>
<td height=2>
<tr>
<td abswidth=7>
<td abswidth=125>
<table cellspacing=0 cellpadding=0 href="wtv-setup:/setup">
<tr>
<td>
<table cellspacing=0 cellpadding=0>
<tr>
<td>
<shadow><font size=3 color=e7ce4a>Setup</font></shadow>
</table>
</table>
<td abswidth=6>
</table>
<!-- BEGIN SEPARATOR -->
<tr>
<td absheight=5>
<table cellspacing=0 cellpadding=0>
<tr>
<td abswidth=138 absheight=2 valign=middle align=center bgcolor="000000">
<img src="file://rom/Images/Spacer.gif" width=1 height=1>
<tr>
<td abswidth=138 absheight=1 valign=top align=left>
<tr>
<td abswidth=138 absheight=2 valign=top align=left bgcolor="181818">
<img src="file://rom/Images/Spacer.gif" width=1 height=1>
</table>
<!-- END SPAN -->
<!-- BEGIN SPAN -->
<tr>
<td absheight=25>
<table cellspacing=0 cellpadding=0>
<tr>
<td height=2>
<tr>
<td abswidth=7>
<td abswidth=125>
<table cellspacing=0 cellpadding=0 href="wtv-news:/lobby">
<tr>
<td>
<table cellspacing=0 cellpadding=0>
<tr>
<td>
<shadow><font size=3 color=e7ce4a>Discuss</font></shadow>
</table>
</table>
<td abswidth=6>
</table>
<!-- BEGIN SEPARATOR -->
<!-- BEGIN SEPARATOR -->
<tr>
<td absheight=5>
<table cellspacing=0 cellpadding=0>
<tr>
<td abswidth=138 absheight=2 valign=middle align=center bgcolor="000000">
<img src="file://rom/Images/Spacer.gif" width=1 height=1>
<tr>
<td abswidth=138 absheight=1 valign=top align=left>
<tr>
<td abswidth=138 absheight=2 valign=top align=left bgcolor="181818">
<img src="file://rom/Images/Spacer.gif" width=1 height=1>
</table>
<!-- END SPAN -->
`;
data += `
<!-- BEGIN SPAN -->
<tr>
<td absheight=25>
<table cellspacing=0 cellpadding=0>
<tr>
<td height=2>
<tr>
<td abswidth=7>
<td abswidth=125>
<table cellspacing=0 cellpadding=0 href="wtv-guide:/help?topic=Index&subtopic=Glossary">
<tr>
<td>
<table cellspacing=0 cellpadding=0>
<tr>
<td>
<shadow><font size=3 color=e7ce4a>Help</font> <font size=-2 color=e7ce4a><sup>(WIP)</sup></font></shadow>
</table>
</table>
<td abswidth=6>
</table>
<!-- BEGIN SEPARATOR -->
<tr>
<td absheight=5>
<table cellspacing=0 cellpadding=0>
<tr>
<td abswidth=138 absheight=2 valign=middle align=center bgcolor="000000">
<img src="file://rom/Images/Spacer.gif" width=1 height=1>
<tr>
<td abswidth=138 absheight=1 valign=top align=left>
<tr>
<td abswidth=138 absheight=2 valign=top align=left bgcolor="181818">
<img src="file://rom/Images/Spacer.gif" width=1 height=1>
</table>
<!-- END SPAN -->
<!-- ADJUST ME FOR HOME TEXT HEIGHT -->
<tr>
<td absheight=28>
<tr>
<td align=right>
<img src="wtv-home:/images/HomeBanner_dark.gif" width=48 height=126>
<tr>
<td absheight=5>
</table>
</sidebar>
<table cellspacing=0 cellpadding=0 width=100% height=383>
<tr>
<td rowspan=10 background="wtv-home:/images/BackgroundGradientEdge_dark.gif" width=6 height=100%>
<tr>
<td valign=top absheight=113>
<table cellspacing=0 cellpadding=0 width=100%>
<tr>
<!-- BEGIN ICON #1 -->
<td width=9%>
<td absheight=113 width=18%>
<LINK REL=next HREF="wtv-mail:/listmail">
<table cellspacing=0 cellpadding=0 border=0 href="wtv-mail:/listmail" selected nocolor width=100%>
<tr>
<td height=10>
<tr>
<td align=center>
<img src="file://ROMCache/OpenMailbox${mailbox_gif_num}.gif" border=0 width=61 height=52>
<tr>
<td height=4>
<tr>
<td valign=bottom>
<table cellspacing=0 cellpadding=0 width=100%>
<tr>
<td align=center>
<font size=3 color=#36d5ff>Mail</font>
</table>
</table>
<!-- BEGIN ICON #2 -->
<td width=6%>
<td absheight=113 width=22%>
<table cellspacing=0 cellpadding=0 border=0 href="wtv-favorite:/favorite" nocolor>
<tr>
<td height=12>
<tr>
<td align=center>
<img src="file://ROMCache/TreasureChest1.gif" border=0 width=92 height=52>
<tr>
<td height=2>
<tr>
<td valign=bottom>
<table cellspacing=0 cellpadding=0 width=100%>
<tr>
<td align=center>
<font size=3 color=#36d5ff>Favorites</font>
</table>
</table>
<!-- BEGIN ICON #3 -->
<td width=5%>
<td absheight=113 width=19%>
<table cellspacing=0 cellpadding=0 border=0 href="wtv-flashrom:/willie" nocolor>
<tr>
<td height=5>
<tr>
<td align=center>
<img src="wtv-home:/images/rom.gif" border=0 width=68 height=59>
<tr>
<td height=2>
<tr>
<td valign=bottom>
<table cellspacing=0 cellpadding=0 width=100%>
<tr>
<td align=center>
<font size=3 color=#36d5ff>Flashroms</font>
</table>
</table>
<!-- BEGIN ICON #4 -->
<td absheight=113 width=3%>
<td absheight=113 width=20%>
<table cellspacing=0 cellpadding=0 border=0 href="http://duckduckgo.com/lite/" nocolor>
<tr>
<td height=12>
<tr>
<td align=center>
<img src="file://ROMCache/Binoculars0.gif" border=0 width=80 height=51>
<tr>
<td height=2>
<tr>
<td valign=bottom>
<table cellspacing=0 cellpadding=0 width=100%>
<tr>
<td align=center>
<font size=3 color=#36d5ff>Search</font>
</table>
</table>
<td width=9%>
</table>
<tr>
<td valign=middle align=center>
<!-- BEGIN MAIN SUB-CONTENT AREA -->
<table cellspacing=0 cellpadding=0 width=480>
<tr>
<td abswidth=100% absheight=18 align=center>
<font size="2"><b>Welcome to ${minisrv_config.config.service_name}`;
if (session_data.getSessionData("registered")) data += ", " + session_data.getSessionData("subscriber_username") + "!";
data += `</font></b>
<tr>
<td width=100% align=center absheight=2 bgcolor="000000">
<tr>
<td abswidth=100% absheight=16 valign=middle align=center>
<font size="small"><b>Status</b>: ${cryptstatus} (${compstatus})</font>
<tr>
<td width=100% align=center absheight=2 bgcolor="000000">
<tr>
<td abswidth=100% absheight=150 valign=top align=left>
<br>
<h4>&nbsp; Main Menu</h4>
<ul>
<font size="2"><li><a href="wtv-admin:/admin">wtv-admin</a> <sup>new!</sup></li>
`;
if (session_data.hasCap("client-can-do-chat")) {
data += "<li><a href=\"wtv-chat:/home\">IRC Chat Test</a></li>\n"
}
if (session_data.hasCap("client-has-disk")) {
// only show disk stuff if client has disk
data += "<li><a href=\"client:diskhax\">DiskHax</a> ~ <a href=\"client:vfathax\">VFatHax</a></li>\n";
if (session_data.hasCap("client-can-do-macromedia-flash2")) {
// only show demo if client can do flash2
data += "<li>Old DealerDemo: <a href=\"wtv-disk:/sync?group=DealerDemo&diskmap=DealerDemo\">Download</a> ~ <a href=\"file://Disk/Demo/index.html\">Access</a></li>\n";
}
}
data += `</ul></font>`;
// for development
if (fs.existsSync(service_vaults[0] + "/" + service_name + "/home.zefie.html")) {
data += fs.readFileSync(service_vaults[0] + "/" + service_name + "/home.zefie.html", { 'encoding': 'utf8' });
}
data += `</table>
<tr>
<td width=100% absheight=28>
<tr>
<td width=100% align=center absheight=2 bgcolor="000000">
<tr>
<td width=100% align=center absheight=22>
<font size="-4"><b>Connection Speed</b>: &rate;</font>
<tr>
<td width=100% align=center absheight=2 bgcolor="000000">
<tr>
<td width=100% align=right absheight=20>
<font size="-4"><i>minisrv v${minisrv_config.version}${(minisrv_config.config.git_commit) ? ' git-' + minisrv_config.config.git_commit : ''}, hosted by ${minisrv_config.config.service_owner}</i></small></font> &nbsp; <br>
<tr>
<td width=100% align=center absheight=2 bgcolor="000000">
</table>
</table>
</body>
</html>`
var cryptstatus = (wtv_encrypted ? "Encrypted" : "Not Encrypted")
var comp_type = wtvmime.shouldWeCompress(socket.ssid,'text/html');
var compstatus = "uncompressed";
switch (comp_type) {
case 1:
compstatus = "wtv-lzpf";
break;
case 2:
compstatus = "gzip (level 9)";
break;
}
var wtv_system_sysconfig = session_data.get("wtv-system-sysconfig");
var wtv_client_bootrom_version = session_data.get("wtv-client-bootrom-version");
var wtv_system_chipversion_str = session_data.get("wtv-system-chipversion");
var notImplementedAlert = new clientShowAlert({
'image': minisrv_config.config.service_logo,
'message': "This feature is not available.",
'buttonlabel1': "Okay",
'buttonaction1': "client:donothing",
'noback': true,
}).getURL();
var notAdminAlert = new clientShowAlert({
'image': minisrv_config.config.service_logo,
'message': "Sorry, you are not configured as an admin on this server.<br><br>If you are the server operator, please<br> see <strong>user_config.example.json</strong><br> for an example on how to configure yourself as an administrator.",
'buttonlabel1': "Ugh, fine.",
'buttonaction1': "client:donothing",
'noback': true,
}).getURL();
var ownMinisrv = new clientShowAlert({
'image': minisrv_config.config.service_logo,
'message': "To run your own minisrv, please visit the following link on your PC:<br><br><strong>https://zef.pw/minisrv</strong>",
'buttonlabel1': "Okay",
'buttonaction1': "client:donothing",
'noback': true,
}).getURL();
var supportZefieAlert = new clientShowAlert({
'image': minisrv_config.config.service_logo,
'message': "If you would like to support zefie or minisrv, please visit the following link on your PC:<br><br><font size=-1><strong>https://zef.pw/helpminisrv</strong></font>",
'buttonlabel1': "Okay",
'buttonaction1': "client:donothing",
'noback': true,
}).getURL();
data =`\0<html>
<head>
<display hspace=0 vspace=0 fontsize=small noscroll showwhencomplete>
<title>
Home for ${session_data.getSessionData("subscriber_username") || "minisrv"}
</title>
</head>
<body bgcolor="#3C2F47" link=#BBAEC8 text="ffffff" vlink=AA9DB7>
<table border=0 cellspacing=0 cellpadding=0 width="100%" height="60" >
<tr>
<td>
<td align="left"><img src="images/proto3/HomeTopLeftEdge.gif"></td>
<td valign="top">
<table border=0 cellspacing=0 cellpadding=0>
<tr>
<td colspan=4 valign="top"><img src="images/proto3/HomeTopEdge.gif">
</tr>
<tr><td height=5 colspan=4>
</tr>
<tr><td></TD>
</tr>
<tr><td height=3 colspan=4>
</tr>
<tr>
<td align="left">
<font color=#EEEEEE>&nbsp;<b>WebTV URL, FILE, and CLIENT Access:</b></font>
<table border=0 cellspacing=0 cellpadding=0>
<tr>
<td width="380">
<form name="urlaccess">
&nbsp;<input type="text" name="visitsite" value="wtv-" border="1" bgcolor="#BBAEC8" text="#423852" cursor="#423852" align="center" width="314" executeurl autoactivate>
<input type="submit" value="Go" width=20>
</form>
</td>
</tr>
</table>
<td>
<td width=5>
</tr>
</table>
</td>
</tr>
</table>
<table background="images/proto3/HomeTaskBar.gif" bgcolor="#9486A1" border=0 width="" height="25">
<tr>
<td abswidth=1><spacer type=block height=3 width=1>
<td abswidth=50 bgcolor="#3C2F47" href="wtv-mail:/listmail" align="center"><spacer type=block height=3 width=100%><font color="#EEEEEE"><b>Mail</b></font>
<td abswidth=2><img src="images/proto3/HomeTaskBarDividers.gif">
<td abswidth=86 bgcolor="#3C2F47" href="wtv-favorite:/favorite" align="center"><spacer type=block height=3 width=100%><font color="#EEEEEE"><b>Favorites</b></font>
<td abswidth=2><img src="images/proto3/HomeTaskBarDividers.gif">
<td abswidth=70 bgcolor="#3C2F47" href="wtv-setup:/sound" align="center"><spacer type=block height=3 width=100%><font color="#EEEEEE"><b>Music</b></font>
<td abswidth=2><img src="images/proto3/HomeTaskBarDividers.gif">
<td abswidth=74 bgcolor="#3C2F47" href="http://frogfind.com" align="center"><spacer type=block height=3 width=100%><font color="#EEEEEE"><b>Search</b></font>
<td abswidth=2><img src="images/proto3/HomeTaskBarDividers.gif">
<td abswidth=60 bgcolor="#3C2F47" href="wtv-flashrom:/willie" align="center"><spacer type=block height=3 width=100%><font color="#EEEEEE"><b>ROMs</b></font>
<td abswidth=2><img src="images/proto3/HomeTaskBarDividers.gif">
<td abswidth=86 bgcolor="#3C2F47" href="wtv-setup:/setup" align="center"><spacer type=block height=3 width=100%><font color="#EEEEEE"><b>Settings</b></font>
<td abswidth=2><img src="images/proto3/HomeTaskBarDividers.gif">
<td abswidth=50 bgcolor="#3C2F47" href="wtv-guide:/help?topic=Index&subtopic=Glossary" align="center"><spacer type=block height=3 width=100%><font color="#EEEEEE"><b>Help</b></font>
</table>
<table border=0 bgcolor="#3C2F47">
<tr>
<td valign="top">
<table border=0>
<tr>
<td colspan=3>
<table bgcolor="#BBAEC8" border=0 cellspacing=0 cellpadding=0>
<tr>
<td background="images/proto3/HomeColumn3Header.gif" abswidth="6">
<td abswidth=125 colspan=2 background="images/proto3/HomeColumn3Header.gif" valign="middle" absheight="26"><font size=2 color="#EEEEEE"><b>&#187; Community &#171;</b></font>
<tr>
<td colspan=3 height=7>
<tr>
<td abswidth="6">
<td href="wtv-chat:/home" height="18" valign="middle" bgcolor="#BBAEC8"><font color="#454C73">&#128;&nbsp;</font><font color="#000000">Chat</font>
<tr>
<td absheight="3">
<tr>
<td abswidth="6">
<td href="wtv-news:/lobby" height="18" valign="middle" bgcolor="#BBAEC8"><font color="#454C73">&#128;&nbsp;</font><font color="#000000">Discuss</font>
<td abswidth="15">
<tr>
<td absheight="3">
<tr>
<td abswidth="6">
<td href="wtv-setup:/messenger" height="21" valign="middle" bgcolor="#BBAEC8"><font color="#454C73">&#128;&nbsp;</font><font color="#000000">Messenger</font>
<td abswidth="15">
<tr>
<td absheight="5">
</table>
<tr>
<td valign="top" colspan=3>
<table bgcolor="#BBAEC8" border=0 cellspacing=0 cellpadding=0>
<tr>
<td background="images/proto3/HomeColumn3Header.gif" abswidth="6">
<td abswidth=125 colspan=2 background="images/proto3/HomeColumn3Header.gif" valign="middle" absheight="26" valign="top"><font size=2 color="#EEEEEE"><b>&#187; Account &#171;</b></font>
<tr>
<td colspan=3 height=7>
<tr>
<td abswidth="6">
<td href="client:relogin" height="21" valign="middle" bgcolor="#BBAEC8"><font color="#454C73">&#128;&nbsp;</font><font color="#000000">Relogin</font>
<td abswidth="6">
<tr>
<td absheight="3">
<tr>
<td abswidth="6">
<td href="wtv-setup:/serve-billing-overview" height="21" valign="middle" bgcolor="#BBAEC8"><font color="#454C73">&#128;&nbsp;</font><font color="#000000">Configure</font>
<td abswidth="6">
<tr>
<td absheight="3">
<tr>
<td abswidth="6">
<td href="wtv-setup:/edit-password" height="21" valign="middle" bgcolor="#BBAEC8"><font color="#454C73">&#128;&nbsp;</font><font color="#000000">Password</font>
<td abswidth="6">
<tr>
<td absheight="3">
<tr>
<td abswidth="6">
<td href="wtv-setup:/accounts" height="21" valign="middle" bgcolor="#BBAEC8"><font color="#454C73">&#128;&nbsp;</font><font color="#000000">Add User</font>
<td abswidth="6">
<tr>
<td absheight="3">
<tr>
<td abswidth="6">
`;
if (session_data.getSessionData("registered")) data += `<td href="wtv-tricks:/unregister" height="21" valign="middle" bgcolor="#BBAEC8"><font color="#454C73">&#128;&nbsp;</font><font color="#000000">Unregister</font>`;
else data += `<td href="wtv-tricks:/register" height="21" valign="middle" bgcolor="#BBAEC8"><font color="#454C73">&#128;&nbsp;</font><font color="#000000">Register</font>`
data += `
<td abswidth="6">
<tr>
<td absheight="3">
</table>
</table>
<td valign="top">
<table border=0 width=100%>
<tr>
<td align="left" colspan=4>
<table border=0 cellspacing=0 cellpadding=0 width="100%">
<tr>
<td background="images/proto3/HomeColumn3Header.gif" abswidth="6">
<td colspan=2 background="images/proto3/HomeColumn3Header.gif" valign="middle" absheight="24"><font color="#EEEEEE"><spacer type=block height=3 width=100%><b> &#128; Welcome to zefie's minisrv ${minisrv_version_string.split(" ")[3]}</b></font>
<tr>
<td absheight="6">
<tr>
<td valign="top" colspan=3 absheight=63>
This server is operated by ${minisrv_config.config.service_owner}.
</table>
<tr>
<td align="left" colspan=4>
<table border=0 cellspacing=0 cellpadding=0 width="100%">
<tr>
<td height=6> <tr>
<td background="images/proto3/HomeColumn3Header.gif" abswidth="6">
<td colspan=2 background="images/proto3/HomeColumn3Header.gif" valign="middle" absheight="24"><font color="#EEEEEE"><spacer type=block height=3 width=100%><b> &#128; minisrv Latest Updates</b></font>
<tr>
<td absheight="6">
<tr>
<td valign="top" colspan=4 absheight=80 >
&#149;&nbsp; Added a <a href="wtv-tricks:/charmap">WebTV Character Map</a><br>
&#149;&nbsp; Redesigned homepage based on MattMan69's HackTV<br>
&#149;&nbsp; Added a new minisrv logo<br>
</table>
</table>
<td valign="top">
<table border=0 width=160>
<tr>
<td valign="top" colspan=3>
<table bgcolor="#BBAEC8" border=0 cellspacing=0 cellpadding=0>
<tr>
<td background="images/proto3/HomeColumn3Header.gif" abswidth="6">
<td abswidth=125 colspan=2 background="images/proto3/HomeColumn3Header.gif" valign="middle" absheight="24" valign="top"><font size=2 color="#EEEEEE"><b>&#187; Tools &#171;</b></font>
<tr>
<td colspan=3 height=6>
<tr>
<td abswidth="6">
<td href="wtv-tricks:/tricks" height="21" valign="middle" bgcolor="#BBAEC8"><font color="#454C73">&#128;&nbsp;</font><font color="#000000">WTV Tricks</font>
<td abswidth="6">
<tr>
<td absheight="3">
<tr>
<td abswidth="6">
<td href="${(wtvshared.isAdmin(session_data)) ? "wtv-admin:/admin" : notAdminAlert}" height="21" valign="middle" bgcolor="#BBAEC8"><font color="#454C73">&#128;&nbsp;</font><font color="#000000">WTV Admin</font>
<td abswidth="6">
<tr>
<td absheight="3">
<tr>
<td abswidth="6">
<td href="wtv-tricks:/blastbacklist?return_to=wtv-home:/home" height="21" valign="middle" bgcolor="#BBAEC8"><font color="#454C73">&#128;&nbsp;</font><font color="#000000">Clear Cache</font>
<td abswidth="6">
<tr>
<td absheight="3">
</table>
<tr>
<td valign="top" colspan=3>
<table bgcolor="#BBAEC8" border=0 cellspacing=0 cellpadding=0>
<tr>
<td background="images/proto3/HomeColumn3Header.gif" abswidth="6">
<td abswidth=125 colspan=2 background="images/proto3/HomeColumn3Header.gif" valign="middle" absheight="24" valign="top"><font size=2 color="#EEEEEE"><b>&#187; More Stuff &#171;</b></font>
<tr>
<td colspan=3 height=7>
<tr>
<td abswidth="6">
<td href="wtv-tricks:/cSetup" height="21" valign="middle" bgcolor="#BBAEC8"><font color="#454C73">&#128;&nbsp;</font><font color="#000000">Switch<br>&nbsp;&nbsp; server</font>
<td abswidth="6">
<tr>
<td absheight="5">
<tr>
<td abswidth="6">
<td href="${ownMinisrv}" height="21" valign="middle" bgcolor="#BBAEC8"><font color="#454C73">&#128;&nbsp;</font><font color="#000000">Run your<br>&nbsp;&nbsp; own server</font>
<td abswidth="6">
<tr>
<td absheight="5">
<tr>
<td abswidth="6">
<td href="http://archive.midnightchannel.net/zefie/media/" height="21" valign="middle" bgcolor="#BBAEC8"><font color="#454C73">&#128;&nbsp;</font><font color="#000000">Midnight<br>&nbsp;&nbsp; Archives</font>
<td abswidth="15">
<tr>
<td absheight="4">
<tr>
<td abswidth="6">
<td href="${supportZefieAlert}" height="21" valign="middle" bgcolor="#BBAEC8"><font color="#454C73">&#128;&nbsp;</font><font color="#000000">Help zefie</font>
<td abswidth="15">
<tr>
<td absheight="3">
</table>
</table>
</table>
`
data += "</body>\n</html>";

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 647 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 655 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 B

View File

@@ -20,9 +20,14 @@ if (request_headers.query.sanitize) {
if (data.indexOf("<html>") >= 0) {
data = wtvshared.sanitizeSignature(data).replace("<html>", `<html><body bgcolor=${message_colors.bgcolor} text=${message_colors.text} link=${message_colors.link} vlink=${message_colors.vlink} vspace=0 hspace=0>`);
} else {
data = `<body bgcolor=${message_colors.bgcolor} text=${message_colors.text} link=${message_colors.link} vlink=${message_colors.vlink} vspace=0 hspace=0>\n${data}`;
data = `<body bgcolor=${message_colors.bgcolor} text=${message_colors.text} link=${message_colors.link} vlink=${message_colors.vlink} vspace=0 hspace=0>\n${wtvshared.sanitizeSignature(data)}`;
}
if (request_headers.query.showdemotext) {
data += `<br>
<hr>This is a preview of your signature. The text below the line will not appear in your outgoing messages.
It is provided to demonstrate what a message composed with this signature may look like.
<a href="client:donothing">This is what a link looks like</a>`;
}
if (request_headers.query.demotext) data += "<br>" + request_headers.query.demotext;
}
if (!errpage) {
headers = `200 OK

View File

@@ -302,7 +302,7 @@ ${message_font_close}
<td abswidth=5>
<td abswidth=225 maxlines=1>
${message_font_open}
${(message.subject) ? message.subject : "(No Subject)"}
${(message.subject) ? wtvshared.htmlEntitize(message.subject) : "(No Subject)"}
${message_font_close}
<td abswidth=5>
<td abswidth=47 maxlines=1>

View File

@@ -274,7 +274,7 @@ ${(message.subject) ? wtvshared.htmlEntitize(message.subject) : '(No subject)'}
if (typeof message.body === "object" && message.body) {
message.body = wtvshared.decodeBufferText(message.body);
}
message.body = message.body.replace(/\n/g, "<br><br>");
if (message.body) message.body = message.body.replace(/\n/g, "<br><br>");
data += `${(message.allow_html) ? message.body : wtvshared.htmlEntitize(message.body, true)}
<br>
<br>`;

View File

@@ -6,6 +6,7 @@ var intro_seen = session_data.mailstore.checkMailIntroSeen();
if (!intro_seen && !request_headers.query.intro_seen) {
// user is trying to bypass the intro screen
headers = "300 OK\nLocation: wtv-mail:/DiplomaMail?came-from=" + encodeURIComponent(request_headers.request_url);
} else if (request_headers.query.clear == "true") {
} else if (request_headers.query.clear == "true") {
if (request_headers.Referer)
gourl = request_headers.Referer.replace(/[\?\&]clear\=true/, '');
@@ -62,8 +63,8 @@ Location: ${gourl}`;
reply_message = session_data.mailstore.getMessageByID(request_headers.query.message_reply_id);
if (reply_message) {
msg_subject = "Re: " + reply_message.subject;
to_addr = reply_message.to_addr;
to_name = reply_message.to_name;
to_addr = reply_message.from_addr;
to_name = reply_message.from_name;
}
}
}
@@ -125,7 +126,7 @@ Content-Type: audio/wav`;
var username = session_data.getSessionData("subscriber_username");
var userdisplayname = wtvshared.htmlEntitize(session_data.getSessionData("subscriber_name"));
var address = username + "@" + minisrv_config.config.domain_name
var address = username + "@" + minisrv_config.config.service_name //minisrv_config.config.domain_name
var notImplementedAlert = new clientShowAlert({
'image': minisrv_config.config.service_logo,
'message': "This feature is not available.",

View File

@@ -252,7 +252,6 @@ ${page_start}-${page_end}
<td height=6>
</TABLE>`
if (NGCount > 0) {
Object.keys(messages).forEach(function (k) {
var message = messages[k].article;
var has_relation = (messages[k].relation !== null) ? true : false;
@@ -267,7 +266,7 @@ ${page_start}-${page_end}
<tr>
${(has_relation) ? `<td abswidth=20 rowspan=2 valign=top><font size="+2">&#149;` : ''}
<td abswidth=426 maxlines=1>
<font color=1bb0f1>${(message.headers.SUBJECT) ? message.headers.SUBJECT : "(No Subject)"}
<font color=1bb0f1>${(message.headers.SUBJECT) ? wtvshared.htmlEntitize(message.headers.SUBJECT) : "(No Subject)"}
<tr>
<td maxlines=1>
<font size="-1" color=544f53><b>
@@ -335,6 +334,7 @@ wtv-expire-all: wtv-news:/news?group=${group}&article=`;
var message_body = message.text;
var attachments = null;
var signature_index = null;
wtvnews.debug(message);
if (message.attachments) attachments = message.attachments;
if (attachments) {
if (Object.keys(attachments).length > 0) {
@@ -345,7 +345,7 @@ wtv-expire-all: wtv-news:/news?group=${group}&article=`;
return false;
}
});
attachments.splice(signature_index, 1);
if (signature_index) attachments.splice(signature_index, 1);
}
}
if (signature) message_colors = session_data.mailstore.getSignatureColors(signature);

View File

@@ -1,4 +1,5 @@
var minisrv_service_file = true;
session_data.data_store.wtvsec_login.PrepareTicket();
headers = `300 Moved
Connection: Close

View File

@@ -1,5 +1,6 @@
var minisrv_service_file = true;
if (!request_headers.query.registering ||
!request_headers.query.subscriber_name ||
!request_headers.query.subscriber_username ||
@@ -8,40 +9,52 @@ if (!request_headers.query.registering ||
!session_data.session_store ||
!session_data ||
!socket.ssid
) {
) {
var errpage = wtvshared.doErrorPage(400);
headers = errpage[0];
data = errpage[1];
} else {
session_data.setSessionData("subscriber_name", request_headers.query.subscriber_name);
session_data.setSessionData("subscriber_username", request_headers.query.subscriber_username);
session_data.setSessionData("subscriber_contact", request_headers.query.subscriber_contact);
session_data.setSessionData("subscriber_contact_method", request_headers.query.subscriber_contact_method);
session_data.setSessionData("subscriber_userid", 0);
session_data.setSessionData("registered", true);
var mailstore_exists = session_data.mailstore.mailstoreExists();
var mailbox_exists = false;
if (!mailstore_exists) mailstore_exists = session_data.mailstore.createMailstore();
if (mailstore_exists) {
if (!session_data.mailstore.mailboxExists(0)) {
// mailbox does not yet exist, create it
mailbox_exists = session_data.mailstore.createMailbox(0);
}
if (mailbox_exists) {
// Just created Inbox for the first time, so create the welcome message
session_data.mailstore.createWelcomeMessage();
}
}
if (!session_data.saveSessionData(true, true)) {
var errpage = wtvshared.doErrorPage(400);
var errpage = null;
const WTVRegister = require(classPath + "/WTVRegister.js")
var wtvr = new WTVRegister(minisrv_config, SessionStore);
if (!request_headers.query.subscriber_username) errpage = wtvshared.doErrorPage(400, "Please enter a username.");
else if (request_headers.query.subscriber_username.length < minisrv_config.config.user_accounts.min_username_length) errpage = wtvshared.doErrorPage(400, "Please choose a username with <b>" + minisrv_config.config.user_accounts.min_username_length + "</b> or more characters.");
else if (request_headers.query.subscriber_username.length > minisrv_config.config.user_accounts.max_username_length) errpage = wtvshared.doErrorPage(400, "Please choose a username with <b>" + minisrv_config.config.user_accounts.max_username_length + "</b> or less characters.");
else if (!wtvr.checkUsernameSanity(request_headers.query.subscriber_username)) errpage = wtvshared.doErrorPage(400, "The username you have chosen contains invalid characters. Please choose a username with only <b>letters</b>, <b>numbers</b>, <b>_</b> or <b>-</b>. Also, please be sure your username begins with a letter.");
else if (!wtvr.checkUsernameAvailable(request_headers.query.subscriber_username)) errpage = wtvshared.doErrorPage(400, "The username you have selected is already in use. Please select another username.");
if (errpage) {
headers = errpage[0];
data = errpage[1];
} else {
session_data.setSessionData("subscriber_name", request_headers.query.subscriber_name);
session_data.setSessionData("subscriber_username", request_headers.query.subscriber_username);
session_data.setSessionData("subscriber_contact", request_headers.query.subscriber_contact);
session_data.setSessionData("subscriber_contact_method", request_headers.query.subscriber_contact_method);
session_data.setSessionData("subscriber_userid", 0);
session_data.setSessionData("registered", true);
var mailstore_exists = session_data.mailstore.mailstoreExists();
var mailbox_exists = false;
if (!mailstore_exists) mailstore_exists = session_data.mailstore.createMailstore();
if (mailstore_exists) {
if (!session_data.mailstore.mailboxExists(0)) {
// mailbox does not yet exist, create it
mailbox_exists = session_data.mailstore.createMailbox(0);
}
if (mailbox_exists) {
// Just created Inbox for the first time, so create the welcome message
session_data.mailstore.createWelcomeMessage();
}
}
if (!session_data.saveSessionData(true, true)) {
var errpage = wtvshared.doErrorPage(400);
headers = errpage[0];
data = errpage[1];
} else {
headers = `200 OK
headers = `200 OK
Content-Type: text/html`;
data = `<html>
data = `<html>
<head>
<title>
Finished signing up
@@ -110,5 +123,6 @@ connect to the Internet by choosing
</body>
</html>
`;
}
}
}

View File

@@ -1,7 +1,6 @@
var minisrv_service_file = true;
var errpage = null;
const WTVRegister = require(classPath + "/WTVRegister.js")
const wtvr = new WTVRegister(minisrv_config, SessionStore);
if (session_data.user_id != 0) errpage = wtvshared.doErrorPage(400, "You are not authorized to add users to this account.");

View File

@@ -19,7 +19,9 @@ if (session_data.user_id != 0 && session_data.user_id != request_headers.query.u
if (user_id != null) {
headers = `200 OK
Connection: Keep-Alive
Content-Type: text/html`
Content-Type: text/html
wtv-expire-all: wtv-setup:/edit-user
wtv-noback-all: wtv-setup:/edit-user`
var userSession = null;
if (session_data.user_id == request_headers.query.user_id) userSession = session_data;
else {
@@ -83,7 +85,7 @@ ${(user_id == 0) ? 'Subscriber' : 'User'} information
<td>
<td absheight=244 valign=top align=left>
<form
action="wtv-setup:/serve-billing-overview"
action="client:goback"
>
<P>
<table cellspacing=0 cellpadding=0 border=0>

View File

@@ -117,7 +117,7 @@ ${(request_headers.query.preview) ? "<tr><td><td colspan=3><b>Signature Preview:
<tr>
<TD>
<td colspan=3 valign=top align=left bgcolor="${(request_headers.query.preview) ? message_colors.bgcolor : "0D0D0D"}">
${(request_headers.query.preview) ? `<embed src="wtv-mail:/get-signature?sanitize=true&demotext=${encodeURIComponent(`<hr>This is a preview of your signature. The text below the line will not appear in your outgoing messages. It is provided to demonstrate what a message composed with this signature may look like. <a href="client:donothing">This is what a link looks like</a>.`)}" height=40></embed><br><br>` : ''}
${(request_headers.query.preview) ? `<embed src="wtv-mail:/get-signature?sanitize=true&showdemotext=true" height=40></embed><br><br>` : ''}
<tr>
<td>
<td colspan=3 height=2 valign=top align=left>

View File

@@ -83,7 +83,7 @@ setTimeout("clearAllLists();", 2*1000);
<tr>
<td width=5 height=26>
<td width=93>
<table width=93 cellspacing=0 cellpadding=0 href=wtv-guide:/help?topic=Messenger&subtopic=Index>
<table width=93 cellspacing=0 cellpadding=0 href=wtv-guide:/help?topic=Index&subtopic=Glossary>
<tr>
<td>
<table cellspacing=0 cellpadding=0>

View File

@@ -26,7 +26,7 @@ function ShowMessengerPanel()
<tr>
<td abswidth=6>
<td abswidth=92 absheight=76>
<table absheight=76 cellspacing=0 cellpadding=0>
<table href="wtv-home:/home" absheight=76 cellspacing=0 cellpadding=0>
<tr>
<td align=right>
<img src="${minisrv_config.config.service_logo}" width=87 height=67>

View File

@@ -76,31 +76,62 @@ Music
if (canDoMuzac) {
data += `<p>Turn on background music
to have songs play continually in
the background.
<p>Remember to adjust the
the background.<p>Remember to adjust the
volume on your TV so you can
hear the music.`;
} else {
data += `Your client reports it does
not support background music.
<p>However, you can still browse,
and listen to the music in the foreground.`;
}
data += `
hear the music.
<TD WIDTH=20>
<TD WIDTH=198 VALIGN=top ALIGN=left>
<spacer type=block height=20 width=1>
<form action="client:ConfirmPhoneSetup">
<spacer type=block height=16 width=1>
<form>
<table cellspacing=0 cellpadding=0>
<tr>
<td valign=top>
Background music<p>
<input type=hidden name=autosubmit value=true autosubmit=onleave>
<INPUT TYPE="checkbox" NAME="setup-play-bgm" VALUE="1"
action="client:SetSetupValue" selected &wtv-muzac-on;${canDoMuzac ? '' : 'disabled'}>
<td abswidth=4>
<td valign=top>
<font size=-1>Background<br>music</font>
<tr><td absheight=10>
<INPUT TYPE="hidden" NAME="current_volume" ID="current_volume" value="&vol;">
<tr><td absheight=38>
<tr>
<td>
<p>
BGM Volume
<p>
<INPUT TYPE="radio" ID="vol_soft" NAME="setup-bgm-volume" VALUE="soft" action="client:SetSetupValue">&nbsp;Soft<br>
<INPUT TYPE="radio" ID="vol_medium" NAME="setup-bgm-volume" VALUE="medium" action="client:SetSetupValue">&nbsp;Medium<br>
<INPUT TYPE="radio" ID="vol_loud" NAME="setup-bgm-volume" VALUE="loud" action="client:SetSetupValue">&nbsp;Loud
<script type="text/javascript">
var volume=document.forms[0].current_volume.value
var radio = null;
if (volume == "soft") {
radio = document.forms[0]['setup-bgm-volume'][0];
} else if (volume == "medium") {
radio = document.forms[0]['setup-bgm-volume'][1];
} else if (volume == "loud") {
radio = document.forms[0]['setup-bgm-volume'][2];
}
if (radio) {
radio.checked = true;
}
</script>
</td>
`;
} else {
data += `<p>Your client reports it does
not support background music.
<p>However, you can still browse,
and listen to the music in the foreground.
<TD WIDTH=20>
<TD WIDTH=198 VALIGN=top ALIGN=left>
<spacer type=block height=16 width=1>
<form>
<table cellspacing=0 cellpadding=0>
`;
}
data += `
<tr>
<td valign=top>
</table>

View File

@@ -16,9 +16,17 @@ if (!errpage) {
}
if (!errpage) {
var wtvr = new WTVRegister(minisrv_config, SessionStore);
if (session_data.getNumberOfUserAccounts() > minisrv_config.config.user_accounts.max_users_per_account) errpage = wtvshared.doErrorPage(400, "You are not authorized to add more than " + minisrv_config.config.user_accounts.max_users_per_account + ` account${minisrv_config.config.user_accounts.max_users_per_account > 1 ? 's' : ''}.`);
if (!request_headers.query.user_name) errpage = wtvshared.doErrorPage(400, "Please enter a username.");
else if (request_headers.query.user_name.length < minisrv_config.config.user_accounts.min_username_length) errpage = wtvshared.doErrorPage(400, "Please choose a username with <b>" + minisrv_config.config.user_accounts.min_username_length + "</b> or more characters.");
else if (request_headers.query.user_name.length > minisrv_config.config.user_accounts.max_username_length) errpage = wtvshared.doErrorPage(400, "Please choose a username with <b>" + minisrv_config.config.user_accounts.max_username_length + "</b> or less characters.");
else if (!wtvr.checkUsernameSanity(request_headers.query.user_name)) errpage = wtvshared.doErrorPage(400, "The username you have chosen contains invalid characters. Please choose a username with only <b>letters</b>, <b>numbers</b>, <b>_</b> or <b>-</b>. Also, please be sure your username begins with a letter.");
else if (!wtvr.checkUsernameAvailable(request_headers.query.user_name)) errpage = wtvshared.doErrorPage(400, "The username you have selected is already in use. Please select another username.");
}
if (errpage) {
headers = errpage[0];
data = errpage[1];

View File

@@ -1,5 +1,7 @@
var minisrv_service_file = true;
const wtvbgm = new WTVBGMusic(minisrv_config, session_data);
if (request_headers.query && session_data) {
if (request_headers.request_url.indexOf('?') >= 0) {

View File

@@ -0,0 +1,211 @@
var minisrv_service_file = true;
if (request_headers.query.machine && request_headers.query.port) {
headers = `200 OK
Content-Type: text/html
Connection: close
wtv-connection-close: true
wtv-service: reset
wtv-service: name=wtv-1800 host=${request_headers.query.machine} port=${request_headers.query.port} flags=0x00000004 connections=1
wtv-boot-url: wtv-1800:/preregister
`
data = `<html>
<head>
<title>Connect Setup v2.2-minisrv</title>
<DISPLAY noscroll allowoffline notvaudio nooptions switchtowebmode noreconnectalert>
</head>
<body bgcolor="#3C2F47" text="#cbcbcb" link="#aaaaaa"
hspace="0" vspace="0" fontsize="large" noscroll hideoptions onload="load()">
<h2>Connecting...</h2>
Please wait while we connect you to ${request_headers.query.machine}:${request_headers.query.port} ...
<script>
function activ() {
location.href = "client:activ";
}
function load() {
location.href = "client:hangup";
setTimeout(activ, 1000);
}
</script>
</body>
</html>
`;
} else {
headers = `200 OK
Content-Type: text/html`
data = `<html>
<head>
<title>Connect Setup v2.2-minisrv</title>
<DISPLAY noscroll notvaudio switchtowebmode>
</head>
<body bgcolor="#3C2F47" text="#cbcbcb" link="#aaaaaa"
hspace="0" vspace="0" fontsize="large" noscroll>
<table cellspacing="0" cellpadding="0" cellborder="0">
<tr>
<td width="104" height="80" valign="top" align="left"><spacer type="block" WIDTH="11" HEIGHT="11"><br>
<spacer type="block" WIDTH="10" HEIGHT="1"> <a href="wtv-home:/home"><img src="${minisrv_config.config.service_logo}" width="87"
height="67"></a>
</td>
<td width="456" height="80" valign="middle" align="center">
<br><h2>
&nbsp;Connection Setup v2.2-minisrv
</h2>
</td>
</tr>
<tr><td colspan=4><hr>
<tr><td absheight=6>
</table>
<script>
function doConnect() {
// if (document.connect.machine.value == "${minisrv_config.services['wtv-1800'].host}" && document.connect.port.value == "${minisrv_config.services['wtv-1800'].port}") {
// alert("You are already here!");
// } else {
document.connect.submit();
// }
}
function setOther() {
count = document.connect.preset.length;
document.connect.preset.selectedIndex = count - 1;
setTimeout(updateService,10);
}
function updateService() {
srv = document.connect.preset[document.connect.preset.selectedIndex].value;
switch (srv) {
case "mattman69":
document.connect.machine.value="74.76.120.18"
document.connect.port.value="1615"
document.message.msg.value="This is MattMan69's Public HackTV minisrv, all are welcome to connect and enjoy the wonders of WebTV. Offers a custom experience."
break;
case "zefie":
document.connect.machine.value="51.222.164.146"
document.connect.port.value="1615"
document.message.msg.value="This is zefie's public minisrv, for those who want the vanilla minisrv experience."
break;
case "local":
document.connect.machine.value="127.0.0.1"
document.connect.port.value="1615"
document.message.msg.value='Connect to your server via localhost. This option is for users running their own server, and connecting with the Viewer.'
break;
case "wni-prod":
document.connect.machine.value="10.0.0.1"
document.connect.port.value="1615"
document.message.msg.value='Default WebTV Production IP/Port. Can be used to check your routing setup.'
break;
case "wni-int":
document.connect.machine.value="192.168.11.8"
document.connect.port.value="1615"
document.message.msg.value='Default WebTV Internal IP/Port. Can be used to check your routing setup.'
break;
case "jarhead":
document.message.msg.value="Jarhead\'s public minisrv, offers the most production-like WebTV service, to simulate how it was like back then."
alert("Coming soon!")
document.connect.preset.selectedIndex = document.connect.preset.selectedIndex - 1;
setTimeout(updateService,10);
case "other":
document.message.msg.value="Your custom service."
}
}
</script>
<form name="connect" action="wtv-tricks:/cSetup">
<table width=100% cellspacing=1 cellpadding=0>
<tr>
<td colspan=3>
&nbsp;<font color=#4489a8>Presets:</font>
</td>
<td><spacer W=24 type=block>
<select width="440" name="preset" onchange="updateService()" selected>
<option value="mattman69" selected>MattMan69's HackTV minisrv</option>
<option value="zefie">zefie's minisrv</option>
<option value="jarhead">JarHead's WebTV Recreation Server</option>
<option value="local">Your local minisrv</option>
<option value="wni-prod">WebTV Production Default</option>
<option value="wni-int">WebTV Internal Default</option>
<option value="other">Other</option>
</select>
<tr><td absheight=6>
</table>
<hr>
<table width=100% cellspacing=1 cellpadding=0>
<tr>
<td height=6>
<tr>
<td colspan=3>
&nbsp;<font color=#4489a8>Service:</font>
<tr>
<td width=15></td>
<td height=2>
<tr>
<td height=2>
<tr>
<td>
<td>
<input name=serviceType type=radio bgcolor=#444444 value=custom checked>
<td>
&nbsp;Custom:&nbsp;&nbsp;&nbsp;
<td>
Address:
<input size=16 ASCIIONLY name=machine bgcolor=#444444 text=#cbcbcb cursor=#cc9933 value="74.76.120.18" onkeypress="setOther()">
&nbsp;&nbsp;&nbsp;Port:
<input size=5 ASCIIONLY NUMBERS name=port bgcolor=#444444 text=#cbcbcb cursor=#cc9933 value="1615" onkeypress="setOther()">
</table>
<spacer type=block height="8">
<hr>
<table cellspacing=1 cellpadding=0>
<tr>
<td height=8>
<tr>
<td colspan=3>
&nbsp;<font color=#4489a8>Description:</font><br><br>
<tr>
<td width=20>
<td width=390 align=left valign=top>
<form name=message>
<textarea rows=4 size=46 text=#cbcbcb id=msg name=msg border="0" bgcolor=#3C2F47 value='This is the public HackTV minisrv, all are welcome to connect and enjoy the wonders of WebTV. Custom experience!' nohighlight noselect>
</textarea>
</form>
<td>
<td width=100% align=right valign=top>
<form action="client:GoToPhoneSetup">
<font color="#E7CE4A" size=-2><shadow>&nbsp;
<input
type=submit
borderimage="file://ROM/tvimages/TVButtonBorder.bif"
value="Phone Settings"
name="Phone Settings"
usestyle
width=170> &nbsp;
</shadow></font>
</form>
<spacer type=block height="60">
<font color="#E7CE4A" size=-2><shadow>&nbsp;
<input type=hidden name=useEncryption value=true checked>
<input
type=button
borderimage="file://ROM/tvimages/TVButtonBorder.bif"
value="Connect"
name="Connect"
onclick="doConnect()"
usestyle
width=170> &nbsp;
</shadow></font>
</table>
</form>
</body>
</html>`;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 B

View File

@@ -0,0 +1,49 @@
var minisrv_service_file = true;
var num_per_line = 4
var legend_every = 6;
function getLegend() {
d = "<tr>\n";
for (var i = 0; i < num_per_line; i++) {
d += "<td><b><font color=44cc55>Code</font></b>\n<td><b><font color=44cc55>Char</font></b>\n";
}
d += "<tr>\n";
return d;
}
headers = `200 OK
Content-Type: text/html`;
data = `<html>
<body>
<display nosave nosend>
<title>WebTV Character Map</title>
<sidebar width=20%>
<img src="wtv-tricks:/images/Favorites_bg2.jpg">
</sidebar>
<body bgcolor="#191919" text="#33bb44" link="36d5ff" vlink="36d5ff" vspace=0>
<br>
<br>
<font color=44cc55><h1>WebTV Character Map</h1></font>
<br>
<table border=1>`;
for (var i = 0; i <= 255; i++) {
if (i % num_per_line === 0) {
if (i % (num_per_line * legend_every) === 0) {
data += getLegend();
} else {
data += "<tr>"
}
}
data += "<td>&amp;#" + i + ";\n";
data += "<td>&#" + i + ";\n";
}
data += `</table>
</body>
</html>
`

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

@@ -1,863 +0,0 @@
{
"A": {
"accessnumber": {
"word": "access number",
"definition": "The phone number your <boxname> dials to connect to the WebTV service.The access number is displayed on your TV screen each time you turn yourterminal on. If you are unsure whether the connection to your access number is local or toll, contact your phone company."
},
"accessrestriction": {
"word": "access restriction",
"definition": "A feature that lets parents limit what a young viewer can see on the Internet. WebTV provides two restrictive services for kids: Kidfriendly,recommended for children under age 11, and Surfwatch, recommended for older children. Access restrictions can only be set up on secondary accounts and are controlled by the Primary user."
},
"address": {
"word": "address",
"definition": "<b>Web page address</b><p>The Internet address of a Web page, also called a URL (Universal Resource Locator).<p><b>E-mail address</b><p>The address of an Internet user's e-mail account. An e-mail address includes a user name, as well as the domain that sponsors the address. To send someone e-mail, you need to know their e-mail address."
},
"addressbook": {
"word": "Address book",
"definition": "The Address book is feature that allows you to store e-mail addresses. Your Address book can hold up to 140 different e-mail addresses."
},
"altkey": {
"word": "alt key",
"definition": "The Alt key, when pressed simultaneously with other specific keys, creates various symbols. For example, the Alt key can be used to insert accent marks when writing in a foreign language."
},
"americaonline": {
"word": "America Online",
"definition": "An Online Service Provider for personal computer users. WebTV subscriberscannot connect to any portion of America Online's service, as it is notcompatible with WebTV. You can, however, send e-mailto AOL subscribers, as well as chat with them in non-AOL chat rooms."
},
"analog": {
"word": "analog",
"definition": "A process by which information is transmitted from one location to another. Most phone communication is conducted over an analog connection. Yourterminal is compatible with analog lines only."
},
"artemisresearch": {
"word": "Artemis Research",
"definition": "The name of the original research group that developed WebTV Networks."
},
"attachments": {
"word": "attachments",
"definition": "Files or documents that are sent with e-mail messages. To read an attachment, the e-mail program you are using must support the program in which the attachment was created. WebTV's e-mail system supports someattachments but not others. At this time, attachments created with Microsoft's Word and Excel do not work with WebTV."
},
"audibledialing": {
"word": "audible dialing",
"definition": "A feature that allows you to listen to your <boxname> dial in and connect to WebTV. <p>To activate audible dialing, follow these steps:<p><ol><li>Choose <b>Settings</b> from Web Home.<li>Choose <b>Dialing</b>.<li>Choose <b>Advanced</b>.<li>Put a check in the box next to <b>Audible dialing</b>.<li>Choose <b>Done</b>.</ol>"
},
"audiocontrolpanel": {
"word": "audio control panel",
"definition": "An on-screen panel that allows you to control audio files. To make the audio panel appear, simply press the <b>Options</b> button while listening to an audio file."
},
"autoretrieval": {
"word": "auto retrieval",
"definition": "A feature that automatically downloads new television listings to your <boxname> during the night.<P>To manually activate the Auto retrieval feature, Choose <b>Settings</b> from TV Home, choose <b>Listings setup</b> from the next page, then follow the on-screen instructions.",
"plusonly": true
},
"autoselect": {
"word": "auto select",
"definition": "The <b>Auto select</b> feature improves your channel surfing by filtering out all unviewable TV channels. When you use the <b>Auto select</b> feature, only the TV channels that come in clearly are viewable.<p>To activate Auto select:<ol><li>Choose <b>Settings</b> from your TV Home page<li>Choose <b>Channels</b><li>Choose <b>Auto Select</b><li>After the Auto Select is complete, choose <b>Done</b></ol>"
}
},
"B": {
"backbutton": {
"word": "Back button",
"definition": "A button on your remote control that returns you to the last Web page you visited."
},
"baud": {
"word": "baud",
"definition": "Measurement describing the amount of information a modem sends or receives per second."
},
"bulletinboards": {
"word": "bulletin boards (BBs)",
"definition": "Please see <b><word>newsgroup</word></b>."
},
"beta": {
"word": "beta",
"definition": "Testing stage that software goes through before it is released to the general public. During Beta testing, testers attempt to identify all bugs in the software."
},
"bitmap": {
"word": "bitmap",
"definition": "A type of image file on the Internet. Bitmaps are complex rows and columns of bits, or dots, that connect to form a larger, graphical image."
},
"blindcarboncopy": {
"word": "blind carbon copy (BCC)",
"definition": "A feature that allows computer users to send e-mail to someone without that person's e-mail address appearing on the message.If you have ever received e-mail that does not contain your e-mail address, you may have been blind carbon copied. <boxname_plus> does not allow users to send messages using <b>Blind carbon copy</b>."
},
"bookmark": {
"word": "bookmark",
"definition": "(Verb) To save the Internet address (URL) of a Web page so it can be easily accessed later.<p>(Noun) On <boxname_plus>, bookmarks are referred to as <b>Favorites</b>."
},
"bounce": {
"word": "bounce",
"definition": "Any time an e-mail message cannot reach its intended destination,it is returned, or bounced, to the original sender. An e-mail messagecan be bounced for any of the following reasons:<p><ul><li>The sender typed the e-mail address incorrectly<li>The e-mail address no longer exists<li>The recipient's mail box is full<li>There may be server problems.</ul>"
},
"bps": {
"word": "BPS (Bits Per Second)",
"definition": "The amount of information traveling within an area of space in any given second.</ul>"
},
"browser": {
"word": "browser",
"definition": "A program used to access Web pages on the World Wide Web.Your <boxname> comes equipped with its own browser that is specifically designed to view Web pages on a television screen.</ul>"
},
"bug": {
"word": "bug",
"definition": "An error in the software or hardware that causes a program to perform abnormally.</ul>"
},
"byte": {
"word": "byte",
"definition": "A measure of computer memory. One thousand bytes is equal to one <b>kilobyte </b>and one million bytes is equal to one <b>megabyte</b>.</ul>"
}
},
"C": {
"cablemodem": {
"word": "cable modem",
"definition": "A modem that transmits data over television cable lines.A standard analog modem transmits data over telephone lines.Cable modems process data much faster than analog modems.At this time, the majority of cable providers do not providecable modem Internet access.</ul>"
},
"cache": {
"word": "cache",
"definition": "A type of memory used to temporarily store Web pages.Cached Web pages load more quickly because they are stored locally in your terminal.<p>If your cache memory fills up, you may experience slower Web surfing,or receive an error message that says, <b>This page is too big to beshown completely</b>. To clear your cache memory, simply power off your terminaland turn it on again."
},
"callwaiting": {
"word": "call waiting",
"definition": "A service provided by your phone company that lets you receive incomingphone calls while your phone line is in use.If you subscribe to a call waiting service, follow these steps:<p><ol><li>Log on as the Primary user.<li>Choose <b>Settings</b> from <webhome>,<li>Choose <b>Dialing</b>.<li>Choose <b>Call waiting</b>.<li>Choose the box next to <b>Accept calls</b>.<li>Choose <b>Done</b>.</ol>"
},
"carboncopy": {
"word": "carbon copy (cc)",
"definition": "A feature that allows you to send an e-mail message to both a primaryrecipient and multiple secondary recipients at the same time."
},
"casesensitive": {
"word": "case sensitive",
"definition": "When letters typed in uppercase are read differently thanletters typed in lowercase.<p>For example, your <boxname_plus> e-mail address <b>is not</b>case sensitive. If your e-mail address is yourname@webtv.net,someone can send a message to YoUrNaMe@webtv.net, and it will stillget to you.<p>Your <boxname_plus> password <b>is</b> case sensitive. For example, if yourpassword is Surfwatch, you must type it in exactly that way."
},
"cd-rom": {
"word": "CD-ROM",
"definition": "(Compact Disc-Read-Only Memory)<p>A small disc capable of storing large amounts of information."
},
"chat": {
"word": "chat",
"definition": "A forum on the Internet where people communicate by exchanging typedmessages in real time.`;<boxname_plus> supports both HTML chat and real time IRC (Internet Relay Chat).At this time, we do not support Java-based chat."
},
"client": {
"word": "client",
"definition": "A program or device that relies on a larger computer, or server,to perform the majority of its functions. Your <boxname> can be thoughtof as a client, and so can some of the programs that run within it (e.g. <boxname_plus>'s e-mail system)."
},
"commandkey": {
"word": "Command key",
"definition": "The <b>Command</b> key (Cmd), when pressed simultaneously withspecific keys on the keyboard, activates a number of features.For example, pressing <b>Cmd</b> and the < b>R</b> keyat the same time reloads the page you're viewing."
},
"cookies": {
"word": "cookies",
"definition": "Cookies are electronic packets of information that a Web page givesout to visiting Internet users. Cookies have many uses, the mostcommon of which lets Web pages offer custom information to its visitors.For example, while viewing a specific Web page, you may be askedto provide your name and a few comments about your personal interests.The next time you visit that page, you may be presented with a welcomemessage that includes your name and content specific to your personal interests."
},
"crossoverlink": {
"word": "Crossover link",
"definition": "A hyperlink in the form of a small circled <b>i</b> thatsometimes appears on your screen during a television program.If selected, a crossover link will take you to a Web pagerelated to the TV program you are viewing.",
"plusonly": true
},
"cross-post": {
"word": "cross-post",
"definition": "To submit a single post to several different newsgroups. To cross-posta message, simply add the newsgroup names to the post you have written,separating each name with a comma. Posts should only be cross-posted ifthey are relevant to all receiving newsgroups. Doing otherwise isconsidered bad netiquette."
},
"cursor": {
"word": "cursor",
"definition": "A blinking symbol on the screen that indicates where typed letters and words will go or appear.<p>The cursor can be moved from one text-entry field to another by using the <b>Tab</b> key."
},
"cutcopyandpaste": {
"word": "Cut, Copy, and Paste",
"definition": "A feature that lets you copy text from one place, such as a Web page, and pasteit somewhere else, such as in an e-mail message you're writing."
}
},
"D": {
"deletekey": {
"word": "Delete key",
"definition": "Removes text from a text field. Pressing the <b>Delete</b> key removes text one character at a time, while pressing the <b>Cmd</b> key and the <b>Delete</b> key at the same time deletes an entire line of text."
},
"dialingoptions": {
"word": "Dialing options",
"definition": "The place to make adjustments to your dialing settings. From the Dialing Options page, you can choose a dialing prefix, set up your terminal to work with a call waiting service,and activate audible dialing. Only the primary user can access and modify Dialing options.<p>To access Dialing options:<ol><li>Choose <b>Settings</b> from <webhome>.<li>Choose <b>Dialing</b>.</ol>"
},
"discuss": {
"word": "Discuss",
"definition": "WebTV's newsgroup section, which contains a list of featured newsgroups,a moderated newsgroup especially for WebTV users, and a search featureto help you find groups on specific discussion topics.To access Discuss:<ol><li>Choose <b>Community</b> from <webhome><li>Choose <b>Discuss</b>.</ol>"
},
"discussiongroup": {
"word": "discussion group",
"definition": "Please see <b><word>newsgroup</word></b>."
},
"dishplayer": {
"word": "DISHPlayer",
"definition": "The DISHPlayer is a satellite receiver that has the ability to access the WebTV service."
},
"domainname": {
"word": "domain name",
"definition": "The part of a URL or e-mail address that indicates where a Web page or mail box resides.For example, the <b>webtv.net</b> portion of the URL <b>http://www.webtv.net</b>lets you know that this URL belongs to the WebTV domain. The same applies tothe webtv.net part of your e-mail address."
},
"download": {
"word": "download",
"definition": "To move information from a host computer or server to a personal computer or device. For example, when an upgrade is available for<boxname_plus>, our host computers move the upgrade information toyour <boxname>. <p>We maintain all of the information that is downloaded to your terminal. Therefore, it is not possible for you to download programs on your own."
},
"dpi": {
"word": "dpi",
"definition": "The number of \"dots per inch\" in an image or Web page. Regardless of the <b>dpi</b> of a particular image, your terminal's maximum printing capability with most printers is 72 dpi .Because of this, the items you print may not appear exactly as they do on your television screen. If you're using an HP printer that has <b>Smart Focus technology</b>, however, yourmaximum printing capability is increased to 144 dpi."
}
},
"E": {
"editkey": {
"word": "Edit key",
"definition": "Modifies what you have written in a text entry field. After highlighting a text entry field, pressing the <b>Edit</b> key onyour keyboard allows you to move the cursor within that text field."
},
"e-mail": {
"word": "e-mail",
"definition": "Short for <b>electronic mail</b>, e-mail is a message sent from one Internet user to another. To send e-mail to another Internet user,you need that user's e-mail address. Likewise, someone will need your e-mail address to send e-mail to you."
},
"e-mailaddress": {
"word": "e-mail address",
"definition": "The address of an Internet user's e-mail account. An e-mail address includes a user name, as well as a domain name, which is thename of the company, organization that sponsors the address.<p>For example, in the e-mail address <b>yourname@webtv.net</b>,<b>yourname</b> is the user name, while <b>webtv.net</b> is the domain name."
},
"emoticons": {
"word": "emoticons",
"definition": "Combinations of letters and symbols used to convey emotion in an e-mail message or newsgroup post.<p>The following are a few of the more popular emoticons (Rotate your head to the left to view them properly):<p><b>:-)</b> Joking <p><b>;-)</b> Winking <p><b>:-(</b> Sad"
},
"encryption": {
"word": "encryption",
"definition": "A coding method used to help protect information on the Internet.Encrypted information is translated into a secret code, sentover the Internet, then translated back to its original form when it reaches its destination. <boxname_plus> supports a very high level of encryption."
},
"extras": {
"word": "Extras",
"definition": "Mail features that are available only when activated in Settings. The following features are Extras:<p><ul><li><word=replyall>Reply to All</word><li><word=attachments>Attach</word><li><word=carboncopy>CC (Carbon Copy)</word>"
}
},
"F": {
"faq": {
"word": "FAQ",
"definition": "(Frequently Asked Questions)<p>A list of questions and answers relating to a particular topic."
},
"favorite": {
"word": "Favorite",
"definition": "A Web page you save in order to return to it easily at a later time. Saving Web pages as Favorites allows you to keep track of the pages you visit most often and allows you to access them quickly. Each <boxname_plus> user can save a total of 640 Favorites."
},
"favoritesfolders": {
"word": "Favorites folders",
"definition": "A feature that allows you to organizes the Web pages you save as <b>Favorites</b>.You can name your Favorite folders anything you'd like, and can store yourFavorites accordingly. For example, you might store your favorite sports-related Web page in a folder named <b>Sports</b>. Each <boxname_plus> user can create up to 20 Favorites folders."
},
"file": {
"word": "File",
"definition": "A collection of information that is stored in one location. Files are used by computers and other devices to easily transfer large amounts of information. One example of a file is a document created with Microsoft Word."
},
"fileformats": {
"word": "File formats",
"definition": "The particular method by which information is put into a file.Every file is created using a particular computer program. The following is a complete listing of the file formats supported by <boxname_plus>:<p><ul><font size=small><li>AIFF AU SND WAV <li>GIF GSM JPEG <li>Macromedia Flash 1.0 <li>MIDI + Karaoke <li>MOD MPEG Video<li>MPEG-2, 3 Audio<li>QuickTime Audio RealAudio 1.0, 2.0, 3.0 <li>Shockwave Audio</font>"
},
"findkey": {
"word": "Find key",
"definition": "A key on your keyboard that lets you look for specific words or phrases on a Web page. For example, if you wanted to find the word <b>astronaut</b> on NASA's Web page, you could use the <b>Find</b> keyto quickly locate that word. You can use the <b>Find</b> key on your keyboard, or press the <b>Options</b> button on your remote and choose <b>find</b> from the on-screen panel that appears."
},
"flame": {
"word": "Flame",
"definition": "Term used to describe a malicious e-mail message or newsgroup post, often sent without provocation."
},
"forward": {
"word": "forward",
"definition": "To send an e-mail message you've received to someone else."
},
"frames": {
"word": "frames",
"definition": "An HTML feature that divides your screen into a set of smaller windows. Frames are often used on the Internet to keep a table of contents or a directory on the screen at all times."
},
"freeware": {
"word": "freeware",
"definition": "Copyrighted computer software that can be obtained free of charge when using a computer."
},
"ftp": {
"word": "FTP",
"definition": "A method by which files are transferred over the Internet from one Internet device to another. In order to FTP a file, you need to use an FTP program."
},
"fuck": {
"word": "fuck",
"definition": "A word used by <word>zefie</word> frequently when developing <word>minisrv</word>."
}
},
"G": {
"gif": {
"word": "GIF",
"definition": "A file format used to make pictures and images on the World Wide Web."
},
"goto": {
"word": "Go To",
"definition": "You can use the <b>Go To</b> feature to go directly to a Web page. If you know the Internet address (URL) of a Web page, press <b>Go To</b> on your keyboard, or press <b>Options</b> on your remote and choose <b>go to</b> from the on-screen <b>Options</b> panel. Type in the URL, then choose <b>Go to Page</b>."
}
},
"H": {
"hangupoption": {
"word": "Hang up option",
"definition": "An advanced option that allows you to temporarily disconnect your terminal from the service. When you're ready to connect again, select <b>Reconnect</b>. You'll be taken to the page you were viewing prior to hanging up. The <b>Hang up</b> feature does not power off your <boxname> it simply disconnects it, freeing up your phone line."
},
"harddrive": {
"word": "hard drive",
"definition": "A storage device used to store files, software, and/or programs."
},
"hardware": {
"word": "hardware",
"definition": "Any physical object used in the computer/technology environment. Your <boxname>, remote, and/or keyboard are examples of hardware."
},
"header": {
"word": "header",
"definition": "The \"travel information\" for a particular e-mail message. Headers indicate who sent the e-mail message, to whom the message is being sent, and the time it was sent."
},
"hoaxes": {
"word": "hoaxes",
"definition": "Messages purposefully crafted to fool or trick other Internet users. Hoaxes can be sent by e-mail and posted in newsgroups. One popular hoax attempts to fool people into thinking they have just downloaded a virus.If you encounter a hoax message such as this, it is best to simply ignore it."
},
"homepage": {
"word": "Home page",
"definition": "The first Web page you are taken to when you connect to the Internet.To get to <webhome> at any time, press the <b>Home</b> button on your remote or keyboard."
},
"hotlink": {
"word": "hot link",
"definition": "Words or symbols on a Web page that, when selected, take you to a new location on the Internet. Hot links can take you to a different spot on the page you are viewing, or to a new page altogether. Hot links are typically a different color or design than the rest of the text on a given page. On <boxname_plus>, any word or image that you can highlight with the yellow box is a hot link."
},
"html": {
"word": "HTML",
"definition": "The computer programming language used to make all Web pages. <boxname_plus> users can use HTML to add graphics and sound to their e-mail, as well as produce their own Web sites."
},
"http": {
"word": "http",
"definition": "(Hypertext Transfer Protocol)<p>The format by which Web pages are transferred back and forth on the Internet.You'll notice that the Internet address, or URL, of every Web page you view begins with http://"
},
"hyperlink": {
"word": "hyperlink",
"definition": "Words or symbols on a Web page that, when selected, take you to a new location on the Internet. Hyperlinks can take you to a different spot on the page you are viewing , or to a new page altogether. Hyperlinks are typically a different color or design than the rest of the text on a given page. On <boxname_plus>, any word or image you can highlight with the yellowbox is a hyperlink."
}
},
"I": {
"icon": {
"word": "icon",
"definition": "A selectable symbol or small picture on a Web page that, when selected,takes you to a different location on the Internet."
},
"icq": {
"word": "ICQ",
"definition": "(I Seek You)<p>A program that informs Internet users when a specified person is online.ICQ can also be used to send real time messages. At this time, <boxname_plus> does not support ICQ."
},
"imagemap": {
"word": "image map",
"definition": "An image on a Web page that, when selected, takes you to a different location on the Internet. A single image map usually contains several hyperlinks. When you highlight and select an image map, a small yellow arrow will appear, allowing you to select a specific hyperlink within the image map."
},
"infobutton": {
"word": "Info button",
"definition": "Used to find the Internet address (URL) of a Web page. Selecting the <b>Info</b> buttonwhile viewing a Web page will indicate the URL of that Web page. The Info button can be found on both the keyboard and the on-screen Options panel."
},
"instantmessenger": {
"word": "Instant Messenger",
"definition": "A program that lets Internet users send messages to each other in real time."
},
"internet": {
"word": "Internet",
"definition": "A large network of computers that enables people to communicate and exchange information across the globe. Also referred to as \"the Net.\""
},
"internetaddress": {
"word": "Internet address",
"definition": "Web pages are identified by their Internet addresses, or URLs. An Internet address is to a Web page what a street address is to a residence. If you know the Internet address of a Web page you can access it directly by using the <b>Go to</b> feature. To find the URL of a Web page while viewing it, press the <b>Info </b>key on your keyboard, or press <b>Options</b> on your remote and then choose <b>info</b> from the on-screen Options panel."
},
"internetexplorer": {
"word": "Internet Explorer",
"definition": "An Internet browser created by Microsoft Corporation for computer users to surf the World Wide Web."
},
"internettraffic": {
"word": "Internet traffic",
"definition": "The result of too many people connecting to the Internet at the same time. Just as automobile traffic may delay your commute to work, Internet traffic may slow down your Internet connection."
},
"irblaster": {
"word": "IR blaster",
"definition": "A device that lets you control your VCR, satellite receiver, or cable box with the WebTV remote control and keyboard. IR stands for <EM>Infra-red</EM>."
},
"irc": {
"word": "IRC",
"definition": "A program that allows Internet users to participate in live chat conversations."
},
"irkeyboard": {
"word": "IR keyboard",
"definition": "A wireless keyboard you can use to control your <boxname>. IR stands for <em>Infra-red</em>."
},
"isp": {
"word": "ISP",
"definition": "A company that provides Internet access."
}
},
"J": {
"jarhead": {
"word": "JarHead (aka JarHead4)",
"definition": "One of the developers of the WebTV <b><word>minisrv</word></b> project. JarHead has done a lot of work to create a service that recreates the experience of the original production WebTV Service.<br<br>See also: <b><word>zefie</word></b>"
},
"java": {
"word": "Java",
"definition": "A multipurpose computer language developed by Sun Microsystems Inc.Among other applications, Java is used to create animated graphics for Web pages. <boxname_plus> does not currently support Java."
},
"javascript": {
"word": "Javascript",
"definition": "A scripting language that adds functionality to Web pages. For example,Javascript is used to create drop down menus on many Web pages.Javascript is often confused with Java, but the two languages are not related. <boxname_plus> supports Javascript."
},
"jpeg": {
"word": "JPEG",
"definition": "A format used to create images and pictures on the World Wide Web. <boxname_plus> supports JPEGs."
}
},
"K": {
"keywordsearch": {
"word": "keyword search",
"definition": "Some databases and Web sites can be searched by keyword. With a keyword search, you can search for information on a general topic by inputting a single word, like &quot;<b>pork.&quot;</b>"
},
"kid-friendly": {
"word": "Kid-Friendly",
"definition": "Software that reduces the chance of children accessing adult material on the Internet. Kid-Friendly provides content that is both educational and appropriate for children under the age of eleven. Once set up, thisservice helps to filter out inappropriate material on the Internet and allowsonly pre-approved content to be viewed. The option to set up Kid-Friendly accounts is provided to <boxname_plus> customers free of charge."
},
"kilobyte": {
"word": "kilobyte",
"definition": "A measure of computer memory. One kilobyte is equal to one thousand bytes."
}
},
"L": {
"link": {
"word": "link",
"definition": "Words or symbols on a Web page that, when selected, take you to a new location on the Internet. Links (also called hyperlinks) can take you to a different spot on the page you are viewing, or to a new page altogether. Links are typically a different color or design than the rest of the text on a given page. On <boxname_plus>, any word or image you can highlight with the yellow box is a link."
},
"load": {
"word": "load",
"definition": "To move information from a host-computer or server to a personal computer or device. For example, when a service update is available, <boxname_plus> (the server) loads the update information to your <boxname>. Because <boxname_plus> maintains all of the information that is loaded to your terminal, it is not possible for you to download programs on your own."
},
"login": {
"word": "login",
"definition": "The act of connecting to a remote system or network. Every time you connect to <boxname_plus>, you are \"logging in.\""
},
"logon": {
"word": "logon",
"definition": "See <b>login</b>"
},
"lurk": {
"word": "lurk",
"definition": "The act of reading posts in a newsgroup (Discuss) without responding. Newsgroup lurking is a perfectly normal Internet activity."
}
},
"M": {
"macromediaflash": {
"word": "Macromedia Flash",
"definition": "A file format used to add animation to Web pages."
},
"mailinglist": {
"word": "mailing list",
"definition": "A list of e-mail addresses compiled for wide-scale distribution. In general, people sign up for mailing lists in order to receive up-to-date information on a particular subject."
},
"mattman69": {
"word": "MattMan69",
"definition": "A <boxname_plus> user who was notorious for hacking the <boxname_plus> service. <b>MattMan69</b> created a <b><word>Web site</word></b> to expose all of the <boxname_plus> service secrets.<br><br> To this day, <b>MattMan69</b>'s Web site, found at <br><u><b><a href=\"http://turdinc.kicks-ass.net/Msntv/index2.html\">http://turdinc.kicks-ass.net/Msntv/index2.html</a></b></u>, is still one of the largest and most comprehensive archives of <br> <boxname_plus> service history."
},
"megabytes": {
"word": "megabytes",
"definition": "A measure of computer memory. One megabyte is equal to one million bytes or one thousand kilobytes."
},
"messagelight": {
"word": "Message light",
"definition": "A small red light on the front of your <boxname> that illuminates when a user has new e-mail. The <b>message light</b> is activated when you connect to the service and new e-mail is available. It canalso be activated by setting up the Message watch feature."
},
"messagewatch": {
"word": "Message watch",
"definition": "A feature that lets you program your <boxname> to automatically check for new e-mail, even while the terminal is off.<p>To change the time Message watch checks for messages:<ol><li>Choose <b>Settings</b> from <webhome><li>Choose <b>Mail</b>.<li>Choose <b>Message light</b>.<li>Follow the on-screen directions</b>.</ol>"
},
"mime": {
"word": "MIME",
"definition": "MIME protocol makes it possible to transfer non-text information, such as images, audio, and video, over the Internet. <boxname_plus>'s e-mail system is MIME compliant, so it can send and receive e-mail messages that are MIME encapsulated."
},
"minisrv": {
"word": "minisrv",
"definition": "An open-source product written in nodejs designed to replicate the propritary comminucations between a WebTV client and the server. <b>minisrv</b> is the server software that provides the user experience. This page was sent to you via <b>minisrv</b>!"
},
"modem": {
"word": "modem",
"definition": "A device or program that enables two computers or Internet devices to communicate over a telephone line."
},
"moderatednewsgroup": {
"word": "moderated newsgroup",
"definition": "A newsgroup that lists only pre-approved posts. Because every post is reviewed by a moderator, moderated newsgroups are typically more organized and civilized than un-moderated newsgroups."
},
"moderator": {
"word": "moderator",
"definition": "A person or program that reviews newsgroup submissions before they are posted. The job of a moderator is to keep newsgroup conversations focused and non-inflammatory."
},
"mosaic": {
"word": "Mosaic",
"definition": "The first Internet browser used to navigate the World Wide Web.The Mosaic browser was developed at the National Center for Supercomputing Applications (NCSA) at the University of Illinois."
},
"mouse": {
"word": "mouse",
"definition": "The mating device utilized by personal computer users."
},
"mpeg": {
"word": "MPEG",
"definition": "A file format used to make animated video clips.<boxname_plus> supports MPEG video files, which are widely available on the Internet."
},
"mud": {
"word": "MUD",
"definition": "A multi-player text-based game that is played on the Internet. The concept of MUD was developed in 1980 in the tradition of Dungeons and Dragons and other role-playing games. <boxname_plus> does not support MUDs."
}
},
"N": {
"navigate": {
"word": "navigate",
"definition": "To move from one location to another on the Internet."
},
"net": {
"word": "Net",
"definition": "Short for <b>Internet</b>."
},
"netiquette": {
"word": "netiquette",
"definition": "Short for Internet etiquette, <B>netiquette</B> is a set of unwritten rules or guidelines that Internet users follow when posting to a newsgroup or using a chat room. For example, it is considered bad netiquette to type in all capital letters when posting to a newsgroup. This is equivalent to SHOUTING!"
},
"netscapenavigator": {
"word": "Netscape Navigator",
"definition": "An Internet browser created by Netscape Communications Corporation for computer users to surf the World Wide Web."
},
"newbie": {
"word": "newbie",
"definition": "A slang term used to describe someone new to the Internet."
},
"newsgroup": {
"word": "newsgroup",
"definition": "A forum where Internet users gather to exchange ideas on a broad range of topics. So the conversation is easy to follow, newsgroup messages, or posts, are organized categorically by threads."
},
"noob": {
"word": "noob",
"definition": "Please see <b><word>newbie</word></b>"
}
},
"O": {
"on-screenkeyboard": {
"word": "On-screen keyboard",
"definition": "The on-screen keyboard lets you type letters and words using the hand-held remote control. To activate the on-screen keyboard, select a text entry field and then press the center button on your remote."
},
"optionspanel": {
"word": "Options panel",
"definition": "An on-screen panel that appears after you press the <font size=-1><b>OPTIONS</b></font> button on your remote or keyboard."
}
},
"P": {
"pagebuilder": {
"word": "Page Builder",
"definition": "Page Builder is a tool that helps you create your own Web pages and publish them on the World Wide Web."
},
"pap": {
"word": "PAP",
"definition": "(Password Authentication Protocol)<p>A protocol used to authenticate passwords. PAP is like a two-way handshaking procedure that validates a password every time you log on."
},
"parallelport": {
"word": "parallel port",
"definition": "A port on a personal computer or Internet device used to connect external devices. WebTV Plus receivers and DISHPlayers have a built-in parallel port that can be used to connect a compatible printer."
},
"pip": {
"word": "PIP",
"definition": "(Picture-in-Picture)<p>Also known as the TV Window. A feature that lets you watch television while surfing the Web. To activate PIP, select <b>TV window</b>from the <b>Options </B> panel, or press the <b>Cmd</b> key and the <b>W</b> key on your keyboard at the same time.",
"plusonly": true
},
"pop": {
"word": "POP",
"definition": "(Point Of Presence)<p>A phone number used to connect a computer or Internet device to the Internet."
},
"post": {
"word": "post",
"definition": "(verb) To submit a message to a newsgroup.<p>(noun) A message that can be read on a newsgroup."
},
"ppp": {
"word": "PPP",
"definition": "(Point to Point Protocol)<p>Communication protocol used over standard phone lines to support Internet connectivity. PPP allows computers to communicate with each other."
},
"primaryuser": {
"word": "Primary user",
"definition": "Subscriber who originally registered for the <boxname_plus> service. The Primary user is responsible for payment of the <boxname_plus> service and for the actions of all secondary users.Additionally, only the Primary user can add or remove users,adjust dialing options, and set up access restrictions, such as SurfWatch and Kid Friendly."
},
"printeradapter": {
"word": "printer adapter",
"definition": "A device needed to connect a printer to a WebTV Classic Internet terminal. You can find printer adapters in most stores that carry WebTV terminals. The WebTV Plus receiver comes with a built-in printer adapter."
},
"printercable": {
"word": "printer cable",
"definition": "A cable that is used to connect a printer to a computer or Internet device.You must use an IEEE-1284 compliant bi-directional cable to print with yourterminal."
},
"privateroom": {
"word": "private room",
"definition": "A chat room not listed on a chat service's list of public rooms. Private rooms are only available in IRC and are temporary.Once all participants have left a private room, the room no longer exists."
},
"programinformation": {
"word": "program information",
"definition": "Information that is related to the television program you are viewing.Program information gives you:<p><ul><li>A brief description of a television program<li> The amount of time remaining in the program<li>The rating of the television program (if available)<li>Closed captioning information</ul>",
"plusonly": true
},
"protocol": {
"word": "protocol",
"definition": "A standard format computers use to communicate.One popular protocol is http, the underlying format of the World Wide Web."
}
},
"Q": {
"quicktime": {
"word": "Quicktime",
"definition": "A file format used to produce sound and video clips on the Internet. <boxname_plus> currently supports the audio portion of Quicktime files, butdoes not support Quicktime video."
}
},
"R": {
"ram": {
"word": "RAM",
"definition": "A type of temporary computer memory. RAM is used to temporarily store the Web content you access during an Internet session. This type of memory makes content you recently viewed more quickly accessible."
},
"realaudio": {
"word": "Real Audio",
"definition": "Software developed by Progressive Networks Inc. used to transmit, receive, and play audio on the Internet."
},
"recent": {
"word": "Recent",
"definition": "The <b>Recent</b> feature allows you to see a list of the Web pages that you've just visited. To see this list, press <b>Recent</b> on yourkeyboard or remote."
},
"reload": {
"word": "Reload",
"definition": "The <b>Reload</b> feature allows you to view the most recent version of a Web page. This is useful for Web pages that are updated frequently, such as sports and weather pages, and newsgroups.<p>To reload a page, press <b>Options</b> on your remote or keyboard, then choose <b>Reload</b> from the on-screen Options panel."
},
"reply": {
"word": "reply",
"definition": "To respond to a person who has sent you an e-mail message."
},
"replyall": {
"word": "reply all",
"definition": "To respond to all of the original recipients of an e-mail message you have received. Reply all can only be used when an e-mail message contains multiple recipients and you've activated the <b>Extras</b> feature in the <b>Settings</b> section of Mail."
},
"rfadapter": {
"word": "RF adapter",
"definition": "Used to connect devices, such as video game consoles and Internet set-top boxes, to TV sets that are not equipped with cable and/or audio-video jacks.<p>RF stands for <EM>Radio Frequency</EM>."
},
"rom": {
"word": "ROM",
"definition": "A type of computer memory that cannot be changed by an end user. If you disconnect from <boxname_plus>, the ROM memory will not be affected."
}
},
"S": {
"save": {
"word": "Save",
"definition": "To store something in order to be able to access it later. You might save a Web page in a Favorites folder, an e-mail message in Storage, or an e-mail address in the Address book."
},
"screensaver": {
"word": "screen saver",
"definition": "A program that prevents damage to a TV screen or PC monitor by maintaining the constant movement of images. If a stationary image remains on a screen for an extended period of time, the image may <EM>burn</EM> into the screen. The <boxname_plus> screen saver is activated when you stop using your terminal, but do not turn it off."
},
"scrollbuttons": {
"word": "Scroll buttons",
"definition": "To move up and down on a Web page. Both the keyboard and the remote have<b>Scroll up</b> and <b>Scroll down</b> buttons."
},
"search": {
"word": "Search",
"definition": "A service used to locate information on the Internet. To search for information, select Search from <webhome> and type what you're looking for. The more descriptive words you use in a search, the better."
},
"searchengine": {
"word": "search engine",
"definition": "A program used to find specific information on the Internet. Excite, Yahoo, and Alta Vista are all examples of popular search engines. <boxname_plus> features Infoseek as its Internet search engine."
},
"send": {
"word": "Send",
"definition": "A feature that lets you send an e-mail message or a URL to another Internet user while you are surfing the Internet. The <b>Send</b> feature can also be used to forward newsgroup posts."
},
"server": {
"word": "server",
"definition": "A computer on the Internet that is used to store information, such as your <boxname_plus> e-mail and Favorites. Each time you turn your <boxname> on, you are connected to a server. That server then connects to other servers to access information."
},
"serviceprovider": {
"word": "service provider",
"definition": "A company that provides Internet access."
},
"shockwave": {
"word": "Shockwave",
"definition": "A program used to create animations and sounds on the Internet. <boxname_plus> does not support the video segments of Shockwave, but does support Shockwave audio."
},
"shortcuts": {
"word": "shortcuts",
"definition": "Programmable keys (F1-F7) on the IR keyboard that, when set up, allow you to access Favorites with one keystroke."
},
"site": {
"word": "site",
"definition": "A set of Web pages that together represent one specific location on the World Wide Web. A Web site is like a book, and the Web pages within it are like pages in a book. Web sites typically have a main page, where the idea, story, or purpose of the site is clearly defined."
},
"smartcards": {
"word": "Smart cards",
"definition": "Smart cards are a new technology still in development. Your <boxname> includes a smart card slot in anticipation of their widespread use. In the future, smart cards will be used to store information, including financial data for banking and other online transactions."
},
"spam": {
"word": "spam",
"definition": "An unsolicited e-mail message or newsgroup post, often advertising a useless product or service. It is a violation of <boxname_plus>'s Terms of Service to send spam."
},
"ssl": {
"word": "SSL",
"definition": "A security protocol on the Internet. SSL encrypts data in order to help protectthe transmission of confidential information over the Internet.We support this standard, allowing you to conduct online banking, shopping and trading. To be sure that you are making an SSL-backed transaction, you can select the <b>Info</b> button on the keyboard while on a Web page. If the page is encrypted, an icon on the bottom left of the screen will appeargiving you the option to view the page's security details."
},
"storage": {
"word": "Storage",
"definition": "A feature that lets you save and sort e-mail. The Storage feature includes:<p><ul><li>e-mail you have saved<li>e-mail you have discarded (during the past week)<li>e-mail you have sent (during the past week).</ul>"
},
"streaming": {
"word": "streaming",
"definition": "A method used to send information over the Internet. The first part of streaming information arrives in a usable form before the last part is fully loaded. Audio files, for example, are commonly put into a streaming format. You can begin to play a streaming audio file before the last part of the file has fully loaded."
},
"surf": {
"word": "surf",
"definition": "To navigate from one point to another on the World Wide Web."
},
"surfwatch": {
"word": "SurfWatch",
"definition": "Software that reduces the likelihood of children accessing adult material on the Internet. SurfWatch blocks access to sites that it has identified as containing adult material. SurfWatch has also compiled a list of words which, when used in searches, may find inappropriate Web content. SurfWatch prevents these words from being used.<p>SurfWatch can be set up by the Primary user (subscriber) for any secondary userbut cannot be set up on the Primary user's account."
},
"s-video": {
"word": "S-video",
"definition": "A technology used to transmit video signals from one device to another. S-video technology produces a high quality image and is more commonly found on newer televisions."
}
},
"T": {
"telnet": {
"word": "Telnet",
"definition": "A protocol used to access information on a remote computer.<boxname_plus> does not support Telnet connections."
},
"termsofservice": {
"word": "Terms of Service",
"definition": "A legal contract between WebTV and each individual <boxname_plus> subscriber. All <boxname_plus> subscribers are required to follow the guidelines mandated within WebTV's <b>Terms of service (TOS)</b>. Violations of the TOS can result in the suspension and possible cancellation of your account."
},
"textentryfield": {
"word": "text entry field",
"definition": "A blank field or box on a Web page where text can be typed."
},
"threads": {
"word": "threads",
"definition": "A connected group of posts in a newsgroup that share the same subject title. Each thread in a newsgroup represents a different topic of conversation."
},
"timestamp": {
"word": "time stamp",
"definition": "The listed time on an e-mail message that indicates when it was sent."
},
"transloader": {
"word": "Transloader",
"definition": "A Web site that allows you to capture images from other Web pages and savethem in your Scrapbook. You can then add these images to Web pages youcreate with <b><word>Page Builder</word></b>."
},
"troll": {
"word": "troll",
"definition": "Someone who attempts to disrupt the fluidity of newsgroup conversationby posting irrelevant and sometimes hostile messages.If you encounter a troll, it is best to not respond publicly to their messages."
},
"tvhome": {
"word": "TV Home",
"definition": "Your home base for watching TV, browsing television listings,and setting up your TV for use with your <boxname>.",
"plusonly": true
},
"tvlistings": {
"word": "TV Listings",
"definition": "A 24-hour schedule of television programming accessible from the TV Home page. TV Listings are available even if your terminal is offline, or not connected to <boxname_plus>.",
"plusonly": true
},
"tvwindow": {
"word": "TV Window",
"definition": "Also known as <b>Picture-in-Picture</b> or <b><word>PIP</word></b>. A feature that lets you watch television while surfing the Web. To activate the TV window, select <b>PIP</b>from the <b>Options </B> panel, or press the <b>Cmd</b> key and the <b>W</b> key on your keyboard at the same time.",
"plusonly": true
}
},
"U": {
"update": {
"word": "update",
"definition": "Please see <b><word>upgrade</word></b>"
},
"upgrade": {
"word": "upgrade",
"definition": "The addition or enhancement of a new feature to a service. <boxname_plus> provides periodic upgrades to your service."
},
"upload": {
"word": "upload",
"definition": "To transfer information from a personal computer or device to a host computer or server."
},
"url": {
"word": "URL",
"definition": "Web pages are identified by their URLs, or Internet addresses. An Internet address is to a Web page what a street address is to a residence. If you know the Internet address of a Web page you can access it directly by using the <b>Go To</b> feature. <p>To find the URL of a Web page, select the <b>Info</b> key on your keyboard, or press <b>Options</b> and then <b>Info</b> on your remote, while viewing a particular Web page."
},
"usenet": {
"word": "Usenet",
"definition": "A large system of newsgroups that can be accessed through the Internet."
},
"user": {
"word": "user",
"definition": "Any account set up on your <boxname>. Each terminal can have a total of six users; one Primary user and up to five secondary users. Only the Primary user can add secondary users."
},
"useyourisp": {
"word": "Use Your ISP",
"definition": "A feature that allows <boxname_plus> users to connect to <boxname_plus> using an ISP (Internet Service Provider) of their choosing. <b>Use Your ISP</b> is beneficial to those who have Internet access through another ISP, and for those who live in an area without a local access number."
}
},
"V": {
"vidcap": {
"word": "Vidcap",
"definition": "Video capture, or vidcap, lets you connect a VCR, video camera, or digital camerato your terminal and capture a picture. You can send vidcaps in e-mail messages or keep them in your scrapbook in Page Builder.",
"plusonly": true
},
"videoflash": {
"word": "VideoFlash",
"definition": "A technology developed by WebTV Networks that produces full-screen, full-motion video. In contrast to conventional Internet video technology, VideoFlash provides a level of video quality comparable to standard TV and is capable of providing significantly faster download times."
},
"viewbutton": {
"word": "view button",
"definition": "Button on the remote control and keyboard used to switch between Web Homeand the TV Home page."
},
"virus": {
"word": "virus",
"definition": "A program or code that interferes with the normal functioning of a personal computer. Your <boxname> is immune to viruses."
},
"vrml": {
"word": "VRML",
"definition": "A computer programming language used to create three-dimensional graphics on the World Wide Web. <boxname_plus> does not support VRML."
}
},
"W": {
"web": {
"word": "Web",
"definition": "An enormous network of computers that can read and exchange information created by a single programming language, known as HTML. HTML is a simple and flexible programming language that is used to display text, audio, images, and animations. The World Wide Web is often referred to as the Internet. However, the World Wide Web is a subset of the Internet, not the Internet itself.Internet users navigate the World Wide Web using Web browsers."
},
"webaddress": {
"word": "Web address",
"definition": "Please see <b><word>Internet address</word></b>"
},
"webbrowser": {
"word": "Web browser",
"definition": "Please see <b><word>browser</word></b>"
},
"webmaster": {
"word": "Webmaster",
"definition": "A person who is responsible for maintaining a Web site."
},
"webpage": {
"word": "Web page",
"definition": "An HTML formatted document that resides on the World Wide Web.Web pages generally combine text and pictures, but can also contain animation and video. Each Web page on the World Wide Webis identified by a unique Internet address, or URL."
},
"website": {
"word": "Web site",
"definition": "A set of Web pages that together represent one specific location on the World Wide Web. A Web site is like a book, and the Web pages within it are like pages in a book. Web sites typically have a main page, where the idea, story, or purpose of the site is clearly defined."
},
"webtvclassic": {
"word": "WebTV Classic",
"definition": "WebTV's original Internet set-top box. The WebTV Classic Internet terminal, manufactured by Sony and Phillips Magnavox, is an easy and affordable way to access the Internet."
},
"webtvplus": {
"word": "WebTV Plus",
"definition": "An Internet set-top box that connects to the WebTV Plus service.The WebTV Plus receiver, manufactured by Sony, Phillips Magnavox, Samsung, RCA, and Mitsubishi, is WebTV's second product offering."
},
"whispering": {
"word": "whispering",
"definition": "A feature in Chat that lets you send a private message to another person in a chat room. Only you and the specified recipient will see the whispered message."
},
"windows": {
"word": "Windows",
"definition": "A computer operating system developed by Microsoft Corporation."
},
"worldwideweb": {
"word": "World Wide Web",
"definition": "An enormous network of computers that can read and exchange information created by a single programming language, known as HTML.HTML is a simple and flexible programming language that is usedto display text, audio, images, and animations. The World Wide Webis often referred to as the Internet. However, the World Wide Web is a subset of the Internet, not the Internet itself. Internet users navigate the World Wide Web using Web browsers."
}
},
"Z": {
"zefie": {
"word": "zefie",
"definition": "Primary developer of the WebTV <b><word>minisrv</word></b> project. zefie is responsible for creating the project, as well maintaining the open-source project on GitHub.<br<br>See also: <b><word>JarHead</word></b>"
}
}
}

View File

@@ -22,6 +22,7 @@ const WTVClientSessionData = require(classPath + "/WTVClientSessionData.js");
const WTVMime = require(classPath + "/WTVMime.js");
const WTVFlashrom = require(classPath + "/WTVFlashrom.js");
const vm = require('vm');
const debug = require('debug')('minisrv_main');
const express = require('express');
var wtvnewsserver = null;
@@ -77,6 +78,44 @@ function verifyServicePort(service_name, socket) {
return false;
}
function configureService(service_name, service_obj, initial = false) {
if (service_obj.disabled) return false;
service_obj.name = service_name;
if (!service_obj.host) {
service_obj.host = service_ip;
}
if (service_obj.port && !service_obj.nobind && initial) {
if (service_obj.pc_services) pc_ports.push(service_obj.port);
else ports.push(service_obj.port);
}
// minisrv_config service toString
service_obj.toString = function (overrides) {
var self = Object.assign({}, this);
if (overrides != null) {
if (typeof (overrides) == 'object') {
Object.keys(overrides).forEach(function (k) {
if (k != "exceptions") self[k] = overrides[k];
});
}
}
if ((service_name == "wtv-star" && self.no_star_word != true) || service_name != "wtv-star") {
var outstr = "wtv-service: name=" + self.name + " host=" + self.host + " port=" + self.port;
if (self.flags) outstr += " flags=" + self.flags;
if (self.connections) outstr += " connections=" + self.connections;
}
if (service_name == "wtv-star") {
outstr += "\nwtv-service: name=wtv-* host=" + self.host + " port=" + self.port;
if (self.flags) outstr += " flags=" + self.flags;
if (self.connections) outstr += " connections=" + self.connections;
}
return outstr;
}
minisrv_config.services[service_name] = service_obj;
return true;
}
// Where we store our session information
var ssid_sessions = new Array();
var socket_sessions = new Array();
@@ -84,7 +123,6 @@ var socket_sessions = new Array();
var ports = [];
var pc_ports = [];
// add .reverse() feature to all JavaScript Strings in this application
// works for service vault scripts too.
if (!String.prototype.reverse) {
@@ -144,12 +182,26 @@ async function sendRawFile(socket, path) {
});
}
var runScriptInVM = function (script_data, user_contextObj = {}, privileged = false, filename = null) {
var runScriptInVM = function (script_data, user_contextObj = {}, privileged = false, filename = null, debug_name = null) {
// Here we define the ServiceVault Script Context Object
// The ServiceVault scripts will only be allowed to access the following fcnutions/variables.
// Furthermore, only modifications to variables in `updateFromVM` will be saved.
// Example: an attempt to change "minisrv_config" from a ServiceVault script would be discarded
// try to build a name for the script's debug() calls
if (!debug_name) {
// try to make the debug name
var debug_name = (filename) ? filename.split(path.sep) : null;
if (debug_name) {
if (wtvshared.isConfiguredService(debug_name[debug_name.length - 2]))
// service:/filename
debug_name = debug_name[debug_name.length - 2] + ":/" + debug_name[debug_name.length - 1];
else
// filename
debug_name = debug_name[debug_name.length - 1];
}
}
// create global context object
var contextObj = {
// node core variables and functions
@@ -172,6 +224,7 @@ var runScriptInVM = function (script_data, user_contextObj = {}, privileged = fa
"path": path,
// Our variables and functions
"debug": require('debug')((debug_name) ? debug_name : 'service_script'),
"minisrv_config": minisrv_config,
"socket": null,
"headers": null,
@@ -254,12 +307,7 @@ var runScriptInVM = function (script_data, user_contextObj = {}, privileged = fa
}
// unload any loaded modules for this vm
if (modules_loaded.length > 0) {
Object.keys(modules_loaded).forEach(function (k) {
wtvshared.unloadModule(modules_loaded[k]);
})
}
modules_loaded = null;
return contextObj; // updated context object with whatever global varibles the script set
}
@@ -294,7 +342,7 @@ async function processPath(socket, service_vault_file_path, request_headers = ne
]
if (!pc_services) {
updateFromVM.push([`ssid_sessions[${socket.ssid}]`, "session_data"]); // user-specific session data from unprivileged scripts
updateFromVM.push([`ssid_sessions['${socket.ssid}']`, "session_data"]); // user-specific session data from unprivileged scripts
}
var privileged = false;
@@ -471,7 +519,7 @@ async function processPath(socket, service_vault_file_path, request_headers = ne
try {
if (typeof vmResults[item[1]] !== "undefined") eval(item[0] + ' = vmResults["' + item[1] + '"]');
} catch (e) {
console.error("vm readback error", e, item[0] + ' = vmResults[' + item[1] + ']');
}
})
@@ -506,14 +554,16 @@ async function processPath(socket, service_vault_file_path, request_headers = ne
request_headers.service_file_path = catchall_file;
var script_data = fs.readFileSync(catchall_file).toString();
runScriptInVM(script_data, contextObj, privileged, catchall_file);
var vmResults = runScriptInVM(script_data, contextObj, privileged, catchall_file);
// Here we read back certain data from the ServiceVault Script Context Object
try {
if (typeof vmResults[item[1]] !== "undefined") eval(item[0] + ' = vmResults["' + item[1] + '"]');
} catch (e) {
}
updateFromVM.forEach((item) => {
// Here we read back certain data from the ServiceVault Script Context Object
try {
if (typeof vmResults[item[1]] !== "undefined") eval(item[0] + ' = vmResults["' + item[1] + '"]');
} catch (e) {
console.error("vm readback error", e);
}
});
if (request_is_async && !minisrv_config.config.debug_flags.quiet) console.log(" * Script requested Asynchronous mode");
break;
@@ -763,18 +813,33 @@ minisrv-no-mail-count: true`;
processPath(socket, urlToPath, request_headers, service_name, shared_romcache, pc_services);
} else if ((shortURL.indexOf('http://') >= 0 || shortURL.indexOf('https://') >= 0) && !pc_services) {
doHTTPProxy(socket, request_headers);
} else if (shortURL.indexOf('file://') >= 0) {
shortURL = shortURL.replace("file://",'').replace("romcache", "ROMCache");
service_name = "wtv-star";
var urlToPath = wtvshared.fixPathSlashes(service_name + path.sep + shortURL);
processPath(socket, urlToPath, request_headers, service_name, shared_romcache, pc_services);
} else if (pc_services) {
// if a directory, request index
if (shortURL.substring(shortURL.length - 1) == "/") shortURL += "index";
var urlToPath = wtvshared.fixPathSlashes(service_name + path.sep + shortURL);
processPath(socket, urlToPath, request_headers, service_name, shared_romcache, pc_services);
} else {
// error reading headers (no request_url provided)
var errpage = wtvshared.doErrorPage(400);
headers = errpage[0];
data = errpage[1]
socket_sessions[socket.id].close_me = true;
sendToClient(socket, headers, data);
debug('request_headers', request_headers);
if (request_headers.request.indexOf("HTTP/1.0") > 0) {
// webtv in HTTP/1.0 mode, try to kick it back to WTVP
var errpage = wtvshared.doErrorPage(500, null, null, false, true);
headers = errpage[0];
data = ''
socket_sessions[socket.id].close_me = true;
sendToClient(socket, headers, data);
} else {
// error reading headers (no request_url provided)
var errpage = wtvshared.doErrorPage(400, null, null, false, true);
headers = errpage[0];
data = ''
socket_sessions[socket.id].close_me = true;
sendToClient(socket, headers, data);
}
}
}
}
@@ -1803,7 +1868,18 @@ function getGitRevision() {
var minisrv_config = null;
function reloadConfig() {
var temp = { "version": minisrv_config.version }
if (minisrv_config.config.git_commit) temp.git_commit = minisrv_config.config.git_commit;
minisrv_config = wtvshared.readMiniSrvConfig(true, false, true); // snatches minisrv_config
minisrv_config.version = temp.version
if (temp.git_commit) minisrv_config.config.git_commit = temp.git_commit;
if (minisrv_config.config.service_logo.indexOf(':') == -1) minisrv_config.config.service_logo = "wtv-star:/ROMCache/" + minisrv_config.config.service_logo;
if (minisrv_config.config.service_splash_logo.indexOf(':') == -1) minisrv_config.config.service_splash_logo = "wtv-star:/ROMCache/" + minisrv_config.config.service_splash_logo;
Object.keys(minisrv_config.services).forEach((k) => {
configureService(k, minisrv_config.services[k])
});
return minisrv_config;
}
@@ -1845,73 +1921,41 @@ if (minisrv_config.config.SessionStore) {
if (minisrv_config.config.ServiceDeps) {
var ServiceDeps = wtvshared.returnAbsolutePath(minisrv_config.config.ServiceDeps);
console.log(" * Configured Service Dependancies at", ServiceDeps);
console.log(" * Configured Service Dependencies at", ServiceDeps);
} else {
throw ("ERROR: No Service Dependancies Directory (SessionDeps) defined!");
throw ("ERROR: No Service Dependencies Directory (SessionDeps) defined!");
}
var service_ip = minisrv_config.config.service_ip;
Object.keys(minisrv_config.services).forEach(function (k) {
if (minisrv_config.services[k].disabled) return;
if (configureService(k, minisrv_config.services[k], true)) {
console.log(" * Configured Service:", k, "on Port", minisrv_config.services[k].port, "- Service Host:", minisrv_config.services[k].host, "- Bind Port:", !minisrv_config.services[k].nobind, "- PC Services Mode:", (minisrv_config.services[k].pc_services) ? true : false);
minisrv_config.services[k].name = k;
if (!minisrv_config.services[k].host) {
minisrv_config.services[k].host = service_ip;
}
if (minisrv_config.services[k].port && !minisrv_config.services[k].nobind) {
if (minisrv_config.services[k].pc_services) pc_ports.push(minisrv_config.services[k].port);
else ports.push(minisrv_config.services[k].port);
}
// minisrv_config service toString
minisrv_config.services[k].toString = function (overrides) {
var self = Object.assign({}, this);
if (overrides != null) {
if (typeof (overrides) == 'object') {
Object.keys(overrides).forEach(function (k) {
if (k != "exceptions") self[k] = overrides[k];
});
}
}
if ((k == "wtv-star" && self.no_star_word != true) || k != "wtv-star") {
var outstr = "wtv-service: name=" + self.name + " host=" + self.host + " port=" + self.port;
if (self.flags) outstr += " flags=" + self.flags;
if (self.connections) outstr += " connections=" + self.connections;
}
if (k == "wtv-star") {
outstr += "\nwtv-service: name=wtv-* host=" + self.host + " port=" + self.port;
if (self.flags) outstr += " flags=" + self.flags;
if (self.connections) outstr += " connections=" + self.connections;
}
return outstr;
}
console.log(" * Configured Service:", k, "on Port", minisrv_config.services[k].port, "- Service Host:", minisrv_config.services[k].host, "- Bind Port:", !minisrv_config.services[k].nobind, "- PC Services Mode:", (minisrv_config.services[k].pc_services) ? true : false);
if (minisrv_config.services[k].local_nntp_port) {
if (!wtvnewsserver) {
const WTVNewsServer = require(classPath + "/WTVNewsServer.js");
var local_nntp_using_auth = false;
if (minisrv_config.services[k].local_nntp_requires_auth) {
local_nntp_using_auth = true;
if (minisrv_config.services[k].local_auth) {
// auth required, and info defined in config
wtvnewsserver = new WTVNewsServer(minisrv_config, minisrv_config.services[k].local_nntp_port, true, minisrv_config.services[k].local_auth.username, minisrv_config.services[k].local_auth.password);
console.log(" * Configured Service: Local NNTP", "on 127.0.0.1:" + minisrv_config.services[k].local_nntp_port, "(TLS) - Auth required:", local_nntp_using_auth, "- Auth: As Configured");
if (minisrv_config.services[k].local_nntp_port) {
if (!wtvnewsserver) {
const WTVNewsServer = require(classPath + "/WTVNewsServer.js");
var local_nntp_using_auth = false;
if (minisrv_config.services[k].local_nntp_requires_auth) {
local_nntp_using_auth = true;
if (minisrv_config.services[k].local_auth) {
// auth required, and info defined in config
wtvnewsserver = new WTVNewsServer(minisrv_config, minisrv_config.services[k].local_nntp_port, true, minisrv_config.services[k].local_auth.username, minisrv_config.services[k].local_auth.password);
console.log(" * Configured Service: Local NNTP", "on 127.0.0.1:" + minisrv_config.services[k].local_nntp_port, "(TLS) - Auth required:", local_nntp_using_auth, "- Auth: As Configured");
} else {
// auth required, but randomly generated
wtvnewsserver = new WTVNewsServer(minisrv_config, minisrv_config.services[k].local_nntp_port, true);
console.log(" * Configured Service: Local NNTP", "on 127.0.0.1:" + minisrv_config.services[k].local_nntp_port, "(TLS) - Auth required:", local_nntp_using_auth, "- Auth (randgen): User:", wtvnewsserver.username, "Pass:", wtvnewsserver.password);
}
} else {
// auth required, but randomly generated
wtvnewsserver = new WTVNewsServer(minisrv_config, minisrv_config.services[k].local_nntp_port, true);
console.log(" * Configured Service: Local NNTP", "on 127.0.0.1:" + minisrv_config.services[k].local_nntp_port, "(TLS) - Auth required:", local_nntp_using_auth, "- Auth (randgen): User:", wtvnewsserver.username, "Pass:", wtvnewsserver.password);
// no auth required on local server
wtvnewsserver = new WTVNewsServer(minisrv_config, minisrv_config.services[k].local_nntp_port);
console.log(" * Configured Service: Local NNTP", "on 127.0.0.1:" + minisrv_config.services[k].local_nntp_port, "(TLS) - Auth required:", local_nntp_using_auth, "- Auth: None");
}
if (minisrv_config.services[k].featuredGroups) {
Object.keys(minisrv_config.services[k].featuredGroups).forEach((j) => {
wtvnewsserver.createGroup(minisrv_config.services[k].featuredGroups[j].group, minisrv_config.services[k].featuredGroups[j].description || null);
})
}
} else {
// no auth required on local server
wtvnewsserver = new WTVNewsServer(minisrv_config, minisrv_config.services[k].local_nntp_port);
console.log(" * Configured Service: Local NNTP", "on 127.0.0.1:" + minisrv_config.services[k].local_nntp_port, "(TLS) - Auth required:", local_nntp_using_auth, "- Auth: None");
}
if (minisrv_config.services[k].featuredGroups) {
Object.keys(minisrv_config.services[k].featuredGroups).forEach((j) => {
wtvnewsserver.createGroup(minisrv_config.services[k].featuredGroups[j].group, minisrv_config.services[k].featuredGroups[j].description || null);
})
}
}
}

View File

@@ -72,7 +72,7 @@ class WTVAdmin {
}
}
isAuthorized() {
isAuthorized(justchecking = false) {
var allowed_ssid = false;
var allowed_ip = false;
if (this.minisrv_config.services[this.service_name].authorized_ssids) {
@@ -95,11 +95,15 @@ class WTVAdmin {
}
});
}
return (allowed_ssid && allowed_ip) ? true : this.rejectConnection(!allowed_ssid);
if (justchecking) {
return (allowed_ssid && allowed_ip) ? true : false;
} else {
return (allowed_ssid && allowed_ip) ? true : this.rejectConnection(!allowed_ssid);
}
}
getAccountInfo(username, directory = null) {
var search_dir = this.minisrv_config.config.SessionStore;
var search_dir = this.minisrv_config.config.SessionStore + this.path.sep + "accounts";
var account_data = null;
var self = this;
if (directory) search_dir = directory;
@@ -114,7 +118,7 @@ class WTVAdmin {
var temp_session_data = JSON.parse(temp_session_data_file);
if (temp_session_data.subscriber_username.toLowerCase() == username.toLowerCase()) {
account_data = [temp_session_data, (search_dir + self.path.sep + file).replace(this.minisrv_config.config.SessionStore + this.path.sep, "").split(this.path.sep)[0]];
account_data = [temp_session_data, (search_dir + self.path.sep + file).replace(this.minisrv_config.config.SessionStore + this.path.sep + "accounts", "").split(this.path.sep)[1]];
}
} catch (e) {
console.error(" # Error parsing Session Data JSON", search_dir + self.path.sep + file, e);

View File

@@ -188,6 +188,10 @@ class WTVClientSessionData {
);
}
getAccountStoreDirectory() {
return this.minisrv_config.config.SessionStore + this.path.sep + "accounts";
}
/**
* Returns the absolute path to the user's file store, or false if unregistered
* @param subscriber {boolean} Returns the parent subscriber directory instead of the user's directory
@@ -195,7 +199,7 @@ class WTVClientSessionData {
*/
getUserStoreDirectory(subscriber = false, user_id = null) {
if (user_id == null) user_id = this.user_id;
var userstore = this.minisrv_config.config.SessionStore + this.path.sep + this.ssid + this.path.sep;
var userstore = this.getAccountStoreDirectory() + this.path.sep + this.ssid + this.path.sep;
if (!subscriber) userstore += "user" + user_id + this.path.sep;
return userstore;
}
@@ -539,7 +543,7 @@ class WTVClientSessionData {
}
unregisterBox() {
var user_store_base = this.wtvshared.makeSafePath(this.wtvshared.getAbsolutePath(this.minisrv_config.config.SessionStore), this.path.sep + this.ssid);
var user_store_base = this.wtvshared.makeSafePath(this.wtvshared.getAbsolutePath(this.getAccountStoreDirectory()), this.path.sep + this.ssid);
try {
if (this.fs.existsSync(user_store_base + ".json")) {
this.fs.unlinkSync(user_store_base + ".json");

View File

@@ -73,7 +73,15 @@ class WTVFavorites {
var store_dir = this.favstore_dir + folder_dir;
}
return store_dir;
}
}
checkFolderName(foldername) {
var regex_str = "^([A-Za-z0-9\-\_]{1,}$";
var regex = new RegExp(regex_str);
return regex.test(foldername);
}
createTemplateFolder(folder) {
// create emply folder

View File

@@ -1,7 +1,7 @@
class WTVFlashrom {
fs = require('fs');
https = require('https');
https = require('follow-redirects').https;
use_zefie_server = true;
bf0app_update = false;
service_vaults = new Array();
@@ -129,7 +129,7 @@ class WTVFlashrom {
async getFlashromMeta(request_path, callback) {
// read 512 bytes of rom, and send result of getFlashromInfo
// to callback (in data), without headers
// to callback (in data)
this.getFlashRom(request_path, callback, 512);
}
@@ -164,13 +164,12 @@ class WTVFlashrom {
})
res.on('end', function () {
if (self.minisrv_config.config.debug_flags.debug) console.log(` * Zefie's FlashROM Server HTTP Status: ${res.statusCode} ${res.statusMessage}`)
if (self.minisrv_config.config.debug_flags.debug) console.log(` * zefie's FlashROM Server HTTP Status: ${res.statusCode} ${res.statusMessage}`)
if (res.statusCode == 200) {
var data = Buffer.from(data_hex, 'hex');
} else if (res.statusCode == 206) {
var data = self.getFlashromInfo(Buffer.from(data_hex, 'hex'), request_path);
} else if (res.statusCode == 404) {
console.log(request_path);
var errpage = self.wtvshared.doErrorPage(404, "The service could not find the requested ROM on zefie's server.")
headers = errpage[0];
var data = errpage[1];

View File

@@ -96,7 +96,7 @@ class WTVMail {
}
mailboxExists(mailboxid) {
if (mailboxid > this.mailboxes.length) return null;
if (mailboxid >= this.mailboxes.length) return null;
var mailbox_dir = null;
if (this.mailstoreExists()) {
var mailbox_name = this.getMailboxById(mailboxid);
@@ -182,7 +182,7 @@ class WTVMail {
}
try {
if (this.fs.existsSync(message_file_out)) {
console.log(" * ERROR: Message with this UUID (" + messageid + ") already exists (should never happen). Message lost.");
console.error(" * ERROR: Message with this UUID (" + messageid + ") already exists (should never happen). Message lost.");
return false;
}
@@ -389,7 +389,7 @@ class WTVMail {
var temp_session_data_file = self.fs.readFileSync(search_dir + self.path.sep + file, 'Utf8');
var temp_session_data = JSON.parse(temp_session_data_file);
if (temp_session_data.subscriber_username.toLowerCase() == username.toLowerCase()) {
return_val = search_dir.replace(this.minisrv_config.config.SessionStore + self.path.sep, '').replace("user", '').split(self.path.sep);
return_val = search_dir.replace(this.minisrv_config.config.SessionStore + self.path.sep + "accounts" + self.path.sep, '').replace("user", '').split(self.path.sep);
return_val.push(temp_session_data.subscriber_name);
}
} catch (e) {
@@ -437,7 +437,7 @@ class WTVMail {
// check if the destination user's Inbox exists yet
if (!dest_user_mailstore.mailboxExists(0)) {
// mailbox does not yet exist, create it
var mailbox_exists = dest_user_mailstore.createMailbox(mailbox);
var mailbox_exists = dest_user_mailstore.createMailbox(0);
// Just created Inbox for the first time, so create the welcome message
if (mailbox_exists) dest_user_mailstore.createWelcomeMessage();
}

View File

@@ -9,12 +9,14 @@ class WTVNews {
username = null;
password = null;
posting_allowed = true;
debug = null;
constructor(minisrv_config, service_name) {
this.minisrv_config = minisrv_config;
this.service_name = service_name;
const { WTVShared } = require("./WTVShared.js");
this.wtvshared = new WTVShared(minisrv_config);
this.debug = require('debug')('WTVNews');
}
initializeUsenet(host, port = 119, tls_options = null, username = null, password = null) {
@@ -393,17 +395,20 @@ class WTVNews {
var section = element.split("\n");
attachments[i] = {};
section.forEach((line) => {
this.debug('section_type', section_type, 'line', line);
var section_header_match = line.match(/^Content\-/i)
if (section_header_match) {
var section_match = line.match(/^Content\-Type\: (.+)\;/i)
if (section_match) {
this.debug('section_match', section_match)
section_type = section_match[1];
if (section_match[1].match("text/plain")) {
section_type = section_match[1].match("text/plain")[1];
message_type = section_type;
} else {
section_type = section_match[1];
attachments[i].content_type = section_match[1]
}
this.debug('section_type', section_type)
}
section_match = line.match(/^Content\-Disposition\: (.+)\;/i)
if (section_match) {
@@ -476,6 +481,9 @@ class WTVNews {
mainref = searchart.messageId;
message_relations[mainref].push({ "messageId": messageId, "index": k });
found = true;
} else {
// no relation, missing reference, add as root
message_id_roots.push({ "messageId": messageId, "index": k });
}
});
}
@@ -508,7 +516,7 @@ class WTVNews {
// sort relations by date
var article = messages[message_relations[message_id_roots[k].messageId][j].index];
var article_date = Date.parse(article.headers.DATE);
relations.push({ "article": article, "relation": message_id_roots[k].messageId, "date": article_date })
relations.push({ "article": article, "relation": message_id_roots[k].messageId || null, "date": article_date })
});
relations.sort((a, b) => { return (a.date - b.date) });
Object.keys(relations).forEach((j) => {

View File

@@ -9,7 +9,7 @@ class WTVRegister {
constructor(minisrv_config, session_store_dir = null) {
this.minisrv_config = minisrv_config;
this.service_owner = minisrv_config.config.service_owner || "a minisrv user";
if (session_store_dir) this.session_store_dir = session_store_dir
this.session_store_dir = session_store_dir || this.minisrv_config.config.SessionStore;
}
getServiceOperator(first_letter_lower = false) {
@@ -29,28 +29,42 @@ class WTVRegister {
checkUsernameAvailable(username, directory = null) {
// returns the user's ssid, and user_id and userid in an array if true, false if not
var search_dir = this.minisrv_config.config.SessionStore;
var return_val = false;
var self = this;
if (directory) search_dir = directory;
this.fs.readdirSync(search_dir).forEach(file => {
if (self.fs.lstatSync(search_dir + self.path.sep + file).isDirectory() && !return_val) {
if (search_dir.match(/minisrv\_internal\_nntp/)) return;
return_val = !self.checkUsernameAvailable(username, search_dir + self.path.sep + file);
}
if (!file.match(/user.*\.json/ig)) return;
try {
var temp_session_data_file = self.fs.readFileSync(search_dir + self.path.sep + file, 'Utf8');
var temp_session_data = JSON.parse(temp_session_data_file);
console.log(temp_session_data.subscriber_username.toLowerCase());
if (temp_session_data.subscriber_username.toLowerCase() == username.toLowerCase()) {
return_val = true;
var return_val = false;
// returns the user's ssid, and user_id and userid in an array if true, false if not
// check against reserved name list
if (this.minisrv_config.config.user_accounts.reserved_names) {
Object.keys(this.minisrv_config.config.user_accounts.reserved_names).forEach((k) => {
if (self.minisrv_config.config.user_accounts.reserved_names[k].toLowerCase() == username.toLowerCase()) return_val = true;
})
}
if (return_val) return !return_val;
// check against user accounts
directory = (directory) ? directory : this.session_store_dir + this.path.sep + "accounts";
console.log(directory)
if (this.fs.existsSync(directory)) {
this.fs.readdirSync(directory).forEach(file => {
if (self.fs.lstatSync(directory + self.path.sep + file).isDirectory() && !return_val) {
return_val = !self.checkUsernameAvailable(username, directory + self.path.sep + file);
}
} catch (e) {
console.error(" # Error parsing Session Data JSON", search_dir + self.path.sep + file, e);
}
});
if (!file.match(/user.*\.json/ig)) return;
try {
var temp_session_data_file = self.fs.readFileSync(directory + self.path.sep + file, 'Utf8');
var temp_session_data = JSON.parse(temp_session_data_file);
if (temp_session_data.subscriber_username) {
if (temp_session_data.subscriber_username.toLowerCase() == username.toLowerCase()) {
return_val = true;
}
}
} catch (e) {
console.error(" # Error parsing Session Data JSON", search_dir + self.path.sep + file, e);
}
});
}
return !return_val;
}

View File

@@ -14,6 +14,7 @@ class WTVShared {
iconv = require('iconv-lite');
parentDirectory = process.cwd()
extend = require('util')._extend;
debug = require('debug')('WTVShared')
minisrv_config = [];
@@ -40,6 +41,18 @@ class WTVShared {
}
}
atob(a) {
const CryptoJS = require('crypto-js');
const enc = CryptoJS.enc.Base64.parse(a);
return CryptoJS.enc.Utf8.stringify(enc)
}
btoa(b) {
const CryptoJS = require('crypto-js');
const enc = CryptoJS.enc.Utf8.parse(b); // encodedWord Array object
return CryptoJS.enc.Base64.stringify(enc);
}
cloneObj(src) {
if (src instanceof RegExp) {
return new RegExp(src);
@@ -59,6 +72,87 @@ class WTVShared {
return src;
}
isAdmin(wtvclient, service_name = "wtv-admin") {
var WTVAdmin = require("./WTVAdmin.js");
var wtva = new WTVAdmin(this.minisrv_config, wtvclient, service_name);
var result = wtva.isAuthorized(true);
wtva, WTVAdmin = null;
return result;
}
parseJSON(json) {
if (!json) return null;
if (typeof json !== 'string') json = json.toString();
// from https://github.com/getify/JSON.minify/blob/javascript/minify.json.js
var tokenizer = /"|(\/\*)|(\*\/)|(\/\/)|\n|\r/g,
in_string = false,
in_multiline_comment = false,
in_singleline_comment = false,
tmp, tmp2, new_str = [], ns = 0, from = 0, lc, rc,
prevFrom
;
tokenizer.lastIndex = 0;
while (tmp = tokenizer.exec(json)) {
lc = RegExp.leftContext;
rc = RegExp.rightContext;
if (!in_multiline_comment && !in_singleline_comment) {
tmp2 = lc.substring(from);
if (!in_string) {
tmp2 = tmp2.replace(/(\n|\r|\s)+/g, "");
}
new_str[ns++] = tmp2;
}
prevFrom = from;
from = tokenizer.lastIndex;
// found a " character, and we're not currently in
// a comment? check for previous `\` escaping immediately
// leftward adjacent to this match
if (tmp[0] == "\"" && !in_multiline_comment && !in_singleline_comment) {
// perform look-behind escaping match, but
// limit left-context matching to only go back
// to the position of the last token match
//
// see: https://github.com/getify/JSON.minify/issues/64
tmp2 = lc.substring(prevFrom).match(/\\+$/);
// start of string with ", or unescaped " character found to end string?
if (!in_string || !tmp2 || (tmp2[0].length % 2) == 0) {
in_string = !in_string;
}
from--; // include " character in next catch
rc = json.substring(from);
}
else if (tmp[0] == "/*" && !in_string && !in_multiline_comment && !in_singleline_comment) {
in_multiline_comment = true;
}
else if (tmp[0] == "*/" && !in_string && in_multiline_comment && !in_singleline_comment) {
in_multiline_comment = false;
}
else if (tmp[0] == "//" && !in_string && !in_multiline_comment && !in_singleline_comment) {
in_singleline_comment = true;
}
else if ((tmp[0] == "\n" || tmp[0] == "\r") && !in_string && !in_multiline_comment && in_singleline_comment) {
in_singleline_comment = false;
}
else if (!in_multiline_comment && !in_singleline_comment && !(/\n|\r|\s/.test(tmp[0]))) {
new_str[ns++] = tmp[0];
}
}
new_str[ns++] = rc;
return JSON.parse(new_str.join(""));
}
isConfiguredService(service) {
if (this.minisrv_config.services[service]) {
if (!this.minisrv_config.services[service].disabled) return true;
}
return false;
}
getServiceString(service, overrides = {}) {
// used externally by service scripts
if (service === "all") {
@@ -74,10 +168,10 @@ class WTVShared {
});
return out;
} else {
if (!minisrv_config.services[service]) {
if (!this.minisrv_config.services[service]) {
throw ("SERVICE ERROR: Attempted to provision unconfigured service: " + service)
} else {
return minisrv_config.services[service].toString(overrides);
return this.minisrv_config.services[service].toString(overrides);
}
}
}
@@ -119,8 +213,17 @@ class WTVShared {
}
});
var allowedProtocols = allowedSchemes;
// allow links to services flagged as "wideopen"
Object.keys(this.minisrv_config.services).forEach((k) => {
var flag = parseInt(this.minisrv_config.services[k].flags, 16);
if (flag === 4 || flag === 7) {
allowedProtocols.push(k);
}
});
const clean = this.sanitizeHtml(string, {
allowedTags: ['a', 'audioscope', 'b', 'bgsound', 'big', 'blackface', 'blockquote', 'bq', 'br', 'caption', 'center', 'cite', 'c', 'dd', 'dfn', 'div', 'dl', 'dt', 'fn', 'font', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'html', 'i', 'img', 'label', 'li', 'link', 'listing', 'em', 'marquee', 'nobr', 'note', 'ol', 'p', 'plaintext', 'pre', 's', 'samp', 'small', 'span', 'strike', 'strong', 'style', 'sub', 'sup', 'tbody', 'table', 'td', 'th', 'tr', 'tt', 'u', 'ul'],
allowedTags: ['a', 'audioscope', 'b', 'bgsound', 'big', 'blackface', 'blockquote', 'bq', 'br', 'caption', 'center', 'cite', 'c', 'dd', 'dfn', 'div', 'dl', 'dt', 'fn', 'font', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'html', 'i', 'img', 'label', 'li', 'link', 'listing', 'em', 'marquee', 'nobr', 'note', 'ol', 'p', 'plaintext', 'pre', 's', 'samp', 'small', 'span', 'strike', 'strong', 'sub', 'sup', 'tbody', 'table', 'td', 'th', 'tr', 'tt', 'u', 'ul'],
disallowedTagsMode: 'discard',
allowedAttributes: {
a: ['href', 'name', 'target'],
@@ -132,11 +235,25 @@ class WTVShared {
allowedSchemes: allowedSchemes,
allowedSchemesByTag: {},
allowedSchemesAppliedToAttributes: ['href', 'src', 'cite'],
allowVulnerableTags: true,
exclusiveFilter: function (frame) {
var allowed = false;
Object.keys(frame.attribs).forEach((k) => {
if (k == "href" || k == "background" || k == "src") {
var value = frame.attribs[k];
Object.keys(allowedProtocols).forEach((j) => {
if (value.startsWith(allowedProtocols[j])) {
allowed = true;
}
})
}
});
console.log(frame, allowed);
return !allowed;
},
allowVulnerableTags: false,
allowProtocolRelative: false
})
}, true)
// todo: add missing user open tags (eg </i> if user did not close it) (might be done by sanitize-html?)
// todo: figure out bgcolor and text color voodoo
return clean;
}
@@ -229,12 +346,12 @@ class WTVShared {
getUserConfig() {
try {
var user_config_filename = this.getAbsolutePath("user_config.json", this.parentDirectory);
if (this.fs.lstatSync(user_config_filename)) {
try {
var minisrv_user_config = JSON.parse(this.fs.readFileSync(user_config_filename));
var minisrv_user_config = this.parseJSON(this.fs.readFileSync(user_config_filename));
} catch (e) {
console.error("ERROR: Could not read user_config.json", e);
var throw_me = true;
throw ("ERROR: Could not read user_config.json", e);
}
} else {
var minisrv_user_config = {}
@@ -281,7 +398,7 @@ class WTVShared {
readMiniSrvConfig(user_config = true, notices = true, reload_notice = false) {
if (notices || reload_notice) console.log(" *** Reading global configuration...");
try {
var minisrv_config = JSON.parse(this.fs.readFileSync(this.getAbsolutePath("config.json", __dirname)));
var minisrv_config = this.parseJSON(this.fs.readFileSync(this.getAbsolutePath("config.json", __dirname)));
} catch (e) {
throw ("ERROR: Could not read config.json", e);
}
@@ -677,7 +794,7 @@ class WTVShared {
});
}
doErrorPage(code, data = null, details = null, pc_mode = false) {
doErrorPage(code, data = null, details = null, pc_mode = false, wtv_reset = false) {
var headers = null;
var minisrv_config = this.minisrv_config;
switch (code) {
@@ -713,7 +830,12 @@ class WTVShared {
headers += "Content-Type: text/html\n";
break;
}
console.error(" * doErrorPage Called:", code, data);
if (wtv_reset && !pc_mode) {
headers += "wtv-service: reset\n";
headers += this.getServiceString('wtv-1800') + "\n";
headers += "wtv-visit: wtv-1800:/preregister?scriptless-visit-reason=999\n";
console.error(" * doErrorPage Called (sent wtv-reset):", code, data);
} else console.error(" * doErrorPage Called:", code, data);
return new Array(headers, data);
}
@@ -765,6 +887,12 @@ class WTVShared {
return ssid;
}
makeSafeStringPath(path = "") {
path = path.replace(/[^\w]/g, "").replace(/\.\./g, "");
if (path.length == 0) path = null;
return path;
}
unpackCompressedB64(data) {
var data_buf = (typeof data === 'object') ? Buffer.from(data.toString('ascii'), 'base64') : Buffer.from(data, 'base64');
@@ -803,7 +931,7 @@ class clientShowAlert {
noback = null;
image = null;
constructor(image = null, message = null, buttonlabel1 = null, buttonaction1 = null, buttonlabel2 = null, buttonaction2 = null, noback = null) {
constructor(image = null, message = null, buttonlabel1 = null, buttonaction1 = null, buttonlabel2 = null, buttonaction2 = null, noback = null, sound = null) {
this.message = message;
this.buttonlabel1 = buttonlabel1;
this.buttonlabel2 = buttonlabel2;
@@ -811,6 +939,9 @@ class clientShowAlert {
this.buttonaction2 = buttonaction2;
this.message = message;
this.noback = noback;
this.sound = sound;
if (this.sound === false) this.sound = "none";
if (typeof image === 'object') {
this.image = null;
Object.keys(image).forEach(function (k) {
@@ -829,6 +960,7 @@ class clientShowAlert {
if (this.buttonlabel2) url += "buttonlabel2=" + escape(this.buttonlabel2) + "&";
if (this.buttonaction2) url += "buttonaction2=" + escape(this.buttonaction2) + "&";
if (this.image) url += "image=" + escape(this.image) + "&";
if (this.sound) url += "sound=" + escape(this.sound) + "&";
if (this.noback) url += "noback=true&";
return url.substring(0, url.length - 1);
}

View File

@@ -1,58 +1,74 @@
{
/*
STOP! STOP! STOP!
Do NOT edit this file. Instead make a file called "user_config.json" in the same folder as "app.js"
With that, you can override anything defined here. You can copy this config as a template, but should
only leave in things you are actually overriding, in case a future feature update changes any defaults.
*/
"config": {
"service_ip": "127.0.0.1",
"bind_ip": "0.0.0.0",
"service_ip": "127.0.0.1", // IP sent to the box (public IP for public service, LAN IP for local testing)
"bind_ip": "0.0.0.0", // IP on your machine to bind to (0.0.0.0 = All Interfaces/IPs)
"ServiceVaults": [
/* Service Vaults: See ServiceVault.md for more info */
"UserServiceVault",
"ServiceVault"
],
"ServiceTemplates": [
/* Service Templates: Works like ServiceVaults. See ServiceVault.md for more info */
"UserTemplates",
"ServiceDeps/templates"
],
"ServiceDeps": "ServiceDeps",
"SessionStore": "SessionStore",
"SharedROMCache": "SharedROMCache",
"enable_shared_romcache": true,
"service_owner": "a minisrv user",
"service_owner_account": "minisrvuser",
"service_owner_contact": "someone",
"service_owner_contact_method": "something",
"service_name": "WebTV",
"service_logo": "WebTVLogoJewel.gif",
"service_splash_logo": "file://ROM/images/SplashLogo1.gif",
"hide_ssid_in_logs": true,
"filter_passwords_in_logs": true,
"post_percentages": [ 0, 25, 50, 100 ],
"verbosity": 2,
"socket_timeout": 86400,
"post_data_socket_timeout": 30,
"error_log_file": "errors.log",
"catchall_file_name": "catchall.js",
"hide_incomplete_features": true,
"enable_lzpf_compression": true,
"enable_gzip_compression": true,
"show_detailed_splash": true,
"show_diskmap": false,
"unauthorized_url": "wtv-1800:/unauthorized?",
"enable_port_isolation": true,
"allow_guests": true,
"domain_name": "wtv.zefie.com",
"ssid_block_list": [
"minisrv_internal_nntp"
],
"user_accounts": {
"max_users_per_account": 6,
"min_username_length": 5,
"max_username_length": 18
"ServiceDeps": "ServiceDeps", // Where the Service Dependancies are. Best left unchanged.
"SessionStore": "SessionStore", // Where we store account (session) data. Best left unchanged.
"SharedROMCache": "SharedROMCache", // Shared ROMCache (wtv-service:/ROMCache/, where wtv-service is any configured service). Best left unchanged.
"enable_shared_romcache": true, // Disabling this will cause a lot of problems without manual intervention. Best left unchanged.
"service_owner": "a minisrv user", // Set this to your name or screenname
"service_owner_account": "minisrvuser", // Set this to your account name on your minisrv
"service_owner_contact": "someone", // Set this to your contact (eg email address, twitter handle, etc)
"service_owner_contact_method": "something", // Set this to the contact method (eg email, twitter, etc)
"service_name": "minisrv", // What you want your service to be called
"service_logo": "minisrv.gif", // The logo shown on most service pages and error alerts. Can be absolute path or the name of a file in the SharedROMCache.
"service_splash_logo": "splash_minisrv.gif", // The logo shown on the splash screen. Can be absolute path or the name of a file in the SharedROMCache.
"hide_ssid_in_logs": true, // Filter SSIDs with asterisks to prevent accidently leaking user SSIDs when debugging.
"filter_passwords_in_logs": true, // Filter passwords (form fields containing "pass") to prevent accidently leaking user passwords when debugging.
"post_percentages": [ 0, 25, 50, 100 ], // When recieving POST data from the client, we display the progress of the transfer in the console log if the verbosity is high enough. Here you can show more or less updates.
"verbosity": 2, // 0 thru 4, lowest is quietest, higher is more verbose. Best set to 4 if something is going wrong.
"socket_timeout": 86400, // How long after we last gotten a request from a client before we clean up its data. The client can always restore it with the ticket.
"post_data_socket_timeout": 30, // How long until we give up waiting for data from the client in a POST transfer. Too little and POSTs will fail when dialup retrains. Too much and the server may stall waiting.
"error_log_file": "errors.log", // Where to write errors to disk
"catchall_file_name": "catchall.js", // default catchall filename
"hide_incomplete_features": true, // this is barely used and being phase out. leave it unchanged.
"enable_lzpf_compression": true, // Toggle LZPF (old classic) compression. Best left unchanged.
"enable_gzip_compression": true, // Toggle GZIP (all other boxes) compression. Best left unchanged.
"show_detailed_splash": true, // Shows the service name, server version, and user connect speed on the splash page
"show_diskmap": false, // Useful for debugging custom Diskmaps
"unauthorized_url": "wtv-1800:/unauthorized?", // Where to send unauthorized users
"enable_port_isolation": true, // Only respond to services on their correct ports
"allow_guests": true, // Allow users to experience the server without registering
"domain_name": "wtv.zefie.com", // For usenet and future stuff, no need to change just yet
"user_accounts": { // user account settings
"max_users_per_account": 6, // Max total users (including primary) per account
"min_username_length": 5, // minimum username length
"max_username_length": 18, // maximum username length
"reserved_names": [
// reserved account names, users (nor admins) can register these
"AccountDisabled",
"Demo",
"abuse",
"support",
"registration",
"null"
]
},
"passwords": {
"enabled": true,
"min_length": 5,
"max_length": 32,
"form_size": 16
// password configuration
"enabled": true, // allow users to password protect their account
"min_length": 5, // minimum length of user passwords
"max_length": 32, // max length of user passwords
"form_size": 16 // width of the form on the password prompt screen
},
"errorMessages": {
// define custom error messages here
"400": "${service_name} ran into a technical problem. Please try again.",
"401": "Authorization Required.",
"403": "The publisher of that page has not authorized you to view it.",
@@ -60,6 +76,7 @@
"500": "${service_name} ran into a technical problem. Please try again."
},
"lockdownWhitelist": [
// urls the client can access without being "logged in"
"wtv-1800:/preregister",
"wtv-head-waiter:/login",
"wtv-head-waiter:/ValidateLogin",
@@ -77,26 +94,33 @@
]
},
"services": {
// service definitions
"wtv-head-waiter": {
// wtv-head-waiter handles logins
"port": 1601,
"connections": 1
},
"wtv-tricks": {
// wtv-tricks
"port": 1602,
"flags": "0x00000004"
},
"wtv-star": {
// wtv-star is used for custom logos and internally by WebTV clients for service outages
"port": 1603,
"flags": "0x00000007"
},
"wtv-news": {
// Usenet
"port": 1605,
"local_nntp_port": 57319,
"local_nntp_requires_auth": true,
"local_nntp_port": 57319, // Port for internal NNTP
"local_nntp_requires_auth": true, // Needs to be enabled for posting
"modules": [
"WTVNews"
],
"featuredGroups": [
// groups featured on wtv-news:/lobby. These groups are automatically created if they do not exist.
{
"name": "WebTV",
"group": "webtv.users",
@@ -118,57 +142,68 @@
"description": "Explore the sounds of Beatnik with your WebTV"
}
],
"groupMetaRefreshInterval": 86400
"groupMetaRefreshInterval": 86400 // not yet used
},
"wtv-register": {
// wtv-register
"port": 1607,
"privileged": true
},
"wtv-log": {
// wtv-log
"port": 1609,
"connections": 1,
"write_logs_to_disk": false
"write_logs_to_disk": false // set this to true to save logs to the error_log_file set above
},
"wtv-home": {
// wtv-home
"port": 1612
},
"wtv-1800": {
// wtv-1800
"port": 1615,
"connections": 1,
"flags": "0x00000004",
"send_tellyscripts": false
"send_tellyscripts": true // Best left untouched
},
"wtv-flashrom": {
// wtv-flashrom
"port": 1618,
"flags": "0x00000040",
"debug": false,
"use_zefie_server": true,
"bf0app_default_rom": "content/artemis-webtv-000/build7377/internal-nondebug/bf0app-part000.rom",
"catchall_file_name": "content-serve.js"
"use_zefie_server": true, // access zefie's repository of flashroms, local roms will still be used if they exist. Best left unchanged.
"bf0app_default_rom": "content/artemis-webtv-000/build7377/internal-nondebug/bf0app-part000.rom", // Can change the default build for bf0app
"catchall_file_name": "content-serve.js" // catchall for ROM part files. Best left untouched
},
"wtv-setup": {
// wtv-setup
"port": 1613,
"flags": "0x00000010",
"passport_service": "wtv-passport",
"passport_service": "wtv-passport", // for messenger
"connections": 3,
"privileged": true,
"modules": [
"WTVBGMusic"
"WTVBGMusic",
"WTVRegister"
]
},
"wtv-music": {
// wtv-music
"port": 1656,
"connections": 3
},
"wtv-cookie": {
// wtv-cookie (used for http(s) cookies)
"port": 1619,
"connections": 1
},
"wtv-chat": {
// wtv-chat (used for IRC)
"port": 1630,
"connections": 3
},
"wtv-disk": {
// wtv-disk (used for DiskMaps)
"port": 1635,
"connections": 3,
"modules": [
@@ -176,6 +211,7 @@
]
},
"wtv-guide": {
// wtv-guide (not yet complete)
"port": 1621,
"connections": 3,
"modules": [
@@ -183,6 +219,7 @@
]
},
"wtv-mail": {
// wtv-mail
"port": 1608,
"connections": 3,
"modules": [
@@ -190,9 +227,11 @@
]
},
"wtv-passport": {
// wtv-password (for messenger)
"port": 1654
},
"wtv-favorite": {
// wtv-favorite
"port": 1611,
"connections": 3,
"enable_multi_query": true,
@@ -200,44 +239,49 @@
"max_favorites_per_folder": 18
},
"wtv-admin": {
// wtv-admin
"port": 1698,
"enable_multi_query": true,
"privileged": true,
"password": "viRak-7"
"password": "viRak-7" // change to something more unique
},
"http": {
// http upstream
"port": 1650,
"connections": 3,
"use_external_proxy": false,
"external_proxy_is_socks": false,
"external_proxy_host": "127.0.0.1",
"external_proxy_port": 1080,
"use_external_proxy": false, // use an external proxy (WebONE or some other minifying proxy is recommended)
"external_proxy_is_socks": false, // use a socks proxy
"external_proxy_host": "127.0.0.1", // IP address or hostname of proxy
"external_proxy_port": 1080, // Port of proxy
"flags": "0x00000001"
},
"https": {
"port": 1650,
"connections": 3,
"use_external_proxy": false,
"external_proxy_is_socks": false,
"external_proxy_host": "127.0.0.1",
"external_proxy_port": 1080,
"use_external_proxy": false, // use an external proxy (WebONE or some other minifying proxy is recommended)
"external_proxy_is_socks": false, // use a socks proxy
"external_proxy_host": "127.0.0.1", // IP address or hostname of proxy
"external_proxy_port": 1080, // Port of proxy
"flags": "0x00000001"
},
"pc_services": {
// PC Services
"port": 1699,
"pc_services": true,
"hide_minisrv_version": true,
"disabled": true,
"servicevault_dir": "http_pc",
"drop_connection_on_wrong_port": false,
"show_verbose_errors": false,
"pc_services": true, // defines service as a PC service
"hide_minisrv_version": true, // hide or show the minisrv version (eg like Apache version, can be hidden to hide known exploits for older version)
"disabled": true, // disabled by default, set disabled: false in user_config.json for this service to enable.
"servicevault_dir": "http_pc", // The service vault dir for the PC Services
"drop_connection_on_wrong_port": false, // If true, resets connection if the PC browser connects to a port that is not PC Services enabled
"show_verbose_errors": false, // extra debugging
"privileged": true,
"allow_https": false,
"force_https": false
"allow_https": false, // for future use with LetsEncrypt
"force_https": false // for future use with LetsEncrypt
}
},
"favorites": {
"folder_templates": {
// define user default favorites here
// If image is a URL, it should be an absolute path, or a file under wtv-favorite:/
"Recommended": [
{
"title": "DuckDuckGo",

View File

@@ -0,0 +1,27 @@
var classPath = __dirname + "/includes/";
const { WTVShared } = require(classPath + "WTVShared.js");
const wtvshared = new WTVShared(); // creates minisrv_config
classPath = wtvshared.getAbsolutePath(classPath, __dirname);
const WTVClientSessionData = require(classPath + "/WTVClientSessionData.js");
minisrv_config = wtvshared.getMiniSrvConfig();
const wtvcsd = new WTVClientSessionData(minisrv_config)
const fs = require('fs')
const path = require('path')
var old_account_dir = minisrv_config.config.SessionStore;
var new_account_dir = wtvcsd.getAccountStoreDirectory();
if (!fs.existsSync(new_account_dir)) fs.mkdirSync(new_account_dir);
total = 0;
fs.readdirSync(old_account_dir).forEach(file => {
if (file === "accounts" || file === "minisrv_internal_nntp" || file === "client registration and session data will populate here.txt") return;
fs.renameSync(old_account_dir + path.sep + file, new_account_dir + path.sep + file)
console.log(" * Migrated", old_account_dir + path.sep + file, "to", new_account_dir + path.sep + file);
total++;
});
console.log(" *", total, "accounts migrated.");

View File

@@ -1,12 +1,12 @@
{
"name": "zefie_wtvp_minisrv",
"version": "0.9.33",
"version": "0.9.35",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "zefie_wtvp_minisrv",
"version": "0.9.33",
"version": "0.9.35",
"license": "GPL3",
"dependencies": {
"adm-zip": "^0.5.9",
@@ -19,7 +19,7 @@
"iconv-lite": "^0.6.3",
"mime-types": "^2.1.35",
"newsie": "^1.2.1",
"nntp-server-zefie": "git+https://git@github.com:zefie/nntp-server",
"nntp-server-zefie": "^3.1.0",
"proxy-agent": "^5.0.0",
"sanitize-html": "^2.7.2",
"socks-proxy-agent": "^6.2.1",
@@ -891,10 +891,9 @@
}
},
"node_modules/nntp-server-zefie": {
"name": "nntp-server",
"version": "3.1.0",
"resolved": "git+https://git@github.com/zefie/nntp-server.git#c2721f81a98dacda0a272dc8c98f8155a955523f",
"license": "MIT",
"resolved": "https://registry.npmjs.org/nntp-server-zefie/-/nntp-server-zefie-3.1.0.tgz",
"integrity": "sha512-LOWvF1oOST0osTMn4pVqDqNBLCGTE7grUo1+x0Mdd8NYaRby475IhVyku4cgM8PRq5teB/5WIrKwb/jJni5c8Q==",
"dependencies": {
"debug": "^4.3.3",
"denque": "^2.0.1",
@@ -2101,8 +2100,9 @@
"integrity": "sha512-41jhtKmlpSc27oIBkp681fm4aLURPT/AgeBvSRicxNPWDVeHLaq7tSvG/OsEXz7g41thgv9JMV1ZjYSABMiYVA=="
},
"nntp-server-zefie": {
"version": "git+https://git@github.com/zefie/nntp-server.git#c2721f81a98dacda0a272dc8c98f8155a955523f",
"from": "nntp-server-zefie@git+https://git@github.com:zefie/nntp-server",
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/nntp-server-zefie/-/nntp-server-zefie-3.1.0.tgz",
"integrity": "sha512-LOWvF1oOST0osTMn4pVqDqNBLCGTE7grUo1+x0Mdd8NYaRby475IhVyku4cgM8PRq5teB/5WIrKwb/jJni5c8Q==",
"requires": {
"debug": "^4.3.3",
"denque": "^2.0.1",

View File

@@ -1,6 +1,6 @@
{
"name": "zefie_wtvp_minisrv",
"version": "0.9.35",
"version": "0.9.36",
"description": "WebTV Service (WTVP) Emulation Server",
"main": "app.js",
"homepage": "https://github.com/zefie/zefie_wtvp_minisrv",
@@ -37,7 +37,7 @@
"iconv-lite": "^0.6.3",
"mime-types": "^2.1.35",
"newsie": "^1.2.1",
"nntp-server-zefie": "git+https://git@github.com:zefie/nntp-server",
"nntp-server-zefie": "^3.1.0",
"proxy-agent": "^5.0.0",
"sanitize-html": "^2.7.2",
"socks-proxy-agent": "^6.2.1",

View File

@@ -16,10 +16,14 @@
"/home/zefie/webtv/ServiceVault"
],
"ssid_block_list": [
// list of SSID's to block
"8100000000000000",
"8100000000000010"
],
"ssid_ip_allow_list": {
// list of SSIDs to allow. Can be in the block list above.
// The IP the SSID is connecting from should be listed under
// the allowed SSID as per this example. Subnets allowed.
"8100000000000000": [
"192.168.1.0/24",
"127.0.0.1"
@@ -57,11 +61,16 @@
"wtv-1800": {
"send_tellyscripts": true,
"send_tellyscript_ssid_whitelist": [
"8100000000000000"
// send only these SSIDs a tellyscript
"8100000000000000",
"8120000000000000"
]
},
"wtv-admin": {
// demonstrates an override
"authorized_ssids": {
// uses the same format as the SSID whitelist above
// SSID match, IP match, AND password are all required to access wtv-admin service.
"8100000000000000": [
"192.168.1.0/24",
"127.0.0.1"
@@ -70,33 +79,42 @@
"password": "my-secure-password"
},
"wtv-log": {
// demonstrates an override
"write_logs_to_disk": true
},
"wtv-some-custom-service": {
// demonstrates adding a new service
"port": 1609,
"connections": 1
},
"wtv-tricks": {
// this example shows how to point to an external server
// untested
"service_ip": "192.168.1.8",
"port": 1702,
"nobind": true
},
"wtv-music": {
"disabled": true
"disabled": true // disable default service wtv-music
},
"wtv-author": {
"enable_multi_query": true
},
"wtv-news": {
"disabled": false,
"upstream_address": "192.168.11.8",
"upstream_port": 1699,
"upstream_address": "192.168.11.8", // upstream usenet service
"upstream_port": 1699, // upstream usenet service port
"upstream_auth": {
// upstream usenet service auth (delete object and set to null (eg upstream_auth: null) to not use login
"username": "myusername",
"password": "mypassword"
},
"upstream_tls": true,
"upstream_tls": true, // upstream usenet is ssl (true/false)
"local_auth": {
// manually define a username/password for the local built-in NNTP
// otherwise it will be randomly generated. This is useful if you
// want to access the built-in NNTP externally, such as in
// Mozilla Thunderbird
"username": "mylocaluser",
"password": "mylocalpass"
}

View File

@@ -39,6 +39,9 @@
<SubType>Code</SubType>
</Content>
<Content Include="includes\WTVNewsServer.js" />
<Content Include="migrate_accounts.js">
<SubType>Code</SubType>
</Content>
<Content Include="packer.js" />
<Content Include="ServiceDeps\templates\wtv-guide\glossary.json" />
<Content Include="ServiceDeps\templates\wtv-guide\prerendered\Alerts\Forbidden.js" />
@@ -1026,6 +1029,10 @@
<Content Include="ServiceVault\wtv-star\star.js" />
<Content Include="ServiceVault\wtv-tricks\access.js" />
<Content Include="ServiceVault\wtv-tricks\blastbacklist.js" />
<Content Include="ServiceVault\wtv-tricks\charmap.js">
<SubType>Code</SubType>
</Content>
<Content Include="ServiceVault\wtv-tricks\cSetup.js" />
<Content Include="ServiceVault\wtv-tricks\go-offline.js" />
<Content Include="ServiceVault\wtv-tricks\info.js">
<SubType>Code</SubType>