v0.9.33
- numerous bug fixes - wtv-mail system - user account updates - viewergen alpha (experimental webtv viewer patcher on pc_service) - implement wtv-favorites with huge help from @JarHead4 - add wtv-ticket store api - Bump vm2 from 3.9.5 to 3.9.7 in /zefie_wtvp_minisrv - fix bf0app default rom - Add wtv-1800 service to wtv-1800:/noflash - handle webtvism: - allow get/post variables to be the same name multiple times - rather than overwrite, the server will now change the variable from a string to an array. - Rewrite script processing a bit - Instead of using eval() we now use a proper VM Context - As a result, any scripting errors will now give a more useful filename and line number. - However, some things may break, if they are dependant on variables we are not allowing in the context. - BREAKING CHANGES: - `ssid_sessions[socket.ssid]` is now `session_data` - `require` is no longer allowed in user scripts - add star service - change how we handle modules for services in the VM - fixed wtv-disk:/sync always failed the first time - implement production-like wtv-star handling (when a service port becomes unavailable, it requests the url over the wtv-star port to show an error page) - renamed WTVDownloadList.js to WTVDisk.js - a bit more work on WTVNews (created class) - probably more stuff I can't remember
This commit is contained in:
BIN
zefie_wtvp_minisrv/ServiceVault/http_pc/favicon.ico
Normal file
BIN
zefie_wtvp_minisrv/ServiceVault/http_pc/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
@@ -1,39 +0,0 @@
|
||||
var minisrv_service_file = true;
|
||||
|
||||
if (request_headers.query.url) {
|
||||
if (request_headers.query.url.indexOf(":/") > 0) {
|
||||
var service_request = request_headers.query.url.split(":/")[0];
|
||||
var service_port = 0;
|
||||
Object.keys(minisrv_config.services).forEach(function (k) {
|
||||
if (minisrv_config.services[k].disabled) return;
|
||||
if (k == service_request) service_port = minisrv_config.services[k].port;
|
||||
});
|
||||
if (service_port > 0) {
|
||||
request_is_async = true;
|
||||
var request_headers_out = new Array()
|
||||
request_headers_out.request = "GET " + request_headers.query.url;
|
||||
request_headers_out.request_url = request_headers.query.url;
|
||||
request_headers_out['wtv-client-serial-number'] = socket.id + "HTTPPCReq";
|
||||
processURL(socket, request_headers_out);
|
||||
/*
|
||||
var s = require('net').Socket();
|
||||
var outdata = "";
|
||||
s.connect(service_port);
|
||||
s.setTimeout(1, function () {
|
||||
outdata = outdata.split()
|
||||
sendToClient(socket,outdata);
|
||||
});
|
||||
s.on('data', function (data) {
|
||||
outdata += data;
|
||||
});
|
||||
s.write()
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!headers) {
|
||||
var errpage = wtvshared.doErrorPage(500)
|
||||
headers = errpage[0];
|
||||
data = errpage[1];
|
||||
}
|
||||
@@ -3,31 +3,13 @@ var minisrv_service_file = true;
|
||||
headers = `200 OK
|
||||
Content-Type: text/html`
|
||||
|
||||
var splash_logo = minisrv_config.config.service_splash_logo;
|
||||
if (splash_logo.substring(0, 4) == "file") splash_logo = "wtv-star:/ROMCache/splash_logo_hacktv.gif";
|
||||
|
||||
data = `<html>
|
||||
<head>
|
||||
<display hideoptions nostatus showwhencomplete skipback clearback fontsize=medium>
|
||||
<title>zefie minisrv ${minisrv_config.version}</title>
|
||||
<meta http-equiv=Refresh content="4; url=wtv-home:/home?">
|
||||
<title>zefie minisrv v${minisrv_config.version}</title>
|
||||
</head>
|
||||
<body bgcolor="#000000" text="#449944">
|
||||
<center>
|
||||
<spacer type=block height=88 width=21>
|
||||
<img src="/get?url=${escape('wtv-star:/ROMCache/spacer.gif')}" height=4><br>
|
||||
<img src="/get?url=${escape(splash_logo)}">
|
||||
<br><br><br>
|
||||
<p><br>
|
||||
<p><br>
|
||||
<table border>
|
||||
<tr><td width=150>
|
||||
Mini service
|
||||
<tr><td>
|
||||
zefie minisrv v${minisrv_config.version}`;
|
||||
if (minisrv_config.config.git_commit) data += " (git " + minisrv_config.config.git_commit + ")";
|
||||
data += `
|
||||
</table>
|
||||
</center>
|
||||
<p>
|
||||
Welcome to the zefie minisrv v${minisrv_config.version} PC Services
|
||||
</p>
|
||||
</body>
|
||||
</html>`;
|
||||
557
zefie_wtvp_minisrv/ServiceVault/http_pc/viewergen/index.js
Normal file
557
zefie_wtvp_minisrv/ServiceVault/http_pc/viewergen/index.js
Normal file
@@ -0,0 +1,557 @@
|
||||
var minisrv_service_file = true;
|
||||
var viewer = 2 // debug override
|
||||
|
||||
var viewergen_resource_dir = ServiceDeps + "/viewergen/";
|
||||
|
||||
var viewers = {
|
||||
0: "WebTVIntel--1.0.exe",
|
||||
1: "WebTVIntel--1.1.exe",
|
||||
2: "WebTVIntel--2.5.exe",
|
||||
3: "WebTVIntel--1.0-HE.exe",
|
||||
4: "WebTVIntel--2.5-HE.exe"
|
||||
}
|
||||
|
||||
var logos = {
|
||||
0: null,
|
||||
1: "SuperViewer_Setup.bmp",
|
||||
2: "HackersEdition_Setup.bmp"
|
||||
}
|
||||
|
||||
var disksets = {
|
||||
0: null
|
||||
}
|
||||
|
||||
var viewer_stock_md5s = {
|
||||
"WebTVIntel--1.0.exe": "d7bde1adbe3549f58dd95425d3ac2af9",
|
||||
"WebTVIntel--1.1.exe": "ce7b6d1734b5e3d1cbd5f068609223d1",
|
||||
"WebTVIntel--2.5.exe": "4c5754bb8b69739b6f414c2d159051da",
|
||||
"WebTVIntel--1.0-HE.exe": "391f303fd70034e69d3a50583de72c89",
|
||||
"WebTVIntel--2.5-HE.exe": "f0207865693a45ba76b9057dcb8ea672"
|
||||
}
|
||||
|
||||
|
||||
var patch_defaults = {
|
||||
"start_url": "client:GoToConn",
|
||||
"default_ip": "10.0.0.1"
|
||||
}
|
||||
|
||||
var patch_limits = {
|
||||
"start_url": 26,
|
||||
"default_ip": 11,
|
||||
}
|
||||
|
||||
function getPatchDataType(type, invert = false) {
|
||||
var patch_data = false;
|
||||
if ((type == "wtv-incarnation" && !invert) || (type == "wtv-encryption" && invert)) {
|
||||
patch_data = "wtv-client-serial-number: %s\r\n"
|
||||
patch_data += "wtv-user-requested-upgrade: %s\r\n";
|
||||
patch_data += "wtv-system-cpuprid: %s\r\n";
|
||||
patch_data += "wtv-system-version: %s\r\n";
|
||||
patch_data += "wtv-capability-flags: %s\r\n";
|
||||
patch_data += "wtv-client-bootrom-version: %s\r\n";
|
||||
patch_data += "wtv-need-upgrade: %s\n";
|
||||
patch_data += "wtv-used-8675309: %s\n";
|
||||
patch_data += "wtv-client-rom-type: %s\r\n";
|
||||
patch_data += "wtv-system-chipversion: %s\r\n";
|
||||
patch_data += "User-Agent: %s\r\n";
|
||||
}
|
||||
else if ((type == "wtv-encryption" && !invert) || (type == "wtv-incarnation" && invert) ) {
|
||||
patch_data = "wtv-tourist-enabled: %s\r\n";
|
||||
patch_data += "wtv-demo-enabled: %s\r\n";
|
||||
patch_data += "wtv-default-client-scriptprops: %s\r\n";
|
||||
patch_data += "wtv-default-client-useragent: %s\r\n";
|
||||
patch_data += "wtv-system-cpuspeed: %s\r\n";
|
||||
patch_data += "wtv-system-sysconfig: %s\r\n";
|
||||
patch_data += "wtv-my-disk-sucks-sucks-sucks: %s\r\n";
|
||||
patch_data += "wtv-disk-first-error: %s\r\n";
|
||||
patch_data += "wtv-disk-size: %s\r\n";
|
||||
patch_data += "wtv-client-address: %s\r\n";
|
||||
}
|
||||
return patch_data;
|
||||
}
|
||||
|
||||
|
||||
function getResData(file) {
|
||||
var res_data = null;
|
||||
if (file.substr(-2, 2).toLowerCase() == "gz") {
|
||||
var res_gz_data = fs.readFileSync(viewergen_resource_dir + file);
|
||||
res_data = zlib.gunzipSync(res_gz_data);
|
||||
} else {
|
||||
res_data = fs.readFileSync(viewergen_resource_dir + file);
|
||||
}
|
||||
return res_data;
|
||||
}
|
||||
|
||||
var patch_data = {
|
||||
"WebTVIntel--1.0.exe": {
|
||||
225: Buffer.from("\xD8", 'ascii'),
|
||||
273: Buffer.from("\x60", 'ascii'),
|
||||
332: Buffer.from("\x00\xAA", 'ascii'),
|
||||
568: Buffer.from("\x00\xA8", 'ascii'),
|
||||
577: Buffer.from("\xAA", 'ascii'),
|
||||
624: {
|
||||
length: 383,
|
||||
type: "wtv-incarnation"
|
||||
},
|
||||
132022: Buffer.from("\x68\xE8\x65\x5D\x00", 'ascii'), // patch pre-register pt1
|
||||
157861: Buffer.from("\x68\x70\x02\x40\x00", 'ascii'), // Prepare incarnation hack
|
||||
1016856: Buffer.from("\x68\xCC\x04\x5E\x00", 'ascii'),
|
||||
1074080: Buffer.from("\x68\xCC\x04\x5E\x00", 'ascii'),
|
||||
1263129: Buffer.from("\x68\x70\x6C\x5A\x00", 'ascii'), // Prepare encryption hack
|
||||
1919952: Buffer.from("scriptless-visit-reason\x00", 'ascii'), // patch pre-register pt2
|
||||
1919976: Buffer.from("10\x00", 'ascii'), // patch pre-register pt3
|
||||
1728624: {
|
||||
length: 398,
|
||||
type: "wtv-encryption"
|
||||
},
|
||||
1931552: Buffer.from(patch_defaults.default_ip + "\x00", 'ascii'), // patch default service address
|
||||
1960460: Buffer.from(patch_defaults.start_url + "\x00", 'ascii'), // patch startup url
|
||||
1960496: Buffer.from(patch_defaults.start_url + "\x00", 'ascii'), // patch startup url
|
||||
1967796: Buffer.from("\x00".repeat(41), 'ascii'), // remove unwanted headers
|
||||
1967856: Buffer.from("\x00".repeat(24), 'ascii'), // remove unwanted headers
|
||||
2003968: getResData("ResData--1.0.res.gz")
|
||||
},
|
||||
"WebTVIntel--1.0-HE.exe": {
|
||||
624: {
|
||||
length: 383,
|
||||
type: "wtv-incarnation"
|
||||
},
|
||||
1728624: {
|
||||
length: 398,
|
||||
type: "wtv-encryption"
|
||||
}
|
||||
},
|
||||
"WebTVIntel--1.1.exe": {
|
||||
209: Buffer.from("\xFA", 'ascii'),
|
||||
257: Buffer.from("\x90", 'ascii'),
|
||||
316: Buffer.from("\x00\xB6", 'ascii'),
|
||||
552: Buffer.from("\x00\xB4", 'ascii'),
|
||||
561: Buffer.from("\xB6", 'ascii'),
|
||||
620: {
|
||||
length: 383,
|
||||
type: "wtv-incarnation"
|
||||
},
|
||||
132118: Buffer.from("\x68\xE4\x75\x5D\x00", 'ascii'), // patch pre-register pt1
|
||||
157861: Buffer.from("\x68\xCC\x72\x5A\x00", 'ascii'), // Prepare encryption hack
|
||||
1015384: Buffer.from("\x68\xCC\x14\x5E\x00", 'ascii'),
|
||||
1073264: Buffer.from("\x68\xCC\x14\x5E\x00", 'ascii'),
|
||||
1264057: Buffer.from("\x68\x6C\x02\x40\x00", 'ascii'), // Prepare incarnation hack
|
||||
1730252: {
|
||||
length: 307,
|
||||
type: "wtv-encryption"
|
||||
},
|
||||
1921484: Buffer.from("scriptless-visit-reason\x00", 'ascii'), // patch pre-register pt2
|
||||
1921508: Buffer.from("10\x00", 'ascii'), // patch pre-register pt3
|
||||
1933064: Buffer.from(patch_defaults.default_ip + "\x00", 'ascii'), // patch default service address
|
||||
1962188: Buffer.from(patch_defaults.start_url + "\x00", 'ascii'), // patch startup url
|
||||
1962224: Buffer.from(patch_defaults.start_url + "\x00", 'ascii'), // patch startup url
|
||||
1969540: Buffer.from("\x00".repeat(84), 'ascii'), // remove unwanted headers
|
||||
2005504: getResData("ResData--1.1.res.gz")
|
||||
},
|
||||
|
||||
"WebTVIntel--2.5.exe": {
|
||||
396: Buffer.from("\x00\x50", 'ascii'),
|
||||
720: {
|
||||
length: 3356,
|
||||
type: "wtv-encryption"
|
||||
},
|
||||
279771: Buffer.from("\x68\xB8\x04\x75\x00", 'ascii'), // patch pre-register pt1
|
||||
299023: Buffer.from("\x08", 'ascii'), // Change the call location from ecx+16 to ecx+15 to unlock the communication stream
|
||||
329666: Buffer.from("\x68\x82\x6C\x70\x00", 'ascii'), // Prepare incarnation hack
|
||||
1893931: Buffer.from("\x71", 'ascii'), // Unlock the wtv- url access from the address bar.
|
||||
2201731: Buffer.from("\x68\xD0\x02\x40\x00", 'ascii'), // Prepare encryption hack
|
||||
3173506: {
|
||||
length: 865,
|
||||
type: "wtv-incarnation"
|
||||
},
|
||||
3473396: Buffer.from("\x00", 'ascii'),
|
||||
3474616: Buffer.from("10\x00", 'ascii'), // patch pre-register pt3
|
||||
3746504: Buffer.from(patch_defaults.default_ip + "\x00", 'ascii'), // patch default service address
|
||||
3474628: Buffer.from("scriptless-visit-reason\x00", 'ascii'), // patch pre-register pt2
|
||||
3482832: Buffer.from("\x00".repeat(10), 'ascii'), // remove unwanted headers
|
||||
3808684: Buffer.from(patch_defaults.start_url + "\x00", 'ascii'), // patch startup url
|
||||
3808720: Buffer.from(patch_defaults.start_url + "\x00", 'ascii'), // patch startup url
|
||||
3808748: Buffer.from(patch_defaults.start_url + "\x00", 'ascii'), // patch startup url
|
||||
3826408: Buffer.from("\x00".repeat(66), 'ascii'), // remove unwanted headers
|
||||
3826356: Buffer.from("\x00".repeat(24), 'ascii'), // remove unwanted headers
|
||||
3940352: getResData("ResData--2.5.res.gz")
|
||||
},
|
||||
"WebTVIntel--2.5-HE.exe": {
|
||||
720: {
|
||||
length: 3356,
|
||||
type: "wtv-encryption"
|
||||
},
|
||||
3173506: {
|
||||
length: 865,
|
||||
type: "wtv-incarnation"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getPatchData(fname, client_data_obj, start_url = "client:GoToConn", default_ip = "10.0.0.1") {
|
||||
var customized_patch_data = patch_data[fname];
|
||||
Object.keys(customized_patch_data).forEach(function (idx) {
|
||||
var val = customized_patch_data[idx];
|
||||
|
||||
if (typeof val === 'string') {
|
||||
// start url override
|
||||
if (start_url != patch_defaults.start_url && start_url.length <= patch_limits.start_url) {
|
||||
if (val.substr(0, patch_defaults.start_url.length) == patch_defaults.start_url)
|
||||
customized_patch_data[idx] = start_url + "\x00";
|
||||
}
|
||||
|
||||
// default service ip override
|
||||
if (default_ip != patch_defaults.default_ip && default_ip.length <= patch_limits.default_ip) {
|
||||
if (val.substr(0, patch_defaults.default_ip.length) == patch_defaults.default_ip)
|
||||
customized_patch_data[idx] = default_ip + "\x00";
|
||||
}
|
||||
} else {
|
||||
if (!val.byteLength) {
|
||||
// not a buffer object
|
||||
var block_length = val['length'];
|
||||
var patch_data = getPatchDataType(val['type'], (fname.substr(12,3) != "1.1"));
|
||||
if (patch_data) {
|
||||
var patch_data_array = patch_data.split("\r\n");
|
||||
var patch_data_string = "";
|
||||
Object.keys(patch_data_array).forEach(function (didx) {
|
||||
var header_end = patch_data_array[didx].indexOf(":");
|
||||
if (header_end) {
|
||||
var patch_data_header = patch_data_array[didx].substr(0, header_end);
|
||||
var client_value = client_data_obj[patch_data_header];
|
||||
if (client_value)
|
||||
patch_data_string += patch_data_array[didx].replace("%s", client_value) + "\r\n";
|
||||
}
|
||||
});
|
||||
}
|
||||
if (fname.substr(12, 3) != "2.5") {
|
||||
var length_difference = block_length - patch_data_string.length;
|
||||
if (length_difference > 0)
|
||||
patch_data_string += "\x00".repeat(length_difference - (val['type'].length + 1));
|
||||
patch_data_string += val['type'] + "\x00";
|
||||
} else {
|
||||
patch_data_string += val['type'] + "\x00";
|
||||
var length_difference = block_length - patch_data_string.length;
|
||||
if (length_difference > 0)
|
||||
patch_data_string += "\x00".repeat(length_difference);
|
||||
}
|
||||
customized_patch_data[idx] = Buffer.from(patch_data_string, 'ascii');
|
||||
}
|
||||
}
|
||||
})
|
||||
return customized_patch_data;
|
||||
}
|
||||
|
||||
function patchBinary(patchDataObject) {
|
||||
Object.keys(patchDataObject.patch_data).forEach(function (idx) {
|
||||
idx = parseInt(idx);
|
||||
data_length = patchDataObject.patch_data[idx].byteLength || patchDataObject.patch_data[idx].length
|
||||
patchDataObject.data.fill(patchDataObject.patch_data[idx], idx, data_length + idx);
|
||||
})
|
||||
return patchDataObject.data;
|
||||
}
|
||||
|
||||
function generateSSID() {
|
||||
var ssid_template = "91xxxY0xx0b002xx";
|
||||
var ssid = ssid_template;
|
||||
while (ssid.indexOf("x") != -1) {
|
||||
ssid = ssid.replace("x", Math.floor(Math.random() * 16).toString(16))
|
||||
}
|
||||
ssid = ssid.replace("Y", Math.floor(Math.random() * 7));
|
||||
return ssid;
|
||||
}
|
||||
|
||||
function buildProfile(build) {
|
||||
var buildProfile = null;
|
||||
switch (build) {
|
||||
case 1235:
|
||||
buildProfile = {
|
||||
"wtv-system-version": build,
|
||||
"wtv-capability-flags": "1009c93bef",
|
||||
"wtv-client-bootrom-version": 105,
|
||||
"wtv-client-rom-type": "bf0app",
|
||||
"wtv-system-chipversion": 16842752,
|
||||
"User-Agent": "Mozilla/4.0 WebTV/1.4.2 (compatible; MSIE 3.0)",
|
||||
"wtv-system-cpuspeed": 112790760,
|
||||
"wtv-system-sysconfig": 736935823
|
||||
}
|
||||
break;
|
||||
|
||||
case 7181:
|
||||
buildProfile = {
|
||||
"wtv-system-version": build,
|
||||
"wtv-capability-flags": "10935ffc8f",
|
||||
"wtv-client-bootrom-version": 2046,
|
||||
"wtv-client-rom-type": "US-LC2-disk-0MB-8MB",
|
||||
"wtv-system-chipversion": 51511296,
|
||||
"User-Agent": "Mozilla/4.0 WebTV/2.2.6.1 (compatible; MSIE 4.0)",
|
||||
"wtv-system-cpuspeed": 166187148,
|
||||
"wtv-system-sysconfig": 4163328,
|
||||
"wtv-disk-size": 8006
|
||||
}
|
||||
break;
|
||||
|
||||
case 71810:
|
||||
buildProfile = {
|
||||
"wtv-capability-flags": "d10094938ef",
|
||||
"wtv-system-version": 7181,
|
||||
"wtv-client-rom-type": "bf0app",
|
||||
"wtv-client-bootrom-version": 105,
|
||||
"wtv-system-chipversion": 16842752,
|
||||
"wtv-system-sysconfig": 736935823,
|
||||
"wtv-system-cpuspeed": 112790760,
|
||||
"User-Agent": "Mozilla/4.0 WebTV/2.5 (compatible; MSIE 4.0)",
|
||||
}
|
||||
break;
|
||||
case 16276:
|
||||
buildProfile = {
|
||||
"wtv-system-version": build,
|
||||
"wtv-capability-flags": "1fee0e1d9b1ffdef",
|
||||
"wtv-client-bootrom-version": 2046,
|
||||
"wtv-client-rom-type": "US-LC2-disk-0MB-8MB",
|
||||
"wtv-system-chipversion": 53608448,
|
||||
"User-Agent": "Mozilla/4.0 WebTV/2.8.2 (compatible; MSIE 4.0)",
|
||||
"wtv-system-cpuspeed": 166164662,
|
||||
"wtv-system-sysconfig": 3116068,
|
||||
"wtv-disk-size": 8006
|
||||
}
|
||||
break;
|
||||
}
|
||||
return buildProfile;
|
||||
}
|
||||
|
||||
var enable_full_hacktv = false;
|
||||
if (fs.existsSync(viewergen_resource_dir + "HackTV.zip")) {
|
||||
enable_full_hacktv = true;
|
||||
disksets['99'] = "HackTV.zip";
|
||||
}
|
||||
|
||||
if (request_headers.query.viewer &&
|
||||
(request_headers.query.client_ssid || request_headers.query.random_ssid)) {
|
||||
var client_ssid = null;
|
||||
if (request_headers.query.client_ssid)
|
||||
client_ssid = request_headers.query.client_ssid;
|
||||
|
||||
if (request_headers.query.random_ssid)
|
||||
client_ssid = generateSSID();
|
||||
|
||||
var viewer_file = viewers[request_headers.query.viewer];
|
||||
if (!viewer_file) {
|
||||
errpage = wtvshared.doErrorPage("500", null, socket.minisrv_pc_mode)
|
||||
headers = errpage[0];
|
||||
data = errpage[1];
|
||||
} else {
|
||||
var viewer_gz_data = fs.readFileSync(viewergen_resource_dir + viewer_file + ".gz");
|
||||
var viewer_data = zlib.gunzipSync(viewer_gz_data);
|
||||
var viewer_md5 = crypto.createHash('md5').update(viewer_data).digest("hex");
|
||||
if (viewer_md5 != viewer_stock_md5s[viewer_file]) {
|
||||
console.log(viewer_file, "md5sum error. expected:", viewer_stock_md5s[viewer_file], ", got:", viewer_md5)
|
||||
errpage = wtvshared.doErrorPage("500", null, socket.minisrv_pc_mode)
|
||||
headers = errpage[0];
|
||||
data = errpage[1];
|
||||
} else {
|
||||
var build = request_headers.query.build;
|
||||
var client_data_obj = null
|
||||
if (build) {
|
||||
if (parseInt(build) > 0) {
|
||||
client_data_obj = buildProfile(parseInt(build));
|
||||
}
|
||||
}
|
||||
// fallback
|
||||
if (!client_data_obj)
|
||||
client_data_obj = buildProfile(7181);
|
||||
|
||||
client_data_obj["wtv-client-serial-number"] = client_ssid;
|
||||
var patchDataObject = {
|
||||
data: viewer_data,
|
||||
patch_data: getPatchData(viewer_file, client_data_obj)
|
||||
}
|
||||
if (!patchDataObject.patch_data) {
|
||||
errpage = wtvshared.doErrorPage("500", null, socket.minisrv_pc_mode)
|
||||
headers = errpage[0];
|
||||
data = errpage[1];
|
||||
} else {
|
||||
var patched_file = patchBinary(patchDataObject);
|
||||
headers = `200 OK
|
||||
Content-Type: application/octet-stream
|
||||
Content-Disposition: attachment; filename="${viewer_file.replace(".exe", ".zip")}"`
|
||||
var AdmZip = require("adm-zip");
|
||||
var zip = new AdmZip();
|
||||
|
||||
zip.addZipComment("Viewer SSID: " + client_ssid);
|
||||
zip.addFile(viewer_file, 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();
|
||||
zipEntries.forEach(function (zipEntry) {
|
||||
if (zipEntry.entryName == "Setup.bmp" && request_headers.query.logo) {
|
||||
var logo_file = logos[parseInt(request_headers.query.logo) || 0];
|
||||
if (logo_file) {
|
||||
var logo_gz_data = fs.readFileSync(viewergen_resource_dir + logo_file + ".gz");
|
||||
var logo_data = zlib.gunzipSync(logo_gz_data);
|
||||
zip.addFile(zipEntry.entryName, logo_data);
|
||||
} else {
|
||||
zip.addFile(zipEntry.entryName, zipEntry.getData());
|
||||
}
|
||||
} else {
|
||||
zip.addFile(zipEntry.entryName, zipEntry.getData());
|
||||
}
|
||||
});
|
||||
if (request_headers.query.diskset) {
|
||||
var 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();
|
||||
zipEntries.forEach(function (zipEntry) {
|
||||
zip.addFile("Disk/" + zipEntry.entryName, zipEntry.getData());
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
data = zip.toBuffer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
headers = `200 OK
|
||||
Content-Type: text/html`
|
||||
|
||||
data = `<html>
|
||||
<head>
|
||||
<title>zefie minisrv v${minisrv_config.version}</title>
|
||||
<style type="Text/css">
|
||||
table, td {
|
||||
border: 1px dotted;
|
||||
}
|
||||
td {
|
||||
padding: 5px;
|
||||
vertical-align: text-top;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<script>
|
||||
document.onload = function() {
|
||||
generateSSID();
|
||||
}
|
||||
|
||||
function generateSSID() {
|
||||
var ssidForm = document.getElementById('client_ssid');
|
||||
var ssid_template = "91xxxY0xx0b002xx";
|
||||
var ssid = ssid_template;
|
||||
while (ssid.indexOf("x") != -1) {
|
||||
ssid = ssid.replace("x",Math.floor(Math.random() * 16).toString(16))
|
||||
}
|
||||
ssid = ssid.replace("Y", Math.floor(Math.random() * 7));
|
||||
ssidForm.value = ssid;
|
||||
}
|
||||
|
||||
function validateForm() {
|
||||
var ssidForm = document.getElementById('client_ssid');
|
||||
if (document.getElementById('random_ssid').checked) {
|
||||
document.getElementById('viewergen').submit();
|
||||
} else {
|
||||
if (validateSSID(ssidForm.value)) {
|
||||
document.getElementById('viewergen').submit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function validateSSID(ssid) {
|
||||
if (ssid.length != 16) {
|
||||
alert("Please choose a valid SSID and try again.");
|
||||
return false;
|
||||
}
|
||||
if ((ssid.substr(0,1) != "0" && ssid.substr(0,1) != "8" && ssid.substr(0,1) != "9") ||
|
||||
(ssid.substr(6,1) != "0") ||
|
||||
(ssid.substr(9,5) != "0b002")) {
|
||||
alert("Your SSID is not proper, but I'll allow it.")
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function toggleRandomizer(cbox) {
|
||||
document.getElementById('client_ssid').disabled = cbox.checked;
|
||||
document.getElementById('generate_ssid').disabled = cbox.checked;
|
||||
}
|
||||
|
||||
function toggleLogoOption(cbox) {
|
||||
document.getElementById('logo').disabled = cbox.checked;
|
||||
document.getElementById('diskset').disabled = cbox.checked;
|
||||
}
|
||||
|
||||
</script>
|
||||
<body bgcolor="#000000" text="#449944">
|
||||
<p>
|
||||
Welcome to the zefie minisrv v${minisrv_config.version} PC Services<Br>
|
||||
<hr>
|
||||
<form method="GET" id="viewergen">
|
||||
<table>
|
||||
<tr>
|
||||
<td><strong>Viewer Version:</strong></td>
|
||||
<td>
|
||||
<select name="viewer">
|
||||
<option value="0">WebTV Viewer v1.0 Build 146 (w/ B210 ROMs)</option>
|
||||
<option value="1">WebTV Viewer v1.1 Build 220</option>
|
||||
<option value="2">WebTV Viewer v2.5 Build 117</option>
|
||||
<option value="3">WebTV Viewer v1.0 Build 210 (Hackers Edition)</option>
|
||||
<option selected value="4">WebTV Viewer v2.5 Build 117 (Hackers Edition)</option>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>SSID:</strong></td>
|
||||
<td><input name="client_ssid" id="client_ssid" maxlength=16" value="91">
|
||||
<input type="button" onclick="generateSSID()" id="generate_ssid" value="Randomize SSID" /><br>
|
||||
<em>Viewer clients should use SSIDs starting with <strong>91</strong>,<br>
|
||||
unless you are intentionally trying to spoof a box.</em>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Startup Logo</strong></td>
|
||||
<td><select name="logo" id="logo">
|
||||
<option selected value="0">WebTV Viewer Default</option>
|
||||
<option value="1">SuperViewer 4.0</option>
|
||||
<option value="2">WebTV Viewer Hacker's Edition</option>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Disk Set</strong></td>
|
||||
<td><select name="diskset" id="diskset">
|
||||
<option selected value="0">WebTV Viewer Default</option>`;
|
||||
if (enable_full_hacktv)
|
||||
data += `<option value="99">MattMan69's HackTV(Full Content)</option>`;
|
||||
data += `
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Build Spoof</strong></td>
|
||||
<td><select name="build" id="build">
|
||||
<option value="1235">Build 1235 (Old Classic)</option>
|
||||
<option value="71810">Build 7181 (Old Classic)</option>
|
||||
<option selected value="7181">Build 7181 (Old Plus)</option>
|
||||
<option value="16276">Build 16276 (Old Plus)</option>
|
||||
</select><br>
|
||||
<em>This legacy option has little impact on minisrv servers,<br>
|
||||
although certain advanced server operators may use these flags<br>
|
||||
to determine what your "box" can do, and as such, may offer<br>
|
||||
features that do not work in the Viewer, especially older ones</em>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><strong>Other Flags</strong>:</td>
|
||||
<td>
|
||||
<input type="checkbox" name="random_ssid" id="random_ssid" onchange="toggleRandomizer(this)"> Let the server choose the SSID (Ignores SSID above)<br>
|
||||
<input type="checkbox" name="viewer_only" onchange="toggleLogoOption(this)"> Only include Viewer EXE, not ROM files or Logos (Advanced Users Only)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td colspan="2" style="text-align: right">
|
||||
<br>
|
||||
<input type="button" onclick="validateForm()" value="Get Modified WebTV Viewer">
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>`;
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
var minisrv_service_file = true;
|
||||
|
||||
if (socket.ssid != null && !ssid_sessions[socket.ssid].get("wtvsec_login")) {
|
||||
var wtvsec_login = new WTVSec(minisrv_config);
|
||||
if (socket.ssid != null && !session_data.get("wtvsec_login")) {
|
||||
var wtvsec_login = session_data.createWTVSecSession();
|
||||
wtvsec_login.IssueChallenge();
|
||||
if (request_headers["wtv-incarnation"]) wtvsec_login.set_incarnation(request_headers["wtv-incarnation"]);
|
||||
ssid_sessions[socket.ssid].set("wtvsec_login", wtvsec_login);
|
||||
session_data.set("wtvsec_login", wtvsec_login);
|
||||
} else if (socket.ssid != null) {
|
||||
var wtvsec_login = ssid_sessions[socket.ssid].get("wtvsec_login");
|
||||
var wtvsec_login = session_data.get("wtvsec_login");
|
||||
}
|
||||
|
||||
if (wtvsec_login) {
|
||||
@@ -15,19 +15,21 @@ if (wtvsec_login) {
|
||||
headers = `200 OK
|
||||
Connection: Keep-Alive
|
||||
minisrv-use-carriage-return: false
|
||||
minisrv-no-mail-count: true
|
||||
wtv-initial-key: ` + wtvsec_login.challenge_key.toString(CryptoJS.enc.Base64) + `
|
||||
Content-Type: text/tellyscript
|
||||
wtv-service: reset
|
||||
` + getServiceString('wtv-head-waiter') + `
|
||||
` + getServiceString('wtv-star', { "no_star_word": true }) + `
|
||||
` + getServiceString('wtv-flashrom') + `
|
||||
${getServiceString('wtv-1800')}
|
||||
${getServiceString('wtv-head-waiter')}
|
||||
${getServiceString('wtv-star', { "no_star_word": true })}
|
||||
${getServiceString('wtv-flashrom')}
|
||||
wtv-boot-url: wtv-head-waiter:/login?
|
||||
wtv-visit: wtv-head-waiter:/login?
|
||||
wtv-client-time-zone: GMT -0000
|
||||
wtv-client-time-dst-rule: GMT
|
||||
wtv-client-date: `+ strftime("%a, %d %b %Y %H:%M:%S", new Date(new Date().toUTCString())) + ` GMT`;
|
||||
|
||||
var file_path = __dirname + "/ServiceDeps/premade_tellyscripts/bf0app/bf0app_WTV_18006138199.tok";
|
||||
var file_path = ServiceDeps + "/wtv-1800/tellyscripts/bf0app/bf0app_WTV_18006138199.tok";
|
||||
|
||||
if (file_path) {
|
||||
request_is_async = true;
|
||||
|
||||
@@ -10,6 +10,7 @@ if (request_headers["wtv-ticket"]) {
|
||||
|
||||
headers = `200 OK
|
||||
Connection: Keep-Alive
|
||||
minisrv-no-mail-count: true
|
||||
wtv-expire-all: wtv-
|
||||
wtv-open-isp-disabled: false
|
||||
wtv-visit: `+ gourl + `
|
||||
|
||||
@@ -3,21 +3,21 @@ var minisrv_service_file = true;
|
||||
var gourl = "wtv-head-waiter:/login?";
|
||||
|
||||
if (socket.ssid) {
|
||||
if (ssid_sessions[socket.ssid].loadSessionData() == true) {
|
||||
if (session_data.loadSessionData() == true) {
|
||||
console.log(" * Loaded session data from disk for", wtvshared.filterSSID(socket.ssid))
|
||||
ssid_sessions[socket.ssid].setSessionData("registered", (ssid_sessions[socket.ssid].getSessionData("registered") == true) ? true : false);
|
||||
session_data.setSessionData("registered", (session_data.getSessionData("registered") == true) ? true : false);
|
||||
} else {
|
||||
ssid_sessions[socket.ssid].session_data = {};
|
||||
ssid_sessions[socket.ssid].setSessionData("registered", false);
|
||||
session_data.session_data = {};
|
||||
session_data.setSessionData("registered", false);
|
||||
}
|
||||
if (ssid_sessions[socket.ssid].data_store) {
|
||||
if (ssid_sessions[socket.ssid].data_store.sockets) {
|
||||
if (session_data.data_store) {
|
||||
if (session_data.data_store.sockets) {
|
||||
var i = 0;
|
||||
ssid_sessions[socket.ssid].data_store.sockets.forEach(function (k) {
|
||||
session_data.data_store.sockets.forEach(function (k) {
|
||||
if (typeof k != "undefined") {
|
||||
if (k != socket) {
|
||||
k.destroy();
|
||||
ssid_sessions[socket.ssid].data_store.sockets.delete(k);
|
||||
session_data.data_store.sockets.delete(k);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
@@ -25,14 +25,14 @@ if (socket.ssid) {
|
||||
if (i > 0 && minisrv_config.config.debug_flags.debug) console.log(" # Closed", i, "previous sockets for", wtvshared.filterSSID(socket.ssid));
|
||||
}
|
||||
}
|
||||
if (ssid_sessions[socket.ssid].data_store.wtvsec_login) {
|
||||
if (session_data.data_store.wtvsec_login) {
|
||||
if (minisrv_config.config.debug_flags.debug) console.log(" # Recreating primary WTVSec login instance for", wtvshared.filterSSID(socket.ssid));
|
||||
delete ssid_sessions[socket.ssid].data_store.wtvsec_login;
|
||||
delete session_data.data_store.wtvsec_login;
|
||||
}
|
||||
|
||||
ssid_sessions[socket.ssid].data_store.wtvsec_login = new WTVSec(minisrv_config);
|
||||
ssid_sessions[socket.ssid].data_store.wtvsec_login.IssueChallenge();
|
||||
if (request_headers["wtv-incarnation"]) ssid_sessions[socket.ssid].data_store.wtvsec_login.set_incarnation(request_headers["wtv-incarnation"]);
|
||||
session_data.data_store.wtvsec_login = session_data.createWTVSecSession();
|
||||
session_data.data_store.wtvsec_login.IssueChallenge();
|
||||
if (request_headers["wtv-incarnation"]) session_data.data_store.wtvsec_login.set_incarnation(request_headers["wtv-incarnation"]);
|
||||
} else {
|
||||
console.log(" * Something bad happened (we don't know the client ssid???)");
|
||||
var errpage = wtvshared.doErrorPage(400)
|
||||
@@ -40,33 +40,33 @@ if (socket.ssid) {
|
||||
data = errpage[1];
|
||||
}
|
||||
|
||||
if (request_headers.query.relogin && ssid_sessions[socket.ssid].getSessionData("registered")) gourl += "relogin=true";
|
||||
if (request_headers.query.reconnect && ssid_sessions[socket.ssid].getSessionData("registered")) gourl += "reconnect=true";
|
||||
if (request_headers.query.relogin && session_data.getSessionData("registered")) gourl += "relogin=true";
|
||||
if (request_headers.query.reconnect && session_data.getSessionData("registered")) gourl += "reconnect=true";
|
||||
|
||||
if (ssid_sessions[socket.ssid].data_store.wtvsec_login) {
|
||||
if (session_data.data_store.wtvsec_login) {
|
||||
var prereg_contype = "text/html";
|
||||
|
||||
if (request_headers.query.relogin) { // relogin
|
||||
ssid_sessions[socket.ssid].data_store.wtvsec_login.ticket_b64 = null; // clear old ticket
|
||||
session_data.data_store.wtvsec_login.ticket_b64 = null; // clear old ticket
|
||||
}
|
||||
|
||||
// if relogin and wtv-script-id != 0, skip tellyscript
|
||||
ssid_sessions[socket.ssid].set("wtv-open-access", (request_headers['wtv-open-access'] == "true") ? true : false);
|
||||
session_data.set("wtv-open-access", (request_headers['wtv-open-access'] == "true") ? true : false);
|
||||
var file_path = null;
|
||||
var bf0app_update = false;
|
||||
var romtype = ssid_sessions[socket.ssid].get("wtv-client-rom-type");
|
||||
var romtype = session_data.get("wtv-client-rom-type");
|
||||
var send_tellyscript = (minisrv_config.services[service_name].send_tellyscripts && !request_headers.query.relogin);
|
||||
var wtv_script_id = parseInt(ssid_sessions[socket.ssid].get("wtv-script-id"));
|
||||
var bootrom = ssid_sessions[socket.ssid].get("wtv-client-bootrom-version");
|
||||
var wtv_script_id = parseInt(session_data.get("wtv-script-id"));
|
||||
var bootrom = session_data.get("wtv-client-bootrom-version");
|
||||
if ((request_headers.query.reconnect || request_headers.query.relogin) && wtv_script_id != 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)
|
||||
if (send_telly_to_ssid) {
|
||||
romtype = ssid_sessions[socket.ssid].get("wtv-client-rom-type");
|
||||
romtype = session_data.get("wtv-client-rom-type");
|
||||
}
|
||||
} else {
|
||||
romtype = ssid_sessions[socket.ssid].get("wtv-client-rom-type");
|
||||
romtype = session_data.get("wtv-client-rom-type");
|
||||
}
|
||||
var file_path = null;
|
||||
switch (romtype) {
|
||||
@@ -77,22 +77,23 @@ if (ssid_sessions[socket.ssid].data_store.wtvsec_login) {
|
||||
case "US-WEBSTAR-disk-0MB-16MB-softmodem-CPU5230":
|
||||
prereg_contype = "text/tellyscript";
|
||||
// if wtv-open-access: true then client expects OpenISP
|
||||
if (ssid_sessions[socket.ssid].get("wtv-open-access")) file_path = __dirname + "/ServiceDeps/premade_tellyscripts/LC2/LC2_OpenISP_56k.tok";
|
||||
else var file_path = __dirname + "/ServiceDeps/premade_tellyscripts/LC2/LC2_WTV_18006138199.tok";
|
||||
if (session_data.get("wtv-open-access")) file_path = __dirname + "/" +
|
||||
+ "/wtv-1800/tellyscripts/LC2/LC2_OpenISP_56k.tok";
|
||||
else var file_path = ServiceDeps + "/wtv-1800/tellyscripts/LC2/LC2_WTV_18006138199.tok";
|
||||
break;
|
||||
|
||||
case "US-DTV-disk-0MB-32MB-softmodem-CPU5230":
|
||||
if (wtvshared.isMiniBrowser(ssid_sessions[socket.ssid])) {
|
||||
if (wtvshared.isMiniBrowser(session_data)) {
|
||||
prereg_contype = "text/tellyscript";
|
||||
if (ssid_sessions[socket.ssid].get("wtv-open-access")) file_path = __dirname + "/ServiceDeps/premade_tellyscripts/LC2/LC2_OpenISP_56k.tok";
|
||||
else file_path = __dirname + "/ServiceDeps/premade_tellyscripts/LC2/LC2_WTV_18006138199.tok";
|
||||
if (session_data.get("wtv-open-access")) file_path = ServiceDeps + "/wtv-1800/tellyscripts/LC2/LC2_OpenISP_56k.tok";
|
||||
else file_path = ServiceDeps + "/wtv-1800/tellyscripts/LC2/LC2_WTV_18006138199.tok";
|
||||
} else {
|
||||
prereg_contype = "text/dialscript";
|
||||
if (ssid_sessions[socket.ssid].get("wtv-lan") == "true") {
|
||||
file_path = __dirname + "/ServiceDeps/premade_tellyscripts/UTV/utv_hsd.tok";
|
||||
if (session_data.get("wtv-lan") == "true") {
|
||||
file_path = ServiceDeps + "/wtv-1800/tellyscripts/UTV/utv_hsd.tok";
|
||||
} else {
|
||||
// todo OpenISP telly
|
||||
file_path = __dirname + "/ServiceDeps/premade_tellyscripts/UTV/utv_normal.tok";
|
||||
file_path = ServiceDeps + "/wtv-1800/tellyscripts/UTV/utv_normal.tok";
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -100,8 +101,8 @@ if (ssid_sessions[socket.ssid].data_store.wtvsec_login) {
|
||||
case "bf0app":
|
||||
prereg_contype = "text/tellyscript";
|
||||
// if wtv-open-access: true then client expects OpenISP
|
||||
if (ssid_sessions[socket.ssid].get("wtv-open-access")) file_path = __dirname + "/ServiceDeps/premade_tellyscripts/bf0app/bf0app_OISP.tok";
|
||||
else file_path = __dirname + "/ServiceDeps/premade_tellyscripts/bf0app/bf0app_WTV_18006138199.tok";
|
||||
if (session_data.get("wtv-open-access")) file_path = ServiceDeps + "/wtv-1800/tellyscripts/bf0app/bf0app_OISP.tok";
|
||||
else file_path = ServiceDeps + "/wtv-1800/tellyscripts/bf0app/bf0app_WTV_18006138199.tok";
|
||||
break;
|
||||
|
||||
// the following are not yet zefie generated and may have an unknown username/password attached
|
||||
@@ -109,8 +110,8 @@ if (ssid_sessions[socket.ssid].data_store.wtvsec_login) {
|
||||
case "JP-Fiji":
|
||||
prereg_contype = "text/tellyscript";
|
||||
// if wtv-open-access: true then client expects OpenISP
|
||||
if (ssid_sessions[socket.ssid].get("wtv-open-access")) var file_path = __dirname + "/ServiceDeps/premade_tellyscripts/FIJI/dc_production_normal.tok";
|
||||
else var file_path = __dirname + "/ServiceDeps/premade_tellyscripts/FIJI/dc_production_normal.tok";
|
||||
if (session_data.get("wtv-open-access")) var file_path = ServiceDeps + "/wtv-1800/tellyscripts/FIJI/dc_production_normal.tok";
|
||||
else var file_path = ServiceDeps + "/wtv-1800/tellyscripts/FIJI/dc_production_normal.tok";
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -120,7 +121,7 @@ if (ssid_sessions[socket.ssid].data_store.wtvsec_login) {
|
||||
|
||||
if (socket.ssid.substr(0, 8) == "MSTVSIMU") {
|
||||
prereg_contype = "text/dialscript";
|
||||
var file_path = __dirname + "/ServiceDeps/premade_tellyscripts/UTV/utv_hsd.tok";
|
||||
var file_path = ServiceDeps + "/wtv-1800/tellyscripts/UTV/utv_hsd.tok";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,9 +130,9 @@ if (ssid_sessions[socket.ssid].data_store.wtvsec_login) {
|
||||
// assume old classic in flash mode, override user setting and send tellyscript
|
||||
// because it is required to proceed in flash mode
|
||||
prereg_contype = "text/tellyscript";
|
||||
var file_path = __dirname + "/ServiceDeps/premade_tellyscripts/bf0app/bf0app_WTV_18006138199.tok";
|
||||
var file_path = ServiceDeps + "/wtv-1800/tellyscripts/bf0app/bf0app_WTV_18006138199.tok";
|
||||
var bf0app_update = true;
|
||||
ssid_sessions[socket.ssid].set("bf0app_update", bf0app_update);
|
||||
session_data.set("bf0app_update", bf0app_update);
|
||||
}
|
||||
|
||||
if (request_headers["wtv-ticket"] && !request_headers.query.reconnect) {
|
||||
@@ -150,9 +151,10 @@ if (ssid_sessions[socket.ssid].data_store.wtvsec_login) {
|
||||
|
||||
|
||||
headers = "200 OK\n"
|
||||
headers += "minisrv-no-mail-count: true\n";
|
||||
if (bf0app_update) headers += "minisrv-use-carriage-return: false\n";
|
||||
headers += "Connection: Keep-Alive\n";
|
||||
headers += "wtv-initial-key: " + ssid_sessions[socket.ssid].data_store.wtvsec_login.challenge_key.toString(CryptoJS.enc.Base64) + "\n";
|
||||
headers += "wtv-initial-key: " + session_data.data_store.wtvsec_login.challenge_key.toString(CryptoJS.enc.Base64) + "\n";
|
||||
headers += "Content-Type: " + prereg_contype + "\n";
|
||||
if (!request_headers.query.reconnect) headers += "wtv-service: reset\n";
|
||||
if (!bf0app_update) headers += getServiceString('wtv-1800') + "\n";
|
||||
@@ -162,8 +164,8 @@ if (ssid_sessions[socket.ssid].data_store.wtvsec_login) {
|
||||
|
||||
if (bf0app_update) headers += getServiceString('wtv-star', { "no_star_word": true }) + "\n";
|
||||
else headers += getServiceString('wtv-star') + "\n";
|
||||
if (request_headers.query.reconnect && !ssid_sessions[socket.ssid].getSessionData("registered")) headers += getServiceString('wtv-register') + "\n";
|
||||
headers += getServiceString('wtv-flashrom') + "\n";
|
||||
if (request_headers.query.reconnect && !session_data.getSessionData("registered") && !session_data.lockdown) headers += getServiceString('wtv-register') + "\n";
|
||||
if (!session_data.lockdown) headers += getServiceString('wtv-flashrom') + "\n";
|
||||
if (bf0app_update) headers += "wtv-boot-url: " + gourl + "\n";
|
||||
else {
|
||||
headers += "wtv-boot-url: wtv-head-waiter:/relogin?relogin=true";
|
||||
@@ -171,7 +173,7 @@ if (ssid_sessions[socket.ssid].data_store.wtvsec_login) {
|
||||
headers += "\n";
|
||||
}
|
||||
if (gourl != null) headers += "wtv-visit: " + gourl + "\n";
|
||||
if (!bf0app_update && ssid_sessions[socket.ssid].get("wtv-open-access")) headers += "wtv-open-isp-disabled: false\n";
|
||||
if (!bf0app_update && session_data.get("wtv-open-access")) headers += "wtv-open-isp-disabled: false\n";
|
||||
headers += "wtv-client-time-zone: GMT -0000\n";
|
||||
headers += "wtv-client-time-dst-rule: GMT\n"
|
||||
headers += "wtv-client-date: " + strftime("%a, %d %b %Y %H:%M:%S", new Date(new Date().toUTCString())) + " GMT";
|
||||
|
||||
98
zefie_wtvp_minisrv/ServiceVault/wtv-1800/unauthorized.js
Normal file
98
zefie_wtvp_minisrv/ServiceVault/wtv-1800/unauthorized.js
Normal file
@@ -0,0 +1,98 @@
|
||||
var minisrv_service_file = true;
|
||||
|
||||
headers = `200 OK
|
||||
Content-type: text/html
|
||||
minisrv-no-mail-count: true`;
|
||||
|
||||
data = `<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="${minisrv_config.config.service_logo}" 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: ${session_data.lockdownReason}</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>`;
|
||||
94
zefie_wtvp_minisrv/ServiceVault/wtv-admin/admin.js
Normal file
94
zefie_wtvp_minisrv/ServiceVault/wtv-admin/admin.js
Normal file
@@ -0,0 +1,94 @@
|
||||
var minisrv_service_file = true;
|
||||
|
||||
var WTVAdmin = require(classPath + "/WTVAdmin.js");
|
||||
var wtva = new WTVAdmin(minisrv_config, session_data, service_name);
|
||||
var auth = wtva.isAuthorized();
|
||||
if (auth === true) {
|
||||
var password = null;
|
||||
if (request_headers.Authorization) {
|
||||
var authheader = request_headers.Authorization.split(' ');
|
||||
if (authheader[0] == "Basic") {
|
||||
password = Buffer.from(authheader[1], 'base64').toString();
|
||||
if (password) password = password.split(':')[1];
|
||||
}
|
||||
}
|
||||
if (wtva.checkPassword(password)) {
|
||||
headers = "200 OK\r\nContent-Type: text/html";
|
||||
data = `<html>
|
||||
<body>
|
||||
<display nosave nosend>
|
||||
<title>${minisrv_config.config.service_name} Admin Tricks</title>
|
||||
<sidebar width=20%>
|
||||
<img src="wtv-tricks:/images/Favorites_bg.jpg">
|
||||
</sidebar>
|
||||
<body bgcolor="#0a0a0a" text="#CC1111" link="#ff55ff" vlink="#ff55ff" vspace=0>
|
||||
<font size="-1">
|
||||
<br>
|
||||
<br>
|
||||
<h1>${minisrv_config.config.service_name} Admin Tricks</h1>
|
||||
<br>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan=3 height=6>
|
||||
<tr>
|
||||
<td width=170><a href="wtv-tricks:/tricks">Standard Tricks</a>
|
||||
<td width=10>
|
||||
<td><a href="wtv-admin:/findaccount">Account Lookup</a>
|
||||
<tr>
|
||||
<td colspan=3 height=6>
|
||||
<tr>
|
||||
<td><a href="wtv-admin:/ban">Ban an SSID</a>
|
||||
<td width = 10>
|
||||
<td><a href="wtv-admin:/deleteaccount">Delete an Account</a>
|
||||
<tr>
|
||||
<td colspan=3 height=6>
|
||||
<tr>
|
||||
<td><a href="wtv-admin:/unban">Unban an SSID</a>
|
||||
<td width = 10>
|
||||
<td><a href="wtv-admin:/deleteuser">Delete User from Account</a>
|
||||
<tr>
|
||||
<td colspan=3 height=6>
|
||||
<tr>
|
||||
<td><strike><a href="wtv-admin:/whitelist">Whitelist an SSID</a></strike>
|
||||
<td width = 10>
|
||||
<td><a href="wtv-admin:/removeuserpasswd">Remove Pass from User </a>
|
||||
<tr>
|
||||
<td colspan=3 height=6>
|
||||
<tr>
|
||||
<td><strike><a href="wtv-admin:/addadmin">Grant Admin to SSID</a></strike>
|
||||
<td width = 10>
|
||||
<td><strike><a href="wtv-admin:/modadmin">Modify Admin for SSID</a></strike>
|
||||
<tr>
|
||||
<td colspan=3 height=6>
|
||||
<tr>
|
||||
<td><a href="wtv-admin:/polyzoot">Polyzoot a User</a>
|
||||
<td width = 10>
|
||||
<td><a href="wtv-admin:/reloadconfig">Reload Config</a>
|
||||
<tr>
|
||||
<td colspan=3 height=6>
|
||||
<tr>
|
||||
<td><a href="wtv-admin:/regenfavs">Restore Favs for User</a>
|
||||
<td width = 10>
|
||||
<td><!-- TODO -->
|
||||
<tr>
|
||||
<td colspan=3 height=6>
|
||||
<tr>
|
||||
<td><!-- TODO -->
|
||||
<td width = 10>
|
||||
<td>
|
||||
<!-- TODO -->
|
||||
<td width = 10>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
`;
|
||||
} else {
|
||||
var errpage = wtvshared.doErrorPage(401, "Please enter the administration password, you can leave the username blank.");
|
||||
headers = errpage[0];
|
||||
data = errpage[1];
|
||||
}
|
||||
} else {
|
||||
var errpage = wtvshared.doErrorPage(403, auth);
|
||||
headers = errpage[0];
|
||||
data = errpage[1];
|
||||
}
|
||||
94
zefie_wtvp_minisrv/ServiceVault/wtv-admin/ban.js
Normal file
94
zefie_wtvp_minisrv/ServiceVault/wtv-admin/ban.js
Normal file
@@ -0,0 +1,94 @@
|
||||
var minisrv_service_file = true;
|
||||
|
||||
var WTVAdmin = require(classPath + "/WTVAdmin.js");
|
||||
var wtva = new WTVAdmin(minisrv_config, session_data, service_name);
|
||||
var auth = wtva.isAuthorized();
|
||||
if (auth === true) {
|
||||
var password = null;
|
||||
if (request_headers.Authorization) {
|
||||
var authheader = request_headers.Authorization.split(' ');
|
||||
if (authheader[0] == "Basic") {
|
||||
password = Buffer.from(authheader[1], 'base64').toString();
|
||||
if (password) password = password.split(':')[1];
|
||||
}
|
||||
}
|
||||
if (wtva.checkPassword(password)) {
|
||||
if (request_headers.query.ssid) {
|
||||
var ssid = request_headers.query.ssid.toLowerCase();
|
||||
if (ssid == socket.ssid) {
|
||||
var nobanself = true;
|
||||
} else {
|
||||
var fake_config = wtvshared.getUserConfig();
|
||||
if (!fake_config.config) fake_config.config = {};
|
||||
if (!fake_config.config.ssid_block_list) fake_config.config.ssid_block_list = [];
|
||||
var entry_exists = false;
|
||||
Object.keys(fake_config.config.ssid_block_list).forEach(function (k) {
|
||||
if (fake_config.config.ssid_block_list[k] == ssid) {
|
||||
entry_exists = true;
|
||||
}
|
||||
});
|
||||
if (!entry_exists) {
|
||||
fake_config.config.ssid_block_list.push(ssid);
|
||||
wtvshared.writeToUserConfig(fake_config);
|
||||
reloadConfig();
|
||||
}
|
||||
}
|
||||
}
|
||||
headers = `200 OK
|
||||
Content-Type: text/html
|
||||
wtv-expire-all: wtv-admin:/ban`;
|
||||
if (ssid) {
|
||||
headers += "\nwtv-noback-all: wtv-admin:/ban";
|
||||
}
|
||||
data = `<html>
|
||||
<body>
|
||||
<display nosave nosend>
|
||||
<title>${minisrv_config.config.service_name} Admin Tricks</title>
|
||||
<sidebar width=20%>
|
||||
<img src="wtv-admin:/images/nuke.gif">
|
||||
</sidebar>
|
||||
<body bgcolor="#0a0a0a" text="#CC1111" link="#ff55ff" vlink="#ff55ff" vspace=0>
|
||||
<br>
|
||||
<br>
|
||||
<h1>${minisrv_config.config.service_name} Admin Tricks</h1>
|
||||
<br>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan=3 height=6>
|
||||
<h3>Ban an SSID</h3>
|
||||
<form action="wtv-admin:/ban" method="POST">
|
||||
<input type="text" name="ssid" value="${(ssid) ? ssid : ""}">
|
||||
<input type="submit" value="Ban SSID">
|
||||
</form><br><br>`
|
||||
if (request_headers.query.ssid) {
|
||||
if (nobanself) {
|
||||
data += "<strong>Cannot ban yourself.</strong>"
|
||||
} else {
|
||||
if (entry_exists) {
|
||||
data += "<strong>SSID " + request_headers.query.ssid + " is already in the ban list.</strong><br><br>";
|
||||
} else {
|
||||
data += "<strong>SSID " + request_headers.query.ssid + " added to the ban list.</strong><br><br>";
|
||||
}
|
||||
}
|
||||
}
|
||||
data += `
|
||||
<br>
|
||||
<br>
|
||||
<tr>
|
||||
</table>
|
||||
<p align="right">
|
||||
<a href="client:goback">Go Back</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
`;
|
||||
} else {
|
||||
var errpage = wtvshared.doErrorPage(401, "Please enter the administration password, you can leave the username blank.");
|
||||
headers = errpage[0];
|
||||
data = errpage[1];
|
||||
}
|
||||
} else {
|
||||
var errpage = wtvshared.doErrorPage(403, auth);
|
||||
headers = errpage[0];
|
||||
data = errpage[1];
|
||||
}
|
||||
112
zefie_wtvp_minisrv/ServiceVault/wtv-admin/deleteaccount.js
Normal file
112
zefie_wtvp_minisrv/ServiceVault/wtv-admin/deleteaccount.js
Normal file
@@ -0,0 +1,112 @@
|
||||
var minisrv_service_file = true;
|
||||
|
||||
var WTVAdmin = require(classPath + "/WTVAdmin.js");
|
||||
var wtva = new WTVAdmin(minisrv_config, session_data, service_name);
|
||||
var auth = wtva.isAuthorized();
|
||||
if (auth === true) {
|
||||
var password = null;
|
||||
if (request_headers.Authorization) {
|
||||
var authheader = request_headers.Authorization.split(' ');
|
||||
if (authheader[0] == "Basic") {
|
||||
password = Buffer.from(authheader[1], 'base64').toString();
|
||||
if (password) password = password.split(':')[1];
|
||||
}
|
||||
}
|
||||
if (wtva.checkPassword(password)) {
|
||||
if (request_headers.query.ssid) {
|
||||
var ssid_match = false;
|
||||
var ssid = request_headers.query.ssid.toLowerCase();
|
||||
var user_info = wtva.getAccountInfoBySSID(ssid);
|
||||
if (request_headers.query.confirm_delete) {
|
||||
user_info = null;
|
||||
if (ssid == socket.ssid) {
|
||||
ssid_match = true;
|
||||
} else {
|
||||
// delete
|
||||
var userAccount = wtva.getAccountBySSID(ssid);
|
||||
userAccount.unregisterBox();
|
||||
}
|
||||
}
|
||||
}
|
||||
headers = `200 OK
|
||||
Content-Type: text/html
|
||||
wtv-expire-all: wtv-admin:/deleteaccount
|
||||
wtv-noback-all: wtv-admin:/deleteaccount`;
|
||||
data = `<html>
|
||||
<body>
|
||||
<display nosave nosend>
|
||||
<title>${minisrv_config.config.service_name} Admin Tricks</title>
|
||||
<sidebar width=20%>
|
||||
<img src="wtv-admin:/images/nuke.gif">
|
||||
</sidebar>
|
||||
<body bgcolor="#0a0a0a" text="#CC1111" link="#ff55ff" vlink="#ff55ff" vspace=0>
|
||||
<br>
|
||||
<br>
|
||||
<h1>${minisrv_config.config.service_name} Admin Tricks</h1>
|
||||
<br>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan=3 height=6>
|
||||
<h3>Delete an Account</h3>
|
||||
<form action="wtv-admin:/deleteaccount" method="POST">
|
||||
<input type="text" name="ssid" value="${(ssid) ? ssid : ""}"> <input type="submit" value="Look Up SSID">
|
||||
</form><br><br>`
|
||||
if (ssid) {
|
||||
if (user_info) {
|
||||
data += `
|
||||
<strong>User Information:</strong>
|
||||
<table border=1 cellpadding=3 width=400>
|
||||
<tr><td>Username:</td><td>${user_info.username} (User ID: ${user_info.user_id})</td></tr>
|
||||
<tr><td>SSID:</td><td>${user_info.ssid}</td></tr>`;
|
||||
if (user_info.account_users) {
|
||||
data += `<tr><td>Primary User:</td><td>${user_info.account_users['subscriber'].subscriber_username}</td></tr>`;
|
||||
if (Object.keys(user_info.account_users).length > 1) {
|
||||
data += `<tr><td>Additional Users:</td><td>`;
|
||||
Object.keys(user_info.account_users).forEach(function (k) {
|
||||
if (k == "subscriber") return;
|
||||
data += user_info.account_users[k].subscriber_username + "<br>";
|
||||
})
|
||||
data += `</td></tr>`
|
||||
}
|
||||
}
|
||||
data += `
|
||||
<tr>
|
||||
<td border=0 colspan=2 align=right>
|
||||
<form action="wtv-admin:/deleteaccount" method="POST">
|
||||
<input type="hidden" name="ssid" value="${user_info.ssid}">
|
||||
<input type="hidden" name="confirm_delete" value="true">
|
||||
<input type="submit" value="Confirm Delete">
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
`
|
||||
data += `</table>`;
|
||||
} else if (request_headers.query.confirm_delete && ssid_match) {
|
||||
data += `<strong>Cannot delete yourself in this manner.<br>Try ${minisrv_config.config.service_name} Tricks Unregister.</strong><br><br>`;
|
||||
} else if (request_headers.query.confirm_delete) {
|
||||
data += "<strong>Account for SSID \"" + ssid + "\" has been deleted.</strong><br><br>";
|
||||
} else {
|
||||
data += "<strong>Could not find an account for SSID \"" + ssid + "\"</strong><br><br>";
|
||||
}
|
||||
}
|
||||
data += `
|
||||
<br>
|
||||
<br>
|
||||
<tr>
|
||||
</table>
|
||||
<p align="right">
|
||||
<a href="client:goback">Go Back</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
`;
|
||||
} else {
|
||||
var errpage = wtvshared.doErrorPage(401, "Please enter the administration password, you can leave the username blank.");
|
||||
headers = errpage[0];
|
||||
data = errpage[1];
|
||||
}
|
||||
} else {
|
||||
var errpage = wtvshared.doErrorPage(403, auth);
|
||||
headers = errpage[0];
|
||||
data = errpage[1];
|
||||
}
|
||||
118
zefie_wtvp_minisrv/ServiceVault/wtv-admin/deleteuser.js
Normal file
118
zefie_wtvp_minisrv/ServiceVault/wtv-admin/deleteuser.js
Normal file
@@ -0,0 +1,118 @@
|
||||
var minisrv_service_file = true;
|
||||
|
||||
var WTVAdmin = require(classPath + "/WTVAdmin.js");
|
||||
var wtva = new WTVAdmin(minisrv_config, session_data, service_name);
|
||||
var auth = wtva.isAuthorized();
|
||||
if (auth === true) {
|
||||
var password = null;
|
||||
if (request_headers.Authorization) {
|
||||
var authheader = request_headers.Authorization.split(' ');
|
||||
if (authheader[0] == "Basic") {
|
||||
password = Buffer.from(authheader[1], 'base64').toString();
|
||||
if (password) password = password.split(':')[1];
|
||||
}
|
||||
}
|
||||
if (wtva.checkPassword(password)) {
|
||||
if (request_headers.query.username) {
|
||||
var show_cannot_modify_self = false;
|
||||
var show_cannot_remove_primary = false;
|
||||
var show_box_was_unregistered = false;
|
||||
var user_info = wtva.getAccountInfo(request_headers.query.username.toLowerCase()); // username search
|
||||
if (user_info) {
|
||||
if (user_info.ssid == socket.ssid) {
|
||||
show_cannot_modify_self = true;
|
||||
}
|
||||
if (request_headers.query.confirm_delete) {
|
||||
if (!show_cannot_modify_self) {
|
||||
// delete
|
||||
var userAccount = wtva.getAccountBySSID(user_info.ssid);
|
||||
userAccount.switchUserID(0, false, false);
|
||||
var userCount = Object.keys(user_info.account_users).length;
|
||||
if (user_info.user_id === 0) {
|
||||
show_cannot_remove_primary = true;
|
||||
} else {
|
||||
var result = userAccount.removeUser(user_info.user_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
headers = `200 OK
|
||||
Content-Type: text/html
|
||||
wtv-expire-all: wtv-admin:/deleteuser
|
||||
wtv-noback-all: wtv-admin:/deleteuser`;
|
||||
data = `<html>
|
||||
<body>
|
||||
<display nosave nosend>
|
||||
<title>${minisrv_config.config.service_name} Admin Tricks</title>
|
||||
<sidebar width=20%>
|
||||
<img src="wtv-admin:/images/nuke.gif">
|
||||
</sidebar>
|
||||
<body bgcolor="#0a0a0a" text="#CC1111" link="#ff55ff" vlink="#ff55ff" vspace=0>
|
||||
<br>
|
||||
<br>
|
||||
<h1>${minisrv_config.config.service_name} Admin Tricks</h1>
|
||||
<br>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan=3 height=6>
|
||||
<h3>Delete a user from an account</h3>
|
||||
<form action="wtv-admin:/deleteuser" method="POST">
|
||||
<input type="text" name="username" value="${(request_headers.query.username) ? request_headers.query.username : ""}"> <input type="submit" value="Look Up User">
|
||||
</form><br><br>`
|
||||
if (request_headers.query.username) {
|
||||
if (user_info && !request_headers.query.confirm_delete) {
|
||||
data += `
|
||||
<strong>User Information:</strong>
|
||||
<table border=1 cellpadding=3 width=400>
|
||||
<tr><td>Username:</td><td>${user_info.username} (User ID: ${user_info.user_id})</td></tr>
|
||||
<tr><td>SSID:</td><td>${user_info.ssid}</td></tr>`;
|
||||
if (user_info.account_users) {
|
||||
data += `<tr><td>Primary User:</td><td>${user_info.account_users['subscriber'].subscriber_username}</td></tr>`;
|
||||
}
|
||||
data += `
|
||||
<tr>
|
||||
<td border=0 colspan=2 align=right>
|
||||
<form action="wtv-admin:/deleteuser" method="POST">
|
||||
<input type="hidden" name="username" value="${user_info.username}">
|
||||
<input type="hidden" name="confirm_delete" value="true">
|
||||
<input type="submit" value="Confirm Delete">
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
`
|
||||
data += `</table>`;
|
||||
} else if (request_headers.query.confirm_delete && show_cannot_modify_self) {
|
||||
data += `<strong>Cannot modify your account in this manner.<br>Try <a href="wtv-setup:/remove-users">wtv-setup</a>.</strong><br><br>`;
|
||||
} else if (request_headers.query.confirm_delete && show_cannot_remove_primary) {
|
||||
data += `<strong>Cannot delete a primary user in this manner.<br>Try <a href="wtv-admin:/deleteaccount?ssid=${user_info.ssid}">deleting the account</a>.<br><br>`;
|
||||
} else if (request_headers.query.confirm_delete && show_box_was_unregistered) {
|
||||
data += `<strong>Account for "${user_info.username}" was deleted, and SSID ${user_info.ssid} unregistered, as it was the only user.<br><br>`;
|
||||
} else if (request_headers.query.confirm_delete) {
|
||||
if (result) data += `<strong>User "${user_info.username}" has been deleted from account belonging to SSID ${user_info.ssid}.</strong><br><br>`;
|
||||
else data += `<strong>Could not delete "${user_info.username}" from SSID ${user_info.ssid}.</strong><br><br>`;
|
||||
} else {
|
||||
data += "<strong>Could not find an account for user \"" + request_headers.query.username + "\"</strong><br><br>";
|
||||
}
|
||||
}
|
||||
data += `
|
||||
<br>
|
||||
<br>
|
||||
<tr>
|
||||
</table>
|
||||
<p align="right">
|
||||
<a href="client:goback">Go Back</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
`;
|
||||
} else {
|
||||
var errpage = wtvshared.doErrorPage(401, "Please enter the administration password, you can leave the username blank.");
|
||||
headers = errpage[0];
|
||||
data = errpage[1];
|
||||
}
|
||||
} else {
|
||||
var errpage = wtvshared.doErrorPage(403, auth);
|
||||
headers = errpage[0];
|
||||
data = errpage[1];
|
||||
}
|
||||
100
zefie_wtvp_minisrv/ServiceVault/wtv-admin/findaccount.js
Normal file
100
zefie_wtvp_minisrv/ServiceVault/wtv-admin/findaccount.js
Normal file
@@ -0,0 +1,100 @@
|
||||
var minisrv_service_file = true;
|
||||
|
||||
var WTVAdmin = require(classPath + "/WTVAdmin.js");
|
||||
var wtva = new WTVAdmin(minisrv_config, session_data, service_name);
|
||||
var auth = wtva.isAuthorized();
|
||||
if (auth === true) {
|
||||
var password = null;
|
||||
if (request_headers.Authorization) {
|
||||
var authheader = request_headers.Authorization.split(' ');
|
||||
if (authheader[0] == "Basic") {
|
||||
password = Buffer.from(authheader[1], 'base64').toString();
|
||||
if (password) password = password.split(':')[1];
|
||||
}
|
||||
}
|
||||
if (wtva.checkPassword(password)) {
|
||||
if (request_headers.query.username) {
|
||||
var user_info = wtva.getAccountInfo(request_headers.query.username.toLowerCase()); // username search
|
||||
if (!user_info) user_info = wtva.getAccountInfoBySSID(request_headers.query.username.toLowerCase()); // ssid search
|
||||
}
|
||||
headers = `200 OK
|
||||
Content-Type: text/html
|
||||
wtv-expire-all: wtv-admin:/findaccount
|
||||
wtv-noback-all: wtv-admin:/findaccount`;
|
||||
data = `<html>
|
||||
<body>
|
||||
<display nosave nosend>
|
||||
<title>${minisrv_config.config.service_name} Admin Tricks</title>
|
||||
<sidebar width=20%>
|
||||
<img src="wtv-tricks:/images/Favorites_bg.jpg">
|
||||
</sidebar>
|
||||
<body bgcolor="#0a0a0a" text="#CC1111" link="#ff55ff" vlink="#ff55ff" vspace=0>
|
||||
<br>
|
||||
<br>
|
||||
<h1>${minisrv_config.config.service_name} Admin Tricks</h1>
|
||||
<br>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan=3 height=6>
|
||||
<h3>Account Lookup</h3>
|
||||
<form action="wtv-admin:/findaccount" method="POST">
|
||||
<input type="text" name="username" value="${(request_headers.query.username) ? request_headers.query.username : ""}"> <input type="submit" value="Look Up User / SSID">
|
||||
</form><br><br>`
|
||||
if (request_headers.query.username) {
|
||||
if (user_info) {
|
||||
data += `
|
||||
<strong>User Information:</strong>
|
||||
<table border=1 cellpadding=3>
|
||||
<tr><td>Username:</td><td>${user_info.username} (User ID: ${user_info.user_id})</td></tr>
|
||||
<tr><td>SSID:</td><td>${user_info.ssid}</td></tr>`;
|
||||
if (user_info.account_users) {
|
||||
data += `<tr><td>Primary User:</td><td>${user_info.account_users['subscriber'].subscriber_username}</td></tr>`;
|
||||
if (Object.keys(user_info.account_users).length > 1) {
|
||||
data += `<tr><td>Additional Users:</td><td>`;
|
||||
Object.keys(user_info.account_users).forEach(function (k) {
|
||||
if (k == "subscriber") return;
|
||||
data += user_info.account_users[k].subscriber_username + "<br>";
|
||||
})
|
||||
data += `</td></tr>`
|
||||
}
|
||||
}
|
||||
data += `
|
||||
<tr>
|
||||
<td border=0 colspan=2>`;
|
||||
if (wtva.isBanned(user_info.ssid)) {
|
||||
data += `<a href="wtv-admin:/unban?ssid=${user_info.ssid}">Unban SSID</a>`;
|
||||
data += " ".repeat(28);
|
||||
} else {
|
||||
data += `<a href="wtv-admin:/ban?ssid=${user_info.ssid}">Ban SSID</a>`;
|
||||
data += " ".repeat(32);
|
||||
}
|
||||
data += `<a href="wtv-admin:/deleteaccount?ssid=${user_info.ssid}">Delete Account</span>
|
||||
</td>
|
||||
</tr>
|
||||
`
|
||||
data += `</table>`;
|
||||
} else {
|
||||
data += "<strong>Could not find user \"" + request_headers.query.username + "\"</strong><br><br>";
|
||||
}
|
||||
}
|
||||
data += `
|
||||
<br>
|
||||
<br>
|
||||
<tr>
|
||||
</table>
|
||||
<p align="right">
|
||||
<a href="client:goback">Go Back</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
`;
|
||||
} else {
|
||||
var errpage = wtvshared.doErrorPage(401, "Please enter the administration password, you can leave the username blank.");
|
||||
headers = errpage[0];
|
||||
data = errpage[1];
|
||||
}
|
||||
} else {
|
||||
var errpage = wtvshared.doErrorPage(403, auth);
|
||||
headers = errpage[0];
|
||||
data = errpage[1];
|
||||
}
|
||||
BIN
zefie_wtvp_minisrv/ServiceVault/wtv-admin/images/nuke.gif
Normal file
BIN
zefie_wtvp_minisrv/ServiceVault/wtv-admin/images/nuke.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
BIN
zefie_wtvp_minisrv/ServiceVault/wtv-admin/images/polyzoot.jpg
Normal file
BIN
zefie_wtvp_minisrv/ServiceVault/wtv-admin/images/polyzoot.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.3 KiB |
133
zefie_wtvp_minisrv/ServiceVault/wtv-admin/polyzoot.js
Normal file
133
zefie_wtvp_minisrv/ServiceVault/wtv-admin/polyzoot.js
Normal file
@@ -0,0 +1,133 @@
|
||||
var minisrv_service_file = true;
|
||||
|
||||
var WTVAdmin = require(classPath + "/WTVAdmin.js");
|
||||
var wtva = new WTVAdmin(minisrv_config, session_data, service_name);
|
||||
var auth = wtva.isAuthorized();
|
||||
if (auth === true) {
|
||||
var password = null;
|
||||
if (request_headers.Authorization) {
|
||||
var authheader = request_headers.Authorization.split(' ');
|
||||
if (authheader[0] == "Basic") {
|
||||
password = Buffer.from(authheader[1], 'base64').toString();
|
||||
if (password) password = password.split(':')[1];
|
||||
}
|
||||
}
|
||||
if (wtva.checkPassword(password)) {
|
||||
if (request_headers.query.username) {
|
||||
var user_info = wtva.getAccountInfo(request_headers.query.username.toLowerCase()); // username search
|
||||
if (user_info) {
|
||||
var userAccount = wtva.getAccountBySSID(user_info.ssid);
|
||||
userAccount.switchUserID(user_info.user_id, false, false);
|
||||
if (request_headers.query.confirm) {
|
||||
var polyzooot = 1407;
|
||||
var WTVBGMusic = require(classPath + "/WTVBGMusic.js");
|
||||
var wtvbgm = new WTVBGMusic(minisrv_config, userAccount);
|
||||
var bgmcat = wtvbgm.getSongCategory(polyzooot);
|
||||
var music_obj = wtvbgm.getMusicObj();
|
||||
music_obj.enableCategories = [bgmcat];
|
||||
music_obj.enableSongs = [polyzooot];
|
||||
music_obj = Object.assign({}, music_obj)
|
||||
userAccount.setSessionData("wtv-bgmusic", music_obj);
|
||||
var settings_obj = userAccount.getSessionData("wtv-setup");
|
||||
if (settings_obj === null) settings_obj = {};
|
||||
settings_obj['setup-play-bgm'] = 1;
|
||||
userAccount.setSessionData("wtv-setup", Object.assign({}, settings_obj));
|
||||
userAccount.saveSessionData();
|
||||
}
|
||||
if (request_headers.query.reset) {
|
||||
var WTVBGMusic = require(classPath + "/WTVBGMusic.js");
|
||||
userAccount.deleteSessionData("wtv-bgmusic")
|
||||
var wtvbgm = new WTVBGMusic(minisrv_config, userAccount);
|
||||
var music_obj = wtvbgm.getMusicObj(true);
|
||||
var settings_obj = userAccount.getSessionData("wtv-setup");
|
||||
if (settings_obj === null) settings_obj = {};
|
||||
settings_obj['setup-play-bgm'] = 0;
|
||||
userAccount.setSessionData("wtv-setup", Object.assign({}, settings_obj));
|
||||
userAccount.saveSessionData();
|
||||
}
|
||||
}
|
||||
}
|
||||
headers = `200 OK
|
||||
Content-Type: text/html
|
||||
wtv-expire-all: wtv-admin:/polyzoot
|
||||
wtv-noback-all: wtv-admin:/polyzoot`;
|
||||
data = `<html>
|
||||
<body>
|
||||
<display nosave nosend>
|
||||
<title>${minisrv_config.config.service_name} Admin Tricks</title>
|
||||
<sidebar width=20%>
|
||||
<img src="wtv-admin:/images/polyzoot.jpg">
|
||||
</sidebar>
|
||||
<body bgcolor="#0a0a0a" text="#CC1111" link="#ff55ff" vlink="#ff55ff" vspace=0>
|
||||
<br>
|
||||
<br>
|
||||
<h1>${minisrv_config.config.service_name} Admin Tricks</h1>
|
||||
<br>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan=3 height=6>
|
||||
<h3>Polyzoot a User</h3>`;
|
||||
|
||||
if (!request_headers.query.username) {
|
||||
data += `"Polyzooting" a user will replace their Background Music with only Polyzoot,
|
||||
and turn on BGM if they have it disabled. This will not work on Old Classic clients.
|
||||
Also, the only way to undo a "Polyzooting" is to reset the user's music selection to default.<br><br>`
|
||||
}
|
||||
|
||||
data += `
|
||||
<form action="wtv-admin:/polyzoot" method="POST">
|
||||
<input type="text" name="username" value="${(request_headers.query.username) ? request_headers.query.username : ""}"> <input type="submit" value="Look Up User">
|
||||
</form><br><br>`
|
||||
if (request_headers.query.username) {
|
||||
if (user_info && !request_headers.query.confirm && !request_headers.query.reset) {
|
||||
if (user_info.username == session_data.getSessionData("subscriber_username")) {
|
||||
data += `Are you sure you want to Polyzoot <b>yourself</b>?<br>Are you a masochist?`;
|
||||
} else {
|
||||
data += `Are you sure you want to Polyzoot <b>${user_info.username}</b>?<br>Are you a sadist?`;
|
||||
}
|
||||
data += `
|
||||
<br><br>
|
||||
<tr>
|
||||
<td>
|
||||
<form action="wtv-admin:/polyzoot" method="POST">
|
||||
<input type="hidden" name="username" value="${user_info.username}">
|
||||
<input type="hidden" name="reset" value="true">
|
||||
<input type="submit" value="Release This Soul (Reset)">
|
||||
</td>
|
||||
<td>
|
||||
<form action="wtv-admin:/polyzoot" method="POST">
|
||||
<input type="hidden" name="username" value="${user_info.username}">
|
||||
<input type="hidden" name="confirm" value="true">
|
||||
<input type="submit" value="Torture This Soul">
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
`
|
||||
data += `</table>`;
|
||||
} else if (request_headers.query.confirm) {
|
||||
data += `You have condemned <strong>${user_info.username}</strong><br> to endless loops of Polyzoot.<br><br>It will take effect upon their next login.<br><br>`;
|
||||
} else if (request_headers.query.reset) {
|
||||
data += `You have freed <strong>${user_info.username}'s</strong> soul<br> from the bounds of Polyzoot.<br><br>It will take effect upon their next login.<br><br>`;
|
||||
}
|
||||
}
|
||||
data += `
|
||||
<br>
|
||||
<br>
|
||||
<tr>
|
||||
</table>
|
||||
<p align="right">
|
||||
<a href="client:goback">Go Back</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
`;
|
||||
} else {
|
||||
var errpage = wtvshared.doErrorPage(401, "Please enter the administration password, you can leave the username blank.");
|
||||
headers = errpage[0];
|
||||
data = errpage[1];
|
||||
}
|
||||
} else {
|
||||
var errpage = wtvshared.doErrorPage(403, auth);
|
||||
headers = errpage[0];
|
||||
data = errpage[1];
|
||||
}
|
||||
98
zefie_wtvp_minisrv/ServiceVault/wtv-admin/regenfavs.js
Normal file
98
zefie_wtvp_minisrv/ServiceVault/wtv-admin/regenfavs.js
Normal file
@@ -0,0 +1,98 @@
|
||||
var minisrv_service_file = true;
|
||||
|
||||
var WTVAdmin = require(classPath + "/WTVAdmin.js");
|
||||
var wtva = new WTVAdmin(minisrv_config, session_data, service_name);
|
||||
var auth = wtva.isAuthorized();
|
||||
if (auth === true) {
|
||||
var password = null;
|
||||
if (request_headers.Authorization) {
|
||||
var authheader = request_headers.Authorization.split(' ');
|
||||
if (authheader[0] == "Basic") {
|
||||
password = Buffer.from(authheader[1], 'base64').toString();
|
||||
if (password) password = password.split(':')[1];
|
||||
}
|
||||
}
|
||||
if (wtva.checkPassword(password)) {
|
||||
if (request_headers.query.username) {
|
||||
var user_info = wtva.getAccountInfo(request_headers.query.username.toLowerCase()); // username search
|
||||
if (user_info) {
|
||||
var userAccount = wtva.getAccountBySSID(user_info.ssid);
|
||||
userAccount.switchUserID(user_info.user_id, false, false);
|
||||
if (request_headers.query.folder) {
|
||||
if (userAccount.favstore.favstoreExists()) {
|
||||
if (userAccount.favstore.folderExists(request_headers.query.folder)) {
|
||||
userAccount.favstore.deleteFolder(request_headers.query.folder);
|
||||
}
|
||||
userAccount.favstore.createTemplateFolder(request_headers.query.folder);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
headers = `200 OK
|
||||
Content-Type: text/html
|
||||
wtv-expire-all: wtv-admin:/regenfavs
|
||||
wtv-noback-all: wtv-admin:/regenfavs`;
|
||||
data = `<html>
|
||||
<body>
|
||||
<display nosave nosend>
|
||||
<title>${minisrv_config.config.service_name} Admin Tricks</title>
|
||||
<sidebar width=20%>
|
||||
<img src="wtv-tricks:/images/Favorites_bg.jpg">
|
||||
</sidebar>
|
||||
<body bgcolor="#0a0a0a" text="#CC1111" link="#ff55ff" vlink="#ff55ff" vspace=0>
|
||||
<br>
|
||||
<br>
|
||||
<h1>${minisrv_config.config.service_name} Admin Tricks</h1>
|
||||
<br>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan=3 height=6>
|
||||
<h3>Restore a default favorites folder for a User</h3>
|
||||
<form action="wtv-admin:/regenfavs" method="POST">
|
||||
<input type="text" name="username" value="${(request_headers.query.username) ? request_headers.query.username : ""}"> <input type="submit" value="Look Up User">
|
||||
</form><br><br>`
|
||||
if (request_headers.query.username) {
|
||||
if (user_info && !request_headers.query.folder) {
|
||||
if (userAccount.favstore.favstoreExists()) {
|
||||
data += `<form action="wtv-admin:/regenfavs" method="POST">
|
||||
<input type="hidden" name="username" value="${user_info.username}">
|
||||
<select name="folder">`;
|
||||
|
||||
Object.keys(minisrv_config.favorites.folder_templates).forEach(function (k) {
|
||||
data += `<option value="${k}">${k}</option`;
|
||||
});
|
||||
data += `</select>
|
||||
<input type="submit" value="Restore Folder">
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
`
|
||||
data += `</table>`;
|
||||
} else {
|
||||
data += `<strong>${user_info.username} has not initialized their favorites.</strong><br><br>`;
|
||||
}
|
||||
} else {
|
||||
data += `<strong>Successfully regenerated folder ${request_headers.query.folder} for user "${user_info.username}"</strong><br><br>`;
|
||||
}
|
||||
}
|
||||
data += `
|
||||
<br>
|
||||
<br>
|
||||
<tr>
|
||||
</table>
|
||||
<p align="right">
|
||||
<a href="client:goback">Go Back</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
`;
|
||||
} else {
|
||||
var errpage = wtvshared.doErrorPage(401, "Please enter the administration password, you can leave the username blank.");
|
||||
headers = errpage[0];
|
||||
data = errpage[1];
|
||||
}
|
||||
} else {
|
||||
var errpage = wtvshared.doErrorPage(403, auth);
|
||||
headers = errpage[0];
|
||||
data = errpage[1];
|
||||
}
|
||||
56
zefie_wtvp_minisrv/ServiceVault/wtv-admin/reloadconfig.js
Normal file
56
zefie_wtvp_minisrv/ServiceVault/wtv-admin/reloadconfig.js
Normal file
@@ -0,0 +1,56 @@
|
||||
var minisrv_service_file = true;
|
||||
|
||||
var WTVAdmin = require(classPath + "/WTVAdmin.js");
|
||||
var wtva = new WTVAdmin(minisrv_config, session_data, service_name);
|
||||
var auth = wtva.isAuthorized();
|
||||
if (auth === true) {
|
||||
var password = null;
|
||||
if (request_headers.Authorization) {
|
||||
var authheader = request_headers.Authorization.split(' ');
|
||||
if (authheader[0] == "Basic") {
|
||||
password = Buffer.from(authheader[1], 'base64').toString();
|
||||
if (password) password = password.split(':')[1];
|
||||
}
|
||||
}
|
||||
if (wtva.checkPassword(password)) {
|
||||
reloadConfig();
|
||||
headers = `200 OK
|
||||
Content-Type: text/html
|
||||
wtv-expire-all: wtv-admin:/reloadconfig
|
||||
wtv-noback-all: wtv-admin:/reloadconfig`;
|
||||
data = `<html>
|
||||
<body>
|
||||
<display nosave nosend>
|
||||
<title>${minisrv_config.config.service_name} Admin Tricks</title>
|
||||
<sidebar width=20%>
|
||||
<img src="wtv-tricks:/images/Favorites_bg.jpg">
|
||||
</sidebar>
|
||||
<body bgcolor="#0a0a0a" text="#CC1111" link="#ff55ff" vlink="#ff55ff" vspace=0>
|
||||
<br>
|
||||
<br>
|
||||
<h1>${minisrv_config.config.service_name} Admin Tricks</h1>
|
||||
<br>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan=3 height=6>
|
||||
<h3>Reload Config</h3>
|
||||
The config.json and user_config.json files has been reloaded.<br>
|
||||
If you added a new service, it will not bind without a restart.
|
||||
<tr>
|
||||
</table>
|
||||
<p align="right">
|
||||
<a href="client:goback">Go Back</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
`;
|
||||
} else {
|
||||
var errpage = wtvshared.doErrorPage(401, "Please enter the administration password, you can leave the username blank.");
|
||||
headers = errpage[0];
|
||||
data = errpage[1];
|
||||
}
|
||||
} else {
|
||||
var errpage = wtvshared.doErrorPage(403, auth);
|
||||
headers = errpage[0];
|
||||
data = errpage[1];
|
||||
}
|
||||
109
zefie_wtvp_minisrv/ServiceVault/wtv-admin/removeuserpasswd.js
Normal file
109
zefie_wtvp_minisrv/ServiceVault/wtv-admin/removeuserpasswd.js
Normal file
@@ -0,0 +1,109 @@
|
||||
var minisrv_service_file = true;
|
||||
|
||||
var WTVAdmin = require(classPath + "/WTVAdmin.js");
|
||||
var wtva = new WTVAdmin(minisrv_config, session_data, service_name);
|
||||
var auth = wtva.isAuthorized();
|
||||
if (auth === true) {
|
||||
var password = null;
|
||||
if (request_headers.Authorization) {
|
||||
var authheader = request_headers.Authorization.split(' ');
|
||||
if (authheader[0] == "Basic") {
|
||||
password = Buffer.from(authheader[1], 'base64').toString();
|
||||
if (password) password = password.split(':')[1];
|
||||
}
|
||||
}
|
||||
if (wtva.checkPassword(password)) {
|
||||
if (request_headers.query.username) {
|
||||
var show_cannot_modify_self = false;
|
||||
var show_user_has_no_password = false;
|
||||
var user_info = wtva.getAccountInfo(request_headers.query.username.toLowerCase()); // username search
|
||||
if (user_info) {
|
||||
if (user_info.ssid == socket.ssid) {
|
||||
show_cannot_modify_self = true;
|
||||
}
|
||||
var userAccount = wtva.getAccountBySSID(user_info.ssid);
|
||||
userAccount.switchUserID(user_info.user_id, false, false);
|
||||
if (!userAccount.getUserPasswordEnabled()) {
|
||||
show_user_has_no_password = true;
|
||||
}
|
||||
if (request_headers.query.confirm_remove) {
|
||||
if (!show_cannot_modify_self && !show_user_has_no_password) {
|
||||
userAccount.disableUserPassword();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
headers = `200 OK
|
||||
Content-Type: text/html
|
||||
wtv-expire-all: wtv-admin:/removeuserpasswd
|
||||
wtv-noback-all: wtv-admin:/removeuserpasswd`;
|
||||
data = `<html>
|
||||
<body>
|
||||
<display nosave nosend>
|
||||
<title>${minisrv_config.config.service_name} Admin Tricks</title>
|
||||
<sidebar width=20%>
|
||||
<img src="wtv-admin:/images/nuke.gif">
|
||||
</sidebar>
|
||||
<body bgcolor="#0a0a0a" text="#CC1111" link="#ff55ff" vlink="#ff55ff" vspace=0>
|
||||
<br>
|
||||
<br>
|
||||
<h1>${minisrv_config.config.service_name} Admin Tricks</h1>
|
||||
<br>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan=3 height=6>
|
||||
<h3>Remove Password from a User Account</h3>
|
||||
<form action="wtv-admin:/removeuserpasswd" method="POST">
|
||||
<input type="text" name="username" value="${(request_headers.query.username) ? request_headers.query.username : ""}"> <input type="submit" value="Look Up User">
|
||||
</form><br><br>`
|
||||
if (request_headers.query.username) {
|
||||
if (user_info && !request_headers.query.confirm_remove && !show_user_has_no_password && !show_cannot_modify_self) {
|
||||
data += `
|
||||
<strong>User Information:</strong>
|
||||
<table border=1 cellpadding=3 width=400>
|
||||
<tr><td>Username:</td><td>${user_info.username} (User ID: ${user_info.user_id})</td></tr>
|
||||
<tr><td>SSID:</td><td>${user_info.ssid}</td></tr>`;
|
||||
if (user_info.account_users) {
|
||||
data += `<tr><td>Primary User:</td><td>${user_info.account_users['subscriber'].subscriber_username}</td></tr>`;
|
||||
}
|
||||
data += `
|
||||
<tr>
|
||||
<td border=0 colspan=2 align=right>
|
||||
<form action="wtv-admin:/removeuserpasswd" method="POST">
|
||||
<input type="hidden" name="username" value="${user_info.username}">
|
||||
<input type="hidden" name="confirm_remove" value="true">
|
||||
<input type="submit" value="Confirm Password Removal">
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
`
|
||||
data += `</table>`;
|
||||
} else if (show_cannot_modify_self) {
|
||||
data += `<strong>Cannot modify your account in this manner.<br>Try <a href="wtv-setup:/accounts">wtv-setup</a>.</strong><br><br>`;
|
||||
} else if (show_user_has_no_password) {
|
||||
data += `<strong>${user_info.username} has no password,<br>so there nothing to do.<br><br>`;
|
||||
} else {
|
||||
data += `<strong>Password removed from account "${user_info.username}"</strong><br><br>`;
|
||||
}
|
||||
}
|
||||
data += `
|
||||
<br>
|
||||
<br>
|
||||
<tr>
|
||||
</table>
|
||||
<p align="right">
|
||||
<a href="client:goback">Go Back</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
`;
|
||||
} else {
|
||||
var errpage = wtvshared.doErrorPage(401, "Please enter the administration password, you can leave the username blank.");
|
||||
headers = errpage[0];
|
||||
data = errpage[1];
|
||||
}
|
||||
} else {
|
||||
var errpage = wtvshared.doErrorPage(403, auth);
|
||||
headers = errpage[0];
|
||||
data = errpage[1];
|
||||
}
|
||||
108
zefie_wtvp_minisrv/ServiceVault/wtv-admin/unban.js
Normal file
108
zefie_wtvp_minisrv/ServiceVault/wtv-admin/unban.js
Normal file
@@ -0,0 +1,108 @@
|
||||
var minisrv_service_file = true;
|
||||
|
||||
var WTVAdmin = require(classPath + "/WTVAdmin.js");
|
||||
var wtva = new WTVAdmin(minisrv_config, session_data, service_name);
|
||||
var auth = wtva.isAuthorized();
|
||||
var ssids_removed = [];
|
||||
if (auth === true) {
|
||||
var password = null;
|
||||
if (request_headers.Authorization) {
|
||||
var authheader = request_headers.Authorization.split(' ');
|
||||
if (authheader[0] == "Basic") {
|
||||
password = Buffer.from(authheader[1], 'base64').toString();
|
||||
if (password) password = password.split(':')[1];
|
||||
}
|
||||
}
|
||||
if (wtva.checkPassword(password)) {
|
||||
if (request_headers.query.unban_ssid) {
|
||||
var config_changed = false;
|
||||
var fake_config = wtvshared.getUserConfig();
|
||||
if (!fake_config.config) fake_config.config = {};
|
||||
if (!fake_config.config.ssid_block_list) fake_config.config.ssid_block_list = [];
|
||||
if (typeof request_headers.query.unban_ssid === 'string') {
|
||||
Object.keys(fake_config.config.ssid_block_list).forEach(function (k) {
|
||||
if (fake_config.config.ssid_block_list[k] == request_headers.query.unban_ssid) {
|
||||
fake_config.config.ssid_block_list.splice(k, 1);
|
||||
ssids_removed.push(request_headers.query.unban_ssid)
|
||||
config_changed = true;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Object.keys(fake_config.config.ssid_block_list).forEach(function (k) {
|
||||
Object.keys(request_headers.query.unban_ssid).forEach(function (j) {
|
||||
if (fake_config.config.ssid_block_list[k] == request_headers.query.unban_ssid[j]) {
|
||||
fake_config.config.ssid_block_list.splice(k,1);
|
||||
ssids_removed.push(request_headers.query.unban_ssid[j])
|
||||
config_changed = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
if (config_changed) {
|
||||
wtvshared.writeToUserConfig(fake_config);
|
||||
minisrv_config = reloadConfig();
|
||||
}
|
||||
}
|
||||
headers = `200 OK
|
||||
Content-Type: text/html
|
||||
wtv-expire-all: wtv-admin:/unban`;
|
||||
if (request_headers.query.unban_ssid) {
|
||||
headers += "\nwtv-noback-all: wtv-admin:/unban";
|
||||
}
|
||||
data = `<html>
|
||||
<body>
|
||||
<display nosave nosend>
|
||||
<title>${minisrv_config.config.service_name} Admin Tricks</title>
|
||||
<sidebar width=20%>
|
||||
<img src="wtv-admin:/images/nuke_inverted.gif">
|
||||
</sidebar>
|
||||
<body bgcolor="#0a0a0a" text="#CC1111" link="#ff55ff" vlink="#ff55ff" vspace=0>
|
||||
<br>
|
||||
<br>
|
||||
<h1>${minisrv_config.config.service_name} Admin Tricks</h1>
|
||||
<br>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan=3 height=6>
|
||||
<h3>Unban an SSID</h3>`;
|
||||
if (minisrv_config.config.ssid_block_list) {
|
||||
if (minisrv_config.config.ssid_block_list.length > 0) {
|
||||
data += '<form action="wtv-admin:/unban" method="POST">';
|
||||
data += '<select name="unban_ssid" multiple size="8">';
|
||||
Object.keys(minisrv_config.config.ssid_block_list).forEach(function (k) {
|
||||
var ssid = minisrv_config.config.ssid_block_list[k];
|
||||
data += "<option value=\"" + ssid + "\">" + ssid + "</option>\n";
|
||||
});
|
||||
data += '</select><br><input type="submit" value="Unban SSID(s)"></form>';
|
||||
} else {
|
||||
data += "No SSIDs are in the ban list.<br><br>";
|
||||
}
|
||||
} else {
|
||||
data += "No SSIDs are in the ban list.<br><br>";
|
||||
}
|
||||
if (ssids_removed.length > 0) {
|
||||
if (config_changed) {
|
||||
data += "<strong>SSID(s) " + ssids_removed + " removed from the ban list.</strong><br><br>";
|
||||
}
|
||||
}
|
||||
data += `
|
||||
<br>
|
||||
<br>
|
||||
<tr>
|
||||
</table>
|
||||
<p align="right">
|
||||
<a href="client:goback">Go Back</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
`;
|
||||
} else {
|
||||
var errpage = wtvshared.doErrorPage(401, "Please enter the administration password, you can leave the username blank.");
|
||||
headers = errpage[0];
|
||||
data = errpage[1];
|
||||
}
|
||||
} else {
|
||||
var errpage = wtvshared.doErrorPage(403, auth);
|
||||
headers = errpage[0];
|
||||
data = errpage[1];
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
var minisrv_service_file = true;
|
||||
|
||||
headers = "200 OK";
|
||||
if (request_headers.query.nick) headers += "\n" + ssid_sessions[socket.ssid].setIRCNick(request_headers.query.nick);
|
||||
if (request_headers.query.nick) headers += "\n" + session_data.setIRCNick(request_headers.query.nick);
|
||||
headers += "\nContent-Type: text/html";
|
||||
|
||||
if (request_headers.query.host && request_headers.query.port && request_headers.query.channel) {
|
||||
|
||||
@@ -2,11 +2,11 @@ var minisrv_service_file = true;
|
||||
|
||||
var irc_nick = "";
|
||||
headers = "200 OK";
|
||||
if (request_headers.query.nick) headers += "\n" + ssid_sessions[socket.ssid].setIRCNick(request_headers.query.nick);
|
||||
else if (!ssid_sessions[socket.ssid].getSessionData("subscriber_irc_nick")) ssid_sessions[socket.ssid].getSessionData("subscriber_username") || ssid_sessions[socket.ssid].setIRCNick(minisrv_config.config.service_name + '_' + Math.floor(Math.random() * 100000)).substring(0, 16);
|
||||
if (request_headers.query.nick) headers += "\n" + session_data.setIRCNick(request_headers.query.nick);
|
||||
else if (!session_data.getSessionData("subscriber_irc_nick")) session_data.getSessionData("subscriber_username") || session_data.setIRCNick(minisrv_config.config.service_name + '_' + Math.floor(Math.random() * 100000)).substring(0, 16);
|
||||
headers += "\nContent-Type: text/html";
|
||||
|
||||
var irc_nick = ssid_sessions[socket.ssid].getSessionData("subscriber_irc_nick") || ssid_sessions[socket.ssid].getSessionData("subscriber_username");
|
||||
var irc_nick = session_data.getSessionData("subscriber_irc_nick") || session_data.getSessionData("subscriber_username");
|
||||
|
||||
data = `<html>
|
||||
<head>
|
||||
|
||||
@@ -2,8 +2,8 @@ var minisrv_service_file = true;
|
||||
|
||||
if (socket.ssid) {
|
||||
if (request_headers.post_data) {
|
||||
if (ssid_sessions[socket.ssid]) {
|
||||
ssid_sessions[socket.ssid].addCookie(request_headers.query.domain,request_headers.query.path,request_headers.query.expires,request_headers.query.cookie);
|
||||
if (session_data) {
|
||||
session_data.addCookie(request_headers.query.domain,request_headers.query.path,request_headers.query.expires,request_headers.query.cookie);
|
||||
headers = "200 OK\n";
|
||||
headers += "Content-Type: text/html";
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@ var minisrv_service_file = true;
|
||||
if (request_headers.post_data) {
|
||||
if (request_headers.query.domain && request_headers.query.path) {
|
||||
if (socket.ssid) {
|
||||
if (ssid_sessions[socket.ssid]) {
|
||||
data = ssid_sessions[socket.ssid].getCookieString(request_headers.query.domain, request_headers.query.path);
|
||||
if (session_data) {
|
||||
data = session_data.getCookieString(request_headers.query.domain, request_headers.query.path);
|
||||
headers = "200 OK\n";
|
||||
headers += "Content-Type: text/plain";
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
var minisrv_service_file = true;
|
||||
|
||||
if (socket.ssid) {
|
||||
if (ssid_sessions[socket.ssid]) {
|
||||
if (session_data) {
|
||||
|
||||
data = ssid_sessions[socket.ssid].listCookies();
|
||||
data = session_data.listCookies();
|
||||
headers = "200 OK\n";
|
||||
headers += "Content-Type: text/plain";
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
var minisrv_service_file = true;
|
||||
|
||||
if (socket.ssid) {
|
||||
if (ssid_sessions[socket.ssid]) {
|
||||
ssid_sessions[socket.ssid].resetCookies();
|
||||
if (session_data) {
|
||||
session_data.resetCookies();
|
||||
headers = "200 OK\n";
|
||||
headers += "Content-Type: text/html";
|
||||
data = `<html>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,115 @@
|
||||
<!--- *=* Copyright 1996, 1997 WebTV Networks, Inc. All rights reserved. --->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
Ambient Music
|
||||
</TITLE>
|
||||
<DISPLAY nologo hideoptions>
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#191919" TEXT="#42CC55" LINK="189CD6" VLINK="189CD6" HSPACE=0 VSPACE=0 FONTSIZE="large"
|
||||
>
|
||||
<table cellspacing=0 cellpadding=0>
|
||||
<tr>
|
||||
<td abswidth=24>
|
||||
<td abswidth=8>
|
||||
<td abswidth=108><img src="file://ROM/Cache/WebTVLogoJewel.gif" width=87 height=67>
|
||||
<td colspan=4 abswidth=360>
|
||||
<table cellspacing=0 cellpadding=0>
|
||||
<tr>
|
||||
<td valign=center absheight=80>
|
||||
<font size="+2" color="E7CE4A"><blackface><shadow>
|
||||
<img src=file://ROM/Images/Options/MusicalSymbol.gif> Ambient Music
|
||||
</table>
|
||||
<td abswidth=16>
|
||||
<TR>
|
||||
<td><spacer type=block WIDTH=1 HEIGHT=12>
|
||||
|
||||
<tr>
|
||||
<td><td>
|
||||
<td WIDTH=108 VALIGN=top ALIGN=left>
|
||||
<A HREF="backwaters.rmf" selected><BLACKFACE>Backwaters</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="byzantium-w-samples.rmf" selected><BLACKFACE>Byzantium Samples</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="byzantium.rmf" selected><BLACKFACE>Byzantium</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="cave-w-samples.rmf" selected><BLACKFACE>Cave Samples</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="cave.rmf" selected><BLACKFACE>Cave</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="chunnel.rmf" selected><BLACKFACE>Chunnel</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="cozy.rmf" selected><BLACKFACE>Cozy</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="moodrider-w-samples.rmf" selected><BLACKFACE>Moodrider Samples</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
|
||||
<TD WIDTH=16>
|
||||
|
||||
<TD WIDTH=108 VALIGN=top ALIGN=left>
|
||||
<A HREF="moodrider.rmf" selected><BLACKFACE>Moodrider</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="naugal.rmf" selected><BLACKFACE>Naugal</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="overmind-w-samples.rmf" selected><BLACKFACE>Overmind Samples</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="overmind.rmf" selected><BLACKFACE>Overmind</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="pacifica-w-samples.rmf" selected><BLACKFACE>Pacifica Samples</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="pacifica.rmf" selected><BLACKFACE>Pacifica</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="personal-twilight.rmf" selected><BLACKFACE>Personal Twilight</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="precipice.rmf" selected><BLACKFACE>Precipice</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
|
||||
<TD WIDTH=16>
|
||||
|
||||
<TD WIDTH=108 VALIGN=top ALIGN=left>
|
||||
<A HREF="shibuya-ku.rmf" selected><BLACKFACE>Shibuya</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="travelling-w-samples.rmf" selected><BLACKFACE>Travelling Samples</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="travelling.rmf" selected><BLACKFACE>Travelling</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="undersea-w-samples.rmf" selected><BLACKFACE>Undersea Samples</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="undersea.rmf" selected><BLACKFACE>Undersea</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="waitinggame.rmf" selected><BLACKFACE>Waiting Game</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
</TABLE>
|
||||
|
||||
<TABLE>
|
||||
<TD ABSWIDTH=400>
|
||||
<TD VALIGN=top ALIGN=right>
|
||||
<FORM action="client:goback">
|
||||
<FONT COLOR="#E7CE4A" SIZE=-1><SHADOW>
|
||||
<INPUT TYPE=SUBMIT BORDERIMAGE="file://ROM/Borders/ButtonBorder2.bif" VALUE=Done USESTYLE WIDTH=103>
|
||||
</SHADOW></FONT></FORM>
|
||||
<spacer type=block width=8 height=8>
|
||||
<TD>
|
||||
</TABLE>
|
||||
</BODY>
|
||||
</HTML>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,134 @@
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
Atmospheric Music
|
||||
</TITLE>
|
||||
<DISPLAY nologo hideoptions>
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#191919" TEXT="#42CC55" LINK="189CD6" VLINK="189CD6" HSPACE=0 VSPACE=0 FONTSIZE="large"
|
||||
>
|
||||
<table cellspacing=0 cellpadding=0>
|
||||
<tr>
|
||||
<td abswidth=24>
|
||||
<td abswidth=8>
|
||||
<td abswidth=108><img src="file://ROM/Cache/WebTVLogoJewel.gif" width=87 height=67>
|
||||
<td colspan=4 abswidth=360>
|
||||
<table cellspacing=0 cellpadding=0>
|
||||
<tr>
|
||||
<td valign=center absheight=80>
|
||||
<font size="+2" color="E7CE4A"><blackface><shadow>
|
||||
<img src=file://ROM/Images/Options/MusicalSymbol.gif> Atmospheric Music
|
||||
</table>
|
||||
<td abswidth=16>
|
||||
<TR>
|
||||
<td><spacer type=block WIDTH=1 HEIGHT=12>
|
||||
|
||||
<tr>
|
||||
<td><td>
|
||||
<td WIDTH=108 VALIGN=top ALIGN=left>
|
||||
<A HREF="7th-storey-traffic.rmf" selected><BLACKFACE>7th-storey-traffic.rmf</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Atmospheric Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="busy-bar.rmf" selected><BLACKFACE>busy-bar.rmf</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Atmospheric Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="forest-birds.rmf" selected><BLACKFACE>forest-birds.rmf</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Atmospheric Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="komputordome.rmf" selected><BLACKFACE>komputordome.rmf</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Atmospheric Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="lush-lagoon-big.rmf" selected><BLACKFACE>lush-lagoon-big.rmf</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Atmospheric Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="lush-lagoon.rmf" selected><BLACKFACE>lush-lagoon.rmf</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Atmospheric Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="modern-office.rmf" selected><BLACKFACE>modern-office.rmf</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Atmospheric Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="money.rmf" selected><BLACKFACE>money.rmf</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Atmospheric Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="mystical-cave-big.rmf" selected><BLACKFACE>mystical-cave-big.rmf</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Atmospheric Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="mystical-cave.rmf" selected><BLACKFACE>mystical-cave.rmf</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
|
||||
<TD WIDTH=16>
|
||||
|
||||
<TD WIDTH=108 VALIGN=top ALIGN=left>
|
||||
<A HREF="netherworld.rmf" selected><BLACKFACE>netherworld.rmf</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="night-factory-big.rmf" selected><BLACKFACE>night-factory-big.rmf</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="night-factory.rmf" selected><BLACKFACE>night-factory.rmf</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="night-forest-alt1.rmf" selected><BLACKFACE>night-forest-alt1.rmf</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="night-forest-alt2.rmf" selected><BLACKFACE>night-forest-alt2.rmf</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="night-forest-alt3.rmf" selected><BLACKFACE>night-forest-alt3.rmf</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="night-forest.rmf" selected><BLACKFACE>night-forest.rmf</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="rainforest-alt1.rmf" selected><BLACKFACE>rainforest-alt1.rmf</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
|
||||
<TD WIDTH=16>
|
||||
|
||||
<TD WIDTH=108 VALIGN=top ALIGN=left>
|
||||
<A HREF="rainforest-alt2.rmf" selected><BLACKFACE>rainforest-alt2.rmf</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="rainforest.rmf" selected><BLACKFACE>rainforest.rmf</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="spacecraft.rmf" selected><BLACKFACE>spacecraft.rmf</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="sports-alt.rmf" selected><BLACKFACE>sports-alt.rmf</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="sports.rmf" selected><BLACKFACE>sports.rmf</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="tarmac.rmf" selected><BLACKFACE>tarmac.rmf</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="thunderstorm.rmf" selected><BLACKFACE>thunderstorm.rmf</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="war-zone.rmf" selected><BLACKFACE>war-zone.rmf</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="wind.rmf" selected><BLACKFACE>wind.rmf</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="windchimes.rmf" selected><BLACKFACE>windchimes.rmf</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Ambient Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
|
||||
</TABLE>
|
||||
|
||||
<TABLE>
|
||||
<TD ABSWIDTH=400>
|
||||
<TD VALIGN=top ALIGN=right>
|
||||
<FORM action="client:goback">
|
||||
<FONT COLOR="#E7CE4A" SIZE=-1><SHADOW>
|
||||
<INPUT TYPE=SUBMIT BORDERIMAGE="file://ROM/Borders/ButtonBorder2.bif" VALUE=Done USESTYLE WIDTH=103>
|
||||
</SHADOW></FONT></FORM>
|
||||
<spacer type=block width=8 height=8>
|
||||
<TD>
|
||||
</TABLE>
|
||||
</BODY>
|
||||
</HTML>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,107 @@
|
||||
<!--- *=* Copyright 1996, 1997 WebTV Networks, Inc. All rights reserved. --->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
Classical Music
|
||||
</TITLE>
|
||||
<DISPLAY nologo hideoptions>
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#191919" TEXT="#42CC55" LINK="189CD6" VLINK="189CD6" HSPACE=0 VSPACE=0 FONTSIZE="large"
|
||||
>
|
||||
<table cellspacing=0 cellpadding=0>
|
||||
<tr>
|
||||
<td abswidth=24>
|
||||
<td abswidth=8>
|
||||
<td abswidth=108><img src="file://ROM/Cache/WebTVLogoJewel.gif" width=87 height=67>
|
||||
<td colspan=4 abswidth=360>
|
||||
<table cellspacing=0 cellpadding=0>
|
||||
<tr>
|
||||
<td valign=center absheight=80>
|
||||
<font size="+2" color="E7CE4A"><blackface><shadow>
|
||||
<img src=file://ROM/Images/Options/MusicalSymbol.gif> Classical Music
|
||||
</table>
|
||||
<td abswidth=16>
|
||||
<TR>
|
||||
<td><spacer type=block WIDTH=1 HEIGHT=12>
|
||||
|
||||
<tr>
|
||||
<td><td>
|
||||
<td WIDTH=108 VALIGN=top ALIGN=left>
|
||||
<A HREF="bach-air.rmf" selected><BLACKFACE>bach-air</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Classical Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="bach-prelude-1.rmf" selected><BLACKFACE>bach-prelude-1</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Classical Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="brahms-rhapsody.rmf" selected><BLACKFACE>brahms-rhapsody</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Classical Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="chopin-ballade-1.rmf" selected><BLACKFACE>chopin-ballade-1</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Classical Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="chopin-ballade-2.rmf" selected><BLACKFACE>chopin-ballade-2</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Classical Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="chopin-nocturne.rmf" selected><BLACKFACE>chopin-nocturne</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Classical Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
|
||||
<TD WIDTH=16>
|
||||
|
||||
<TD WIDTH=108 VALIGN=top ALIGN=left>
|
||||
<A HREF="la-barriera-w-samples.rmf" selected><BLACKFACE>la-barriera-w-samples</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Classical Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="lvb-moonlight.rmf" selected><BLACKFACE>lvb-moonlight</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Classical Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="lvb-ode-to-joy.rmf" selected><BLACKFACE>lvb-ode-to-joy</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Classical Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="lvb-scherzo9th.rmf" selected><BLACKFACE>lvb-scherzo9th</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Classical Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="mendelssohn-prelude.rmf" selected><BLACKFACE>mendelssohn-prelude</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Classical Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="mm-promenade.rmf" selected><BLACKFACE>mm-promenade</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Classical Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
|
||||
<TD WIDTH=16>
|
||||
|
||||
<TD WIDTH=108 VALIGN=top ALIGN=left>
|
||||
<A HREF="mouret-rondeau.rmf" selected><BLACKFACE>mouret-rondeau</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Classical Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="mozart-symphony40.rmf" selected><BLACKFACE>mozart-symphony40</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Classical Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="nrk-bumblebee.rmf" selected><BLACKFACE>nrk-bumblebee</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Classical Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="purcell-voluntary.rmf" selected><BLACKFACE>purcell-voluntary</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Classical Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="schubert-ave-maria.rmf" selected><BLACKFACE>schubert-ave-maria</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Classical Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
<A HREF="smetana-moldau.rmf" selected><BLACKFACE>smetana-moldau</BLACKFACE></A><BR>
|
||||
<FONT SIZE="-1">Classical Music</FONT><BR>
|
||||
<spacer type=block WIDTH=1 HEIGHT=12><BR>
|
||||
|
||||
|
||||
</TABLE>
|
||||
|
||||
<TABLE>
|
||||
<TD ABSWIDTH=400>
|
||||
<TD VALIGN=top ALIGN=right>
|
||||
<FORM action="client:goback">
|
||||
<FONT COLOR="#E7CE4A" SIZE=-1><SHADOW>
|
||||
<INPUT TYPE=SUBMIT BORDERIMAGE="file://ROM/Borders/ButtonBorder2.bif" VALUE=Done USESTYLE WIDTH=103>
|
||||
</SHADOW></FONT></FORM>
|
||||
<spacer type=block width=8 height=8>
|
||||
<TD>
|
||||
</TABLE>
|
||||
</BODY>
|
||||
</HTML>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user