add fancy block page
This commit is contained in:
92
zefie_wtvp_minisrv/ServiceDeps/TOS.html
Normal file
92
zefie_wtvp_minisrv/ServiceDeps/TOS.html
Normal file
@@ -0,0 +1,92 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
Access Denied
|
||||
</title>
|
||||
<display nostatus nooptions switchtowebmode nohome>
|
||||
</head>
|
||||
<body noscroll bgcolor="#191919" text="#42CC55" link="36d5ff"
|
||||
hspace=0 vspace=0 fontsize="large"
|
||||
>
|
||||
<table cellspacing=0 cellpadding=0^C>
|
||||
<tr>
|
||||
<td width=104 height=74 valign=middle align=center bgcolor="3B3A4D">
|
||||
<img src="file://ROM/Cache/WebTVLogoJewel.gif" width=86 height=64>
|
||||
<td width=20 valign=top align=left bgcolor="3B3A4D">
|
||||
<img src="ROMCache/Spacer.gif"
|
||||
width=1 height=1>
|
||||
<td colspan=10 width=436 valign=middle align=left bgcolor="3B3A4D">
|
||||
<font color="D6DFD0" size="+2">
|
||||
<blackface>
|
||||
<shadow>
|
||||
<img src="ROMCache/Spacer.gif"
|
||||
width=1 height=4>
|
||||
<br>
|
||||
Access Denied
|
||||
</shadow>
|
||||
</blackface>
|
||||
</font>
|
||||
<tr>
|
||||
<td colspan=12 width=560 height=10 valign=top align=left>
|
||||
<img src="ROMCache/Shadow.gif" width=560 height=6>
|
||||
<tr>
|
||||
<td width=104 height=10 valign=top align=left>
|
||||
<td width=20 valign=top align=left>
|
||||
<td width=67 valign=top align=left>
|
||||
<td width=20 valign=top align=left>
|
||||
<td width=67 valign=top align=left>
|
||||
<td width=20 valign=top align=left>
|
||||
<td width=67 valign=top align=left>
|
||||
<td width=20 valign=top align=left>
|
||||
<td width=67 valign=top align=left>
|
||||
<td width=20 valign=top align=left>
|
||||
<td width=68 valign=top align=left>
|
||||
<td width=20 valign=top align=left>
|
||||
<form action="client:poweroff"
|
||||
>
|
||||
<tr>
|
||||
<td width=104 valign=middle align=center>
|
||||
<td width=20 valign=middle align=center>
|
||||
<td colspan=9 width=100 height=258 valign=top align=left>
|
||||
<font size=-1>You are not authorized to use this service. <p>Reason: ${REASON} </font>
|
||||
<tr>
|
||||
<td width=104 valign=middle align=center>
|
||||
<td width=20 valign=middle align=center>
|
||||
<td colspan=10 height=2 valign=middle align=center bgcolor="2B2B2B">
|
||||
<img src="ROMCache/Spacer.gif" width=436 height=1>
|
||||
<tr>
|
||||
<td width=104 valign=middle align=center>
|
||||
<td width=20 valign=middle align=center>
|
||||
<td colspan=9 height=1 valign=top align=left>
|
||||
<tr>
|
||||
<td width=104 valign=middle align=center>
|
||||
<td width=20 valign=middle align=center>
|
||||
<td colspan=10 height=2 valign=top align=left bgcolor="0D0D0D">
|
||||
<img src="ROMCache/Spacer.gif" width=436 height=1>
|
||||
<tr>
|
||||
<td width=104 valign=middle align=center>
|
||||
<td width=20 valign=middle align=center>
|
||||
<td colspan=9 height=4 valign=top align=left>
|
||||
<tr>
|
||||
<td width=104 valign=middle align=center>
|
||||
<td width=20 valign=middle align=center>
|
||||
<td colspan=9 width=416 valign=top align=left>
|
||||
<table cellspacing=0 cellpadding=0>
|
||||
<tr>
|
||||
<td width=306 valign=top align=left>
|
||||
<font size="-1"><i>
|
||||
</i></font><td width=112 valign=top align=right>
|
||||
<font size="-1" color="#E7CE4A">
|
||||
<shadow>
|
||||
<input selected
|
||||
name="Power Off"
|
||||
value="Power Off"
|
||||
type=submit Value=Continue name="Continue" borderimage="file://ROM/Borders/ButtonBorder2.bif" usestyle width=110>
|
||||
</shadow>
|
||||
</font>
|
||||
</form>
|
||||
</table>
|
||||
<td width=20 valign=middle align=center>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -867,11 +867,24 @@ function checkSecurity(socket) {
|
||||
};
|
||||
|
||||
var rejectSSIDConnection = function (ssid, blacklist) {
|
||||
if (blacklist) console.log(" * Request from SSID", wtvshared.filterSSID(ssid), "(" + socket.remoteAddr + "), but that SSID is in the blacklist, rejecting.");
|
||||
else console.log(" * Request from SSID", wtvshared.filterSSID(socket.ssid), "(" + socket.remoteAddress + "), but that SSID is not in the whitelist, rejecting.");
|
||||
|
||||
var errpage = wtvshared.doErrorPage(401, "Access to this service is denied.");
|
||||
out = errpage;
|
||||
var rejectReason = null;
|
||||
if (blacklist) {
|
||||
rejectReason = ssid + " is in the blacklist.";
|
||||
console.log(" * Request from SSID", wtvshared.filterSSID(ssid), "(" + socket.remoteAddress + "), but that SSID is in the blacklist, rejecting.");
|
||||
} else {
|
||||
rejectReason = ssid + " is not in the whitelist.";
|
||||
console.log(" * Request from SSID", wtvshared.filterSSID(socket.ssid), "(" + socket.remoteAddress + "), but that SSID is not in the whitelist, rejecting.");
|
||||
}
|
||||
if (fs.existsSync(__dirname + '/ServiceDeps/TOS.html')) {
|
||||
var tosErrorPage = fs.readFileSync(__dirname + '/ServiceDeps/TOS.html').toString();
|
||||
out = new Array(`200 Goodbye
|
||||
wtv-service: reset
|
||||
Connection: close
|
||||
Content-type: text/html`, tosErrorPage.replace('\$\{REASON\}', rejectReason));
|
||||
} else {
|
||||
var errpage = wtvshared.doErrorPage(401, "Access to this service is denied.");
|
||||
out = errpage;
|
||||
}
|
||||
}
|
||||
|
||||
var checkSSIDIPWhitelist = function (ssid, blacklist) {
|
||||
@@ -1016,6 +1029,8 @@ async function processRequest(socket, data_hex, skipSecure = false, encryptedReq
|
||||
socket_sessions[socket.id].close_me = true;
|
||||
headers = failed_security[0];
|
||||
data = failed_security[1];
|
||||
sendToClient(socket, headers, data);
|
||||
return;
|
||||
}
|
||||
|
||||
if (headers["wtv-capability-flags"] != null) {
|
||||
|
||||
@@ -35,6 +35,10 @@
|
||||
<Content Include="diskmap_gen.js">
|
||||
<SubType>Code</SubType>
|
||||
</Content>
|
||||
<Content Include="ServiceDeps\premade_tellyscripts\LC2\LC2_OpenISP_56k.tok" />
|
||||
<Content Include="ServiceDeps\premade_tellyscripts\LC2\LC2_WTV_18006138199.detok.txt" />
|
||||
<Content Include="ServiceDeps\premade_tellyscripts\LC2\LC2_WTV_18006138199.tok" />
|
||||
<Content Include="ServiceDeps\TOS.html" />
|
||||
<Content Include="ServiceVault\http_pc\get.js" />
|
||||
<Content Include="ServiceVault\http_pc\index.js" />
|
||||
<Content Include="ServiceVault\wtv-1800\noflash.js" />
|
||||
@@ -335,6 +339,9 @@
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="ServiceDeps\" />
|
||||
<Folder Include="ServiceDeps\premade_tellyscripts\" />
|
||||
<Folder Include="ServiceDeps\premade_tellyscripts\LC2\" />
|
||||
<Folder Include="ServiceVault\" />
|
||||
<Folder Include="ServiceVault\http_pc\" />
|
||||
<Folder Include="ServiceVault\wtv-chat\" />
|
||||
|
||||
Reference in New Issue
Block a user