v0.9.56
- Small update for CGI Security - Various AI suggested fixes - Fix to logging verbosity - Fixes for Last-Modified headers - Removed 2 unused node module deps - Added pc-only user_config.json example - Initial work updating catchall system to support CGI - Reverted registration and home theme system due to problems
4
.gitignore
vendored
@@ -372,3 +372,7 @@ FodyWeavers.xsd
|
||||
!/zefie_wtvp_minisrv/PageBuilderVault/http_pb/clipart
|
||||
!*.gitkeep
|
||||
/user_config.json
|
||||
|
||||
# CodeQL
|
||||
codeql-custom-queries-javascript/
|
||||
codeql/
|
||||
|
||||
@@ -321,6 +321,14 @@ var runScriptInVM = function (script_data, user_contextObj = {}, privileged = fa
|
||||
|
||||
async function handleCGI(executable, cgi_file, socket, request_headers, vault, service_name, session_data = null, extra_path = "")
|
||||
{
|
||||
const SAFE_ROOT = path.resolve(__dirname);
|
||||
vault = path.resolve(vault);
|
||||
if (!vault.startsWith(SAFE_ROOT)) {
|
||||
console.error("Invalid vault path:", vault);
|
||||
var errpage = wtvshared.doErrorPage(403);
|
||||
sendToClient(socket, errpage[0], errpage[1]);
|
||||
return;
|
||||
}
|
||||
var env = wtvshared.cloneObj(process.env);
|
||||
env.QUERY_STRING = "";
|
||||
var request_data = new Array();
|
||||
@@ -591,7 +599,7 @@ async function processPath(socket, service_vault_file_path, request_headers = ne
|
||||
})
|
||||
|
||||
if (request_is_async && !minisrv_config.config.debug_flags.quiet) console.debug(" * Script requested Asynchronous mode");
|
||||
} else if (fs.existsSync(service_vault_file_path + ".php") || (service_vault_file_path.indexOf(".php") == service_vault_file_path.length - 4 && fs.existsSync(service_vault_file_path)) || fs.existsSync(service_vault_file_path + ".php")) {
|
||||
} else if (fs.existsSync(service_vault_file_path + ".php") || (service_vault_file_path.endsWith(".php") && fs.existsSync(service_vault_file_path)) || service_vault_file_path.indexOf(".php") > 0) {
|
||||
request_is_async = true;
|
||||
if (minisrv_config.config.php_enabled && minisrv_config.config.php_binpath) {
|
||||
if (fs.existsSync(service_vault_file_path + ".php") || fs.existsSync(service_vault_file_path)) {
|
||||
@@ -618,7 +626,7 @@ async function processPath(socket, service_vault_file_path, request_headers = ne
|
||||
sendToClient(socket, errpage[0], errpage[1]);
|
||||
return;
|
||||
}
|
||||
} else if (fs.existsSync(service_vault_file_path + ".cgi") || (service_vault_file_path.indexOf(".cgi") == service_vault_file_path.length - 4 && fs.existsSync(service_vault_file_path)) || fs.existsSync(service_vault_file_path + ".cgi")) {
|
||||
} else if (fs.existsSync(service_vault_file_path + ".cgi") || (service_vault_file_path.endsWith(".cgi") && fs.existsSync(service_vault_file_path)) || service_vault_file_path.indexOf(".cgi") > 0) {
|
||||
request_is_async = true;
|
||||
if (minisrv_config.config.php_enabled && minisrv_config.config.php_binpath) {
|
||||
if (fs.existsSync(service_vault_file_path + ".cgi") || fs.existsSync(service_vault_file_path)) {
|
||||
@@ -730,11 +738,10 @@ async function processPath(socket, service_vault_file_path, request_headers = ne
|
||||
sendRawFile(socket, service_vault_file_path);
|
||||
}
|
||||
} else {
|
||||
// look for a catchallin the current path and all parent paths up until the service root
|
||||
if (minisrv_config.config.catchall_file_name) {
|
||||
var minisrv_catchall_file_name = null;
|
||||
if (minisrv_config.services[service_name]) minisrv_catchall_file_name = minisrv_config.services[service_name].catchall_file_name || minisrv_config.config.catchall_file_name || null;
|
||||
else minisrv_catchall_file_name = minisrv_config.config.catchall_file_name || null;
|
||||
// look for a catchall in the current path and all parent paths up until the service root
|
||||
var service_config = minisrv_config.services[service_name] || {};
|
||||
if (minisrv_config.config.catchall_file_name || service_config['catchall_file_name']) {
|
||||
var minisrv_catchall_file_name = service_config['catchall_file_name'] || minisrv_config.config.catchall_file_name || null;
|
||||
if (minisrv_catchall_file_name) {
|
||||
var service_check_dir = service_vault_file_path.split(path.sep);
|
||||
service_check_dir.pop(); // pop filename
|
||||
@@ -742,21 +749,48 @@ async function processPath(socket, service_vault_file_path, request_headers = ne
|
||||
while (service_check_dir.join(path.sep) != service_vault_dir && service_check_dir.length > 0) {
|
||||
var catchall_file = service_check_dir.join(path.sep) + path.sep + minisrv_catchall_file_name;
|
||||
if (fs.existsSync(catchall_file)) {
|
||||
|
||||
service_vault_found = true;
|
||||
if (!minisrv_config.config.debug_flags.quiet) console.debug(" * Found catchall at " + catchall_file + " to handle request (JS Interpreter Mode) [Socket " + socket.id + "]");
|
||||
request_headers.service_file_path = catchall_file;
|
||||
var script_data = fs.readFileSync(catchall_file).toString();
|
||||
if (catchall_file.endsWith(".js")) {
|
||||
var script_data = fs.readFileSync(catchall_file).toString();
|
||||
|
||||
var vmResults = runScriptInVM(script_data, contextObj, privileged, catchall_file);
|
||||
var vmResults = runScriptInVM(script_data, contextObj, privileged, catchall_file);
|
||||
|
||||
updateFromVM.forEach((item) => {
|
||||
// Here we read back certain data from the ServiceVault Script Context Object
|
||||
try {
|
||||
if (typeof vmResults[item[1]] !== "undefined") eval(item[0] + ' = vmResults["' + item[1] + '"]');
|
||||
} catch (e) {
|
||||
console.error("vm readback error", e);
|
||||
updateFromVM.forEach((item) => {
|
||||
// Here we read back certain data from the ServiceVault Script Context Object
|
||||
try {
|
||||
if (typeof vmResults[item[1]] !== "undefined") eval(item[0] + ' = vmResults["' + item[1] + '"]');
|
||||
} catch (e) {
|
||||
console.error("vm readback error", e);
|
||||
}
|
||||
});
|
||||
} else if (catchall_file.endsWith(".php")) {
|
||||
if (minisrv_config.config.php_enabled && minisrv_config.config.php_binpath) {
|
||||
request_is_async = true;
|
||||
var extra_path = service_check_dir.join(path.sep) + path.sep + request_headers.request_url.replace(service_name + ":/", "");
|
||||
if (!minisrv_config.config.debug_flags.quiet) console.debug(" * Found catchall at " + catchall_file + " to handle request (CGI Interpreter Mode) [Socket " + socket.id + "]");
|
||||
handlePHP(socket, request_headers, catchall_file, service_vault_dir + path.sep + service_name, (pc_services) ? pc_service_name : service_name, (pc_services) ? null : ssid_sessions[socket.ssid], extra_path)
|
||||
} else {
|
||||
// php is not enabled, don't expose source code
|
||||
var errpage = wtvshared.doErrorPage(403);
|
||||
sendToClient(socket, errpage[0], errpage[1]);
|
||||
return;
|
||||
}
|
||||
});
|
||||
} else if (catchall_file.endsWith(".cgi")) {
|
||||
if (minisrv_config.config.cgi_enabled) {
|
||||
request_is_async = true;
|
||||
var extra_path = service_check_dir.join(path.sep) + path.sep + request_headers.request_url.replace(service_name + ":/", "");
|
||||
if (!minisrv_config.config.debug_flags.quiet) console.debug(" * Found catchall at " + catchall_file + " to handle request (CGI Interpreter Mode) [Socket " + socket.id + "]");
|
||||
handleCGI(catchall_file, catchall_file, socket, request_headers, service_vault_dir + path.sep + service_name, (pc_services) ? pc_service_name : service_name, (pc_services) ? null : ssid_sessions[socket.ssid], extra_path)
|
||||
} else {
|
||||
// cgi is not enabled, don't expose source code
|
||||
var errpage = wtvshared.doErrorPage(403);
|
||||
sendToClient(socket, errpage[0], errpage[1]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (request_is_async && !minisrv_config.config.debug_flags.quiet) console.debug(" * Script requested Asynchronous mode");
|
||||
break;
|
||||
@@ -1333,7 +1367,7 @@ function headerStringToObj(headers, response = false) {
|
||||
async function sendToClient(socket, headers_obj, data = null) {
|
||||
var headers = "";
|
||||
var content_length = 0;
|
||||
var end_of_line = "\n";
|
||||
var eol = "\n";
|
||||
if (typeof (data) === 'undefined' || data === null) data = '';
|
||||
if (typeof (headers_obj) === 'string') {
|
||||
// string to header object
|
||||
@@ -1398,16 +1432,23 @@ async function sendToClient(socket, headers_obj, data = null) {
|
||||
if (socket_sessions[socket.id]) {
|
||||
if (socket_sessions[socket.id].request_headers) {
|
||||
if (socket_sessions[socket.id].request_headers.service_file_path) {
|
||||
if (wtvshared.getFileExt(socket_sessions[socket.id].request_headers.service_file_path).toLowerCase() !== "js" || socket_sessions[socket.id].request_headers.raw_file === true) {
|
||||
var last_modified = wtvshared.getFileLastModifiedUTCString(socket_sessions[socket.id].request_headers.service_file_path);
|
||||
if (last_modified) headers_obj["Last-Modified"] = last_modified;
|
||||
// Don't change Last-modified header if provided already
|
||||
if (!headers['Last-Modified']) {
|
||||
// Only add the header if not a js, php, or cgi file
|
||||
if (wtvshared.getFileExt(socket_sessions[socket.id].request_headers.service_file_path).toLowerCase() !== "js" ||
|
||||
wtvshared.getFileExt(socket_sessions[socket.id].request_headers.service_file_path).toLowerCase() !== "php" ||
|
||||
wtvshared.getFileExt(socket_sessions[socket.id].request_headers.service_file_path).toLowerCase() !== "cgi" ||
|
||||
socket_sessions[socket.id].request_headers.raw_file === true) {
|
||||
var last_modified = wtvshared.getFileLastModifiedUTCString(socket_sessions[socket.id].request_headers.service_file_path);
|
||||
if (last_modified) headers_obj["Last-Modified"] = last_modified;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// if box can do compression, see if its worth enabling
|
||||
// if client can do compression, see if its worth enabling
|
||||
// small files actually get larger, so don't compress them
|
||||
var compression_type = 0;
|
||||
if (content_length >= 256) compression_type = wtvmime.shouldWeCompress(ssid_sessions[socket.ssid], headers_obj);
|
||||
@@ -1428,7 +1469,7 @@ async function sendToClient(socket, headers_obj, data = null) {
|
||||
}
|
||||
|
||||
if (socket.res) { // pc mode with response object available
|
||||
if (compression_type == 1) compression_type = 2; // just in case
|
||||
if (compression_type == 1) compression_type = 2; // wtv-lzpf not supported in pc mode
|
||||
}
|
||||
|
||||
// compress if needed
|
||||
@@ -1497,7 +1538,6 @@ async function sendToClient(socket, headers_obj, data = null) {
|
||||
if (headers_obj["minisrv-force-content-length"]) {
|
||||
headers_obj["Content-length"] = headers_obj["minisrv-force-content-length"];
|
||||
delete headers_obj["minisrv-force-content-length"];
|
||||
|
||||
}
|
||||
|
||||
if (!socket.res) {
|
||||
@@ -1525,25 +1565,27 @@ async function sendToClient(socket, headers_obj, data = null) {
|
||||
var xpower = wtvshared.getCaseInsensitiveKey("x-powered-by", headers_obj);
|
||||
if (!xpower) {
|
||||
// add X-Powered-By header if not WebTV and not already set
|
||||
if (!socket.ssid) headers_obj['X-Powered-By'] = "NodeJS ("+process.version+") Express via " + z_title;
|
||||
xpower = 'X-Powered-By';
|
||||
if (!socket.ssid) headers_obj[xpower] = "NodeJS ("+process.version+") Express via " + z_title;
|
||||
} else {
|
||||
// delete if webtv
|
||||
if (socket.ssid) delete headers_obj[xpower];
|
||||
}
|
||||
headers_obj = wtvshared.moveObjectKey("x-powered-by", -2, headers_obj, true) // move x-powered-by before Content-type
|
||||
|
||||
if (headers_obj[xpower]) headers_obj = wtvshared.moveObjectKey(xpower, -2, headers_obj, true) // move x-powered-by before Content-type
|
||||
|
||||
if (!socket.res) {
|
||||
// header object to string
|
||||
if (minisrv_config.config.debug_flags.show_headers) console.debug(" * Outgoing headers on socket ID", socket.id, headers_obj);
|
||||
Object.keys(headers_obj).forEach(function (k) {
|
||||
if (k == "Status") {
|
||||
headers += headers_obj[k] + end_of_line;
|
||||
headers += headers_obj[k] + eol;
|
||||
} else {
|
||||
if (k.indexOf('_') >= 0) {
|
||||
var j = k.split('_')[0];
|
||||
headers += j + ": " + headers_obj[k] + end_of_line;
|
||||
headers += j + ": " + headers_obj[k] + eol;
|
||||
} else {
|
||||
headers += k + ": " + headers_obj[k] + end_of_line;
|
||||
headers += k + ": " + headers_obj[k] + eol;
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -1554,29 +1596,37 @@ async function sendToClient(socket, headers_obj, data = null) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Delete any other stray minisrv headers (we process them all before this)
|
||||
Object.keys(headers_obj).forEach(function (k) {
|
||||
if (k.indexOf("minisrv-") == 0) {
|
||||
delete headers_obj[k];
|
||||
}
|
||||
});
|
||||
|
||||
// send to client
|
||||
if (socket.res) {
|
||||
var resCode = parseInt(headers_obj.Status.substr(0, 3));
|
||||
socket.res.writeHead(resCode, headers_obj);
|
||||
socket.res.end(data);
|
||||
if (minisrv_config.config.debug_flags.show_headers) console.debug(" * Outgoing PC headers on " + socket.service_name + " socket ID", socket.id, headers_obj);
|
||||
if (minisrv_config.config.debug_flags.quiet) console.debug(" * Sent response " + headers_obj.status + " to PC client (Content-Type:", headers_obj['Content-Type'], "~", headers_obj['Content-length'], "bytes)");
|
||||
if (minisrv_config.config.debug_flags.quiet) console.debug(" * Sent response " + headers_obj.Status + " to PC client (Content-Type:", headers_obj['Content-type'], "~", headers_obj['Content-length'], "bytes)");
|
||||
} else {
|
||||
var toClient = null;
|
||||
if (typeof data == 'string') {
|
||||
toClient = headers + end_of_line + data;
|
||||
toClient = headers + eol + data;
|
||||
sendToSocket(socket, Buffer.from(toClient));
|
||||
} else if (typeof data == 'object') {
|
||||
if (minisrv_config.config.debug_flags.quiet) var verbosity_mod = (headers_obj["wtv-encrypted"] == 'true') ? " encrypted response" : "";
|
||||
if (socket_sessions[socket.id].secure_headers == true) {
|
||||
// encrypt headers
|
||||
if (minisrv_config.config.debug_flags.quiet) verbosity_mod += " with encrypted headers";
|
||||
var enc_headers = socket_sessions[socket.id].wtvsec.Encrypt(1, headers + end_of_line);
|
||||
var enc_headers = socket_sessions[socket.id].wtvsec.Encrypt(1, headers + eol);
|
||||
sendToSocket(socket, new Buffer.from(concatArrayBuffer(enc_headers, data)));
|
||||
} else {
|
||||
sendToSocket(socket, new Buffer.from(concatArrayBuffer(Buffer.from(headers + end_of_line), data)));
|
||||
sendToSocket(socket, new Buffer.from(concatArrayBuffer(Buffer.from(headers + eol), data)));
|
||||
}
|
||||
if (minisrv_config.config.debug_flags.quiet) console.debug(" * Sent" + verbosity_mod + " " + headers_obj.status + " to client (Content-Type:", headers_obj['Content-Type'], "~", headers_obj['Content-length'], "bytes)");
|
||||
if (minisrv_config.config.debug_flags.quiet) console.debug(" * Sent" + verbosity_mod + " " + headers_obj.Status + " to client (Content-Type:", headers_obj['Content-type'], "~", headers_obj['Content-length'], "bytes)");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2425,11 +2475,17 @@ Content-type: text/html`;
|
||||
});
|
||||
request_headers.query = req.query;
|
||||
if (req.body) {
|
||||
var data = "";
|
||||
for (var i=0; i<req.body.length; i++) {
|
||||
data += String.fromCharCode(req.body[i]);
|
||||
if (typeof(req.body) == "string") {
|
||||
request_headers.post_data = req.body;
|
||||
} else if (req.body.length) {
|
||||
var data = "";
|
||||
for (var i=0; i<req.body.length; i++) {
|
||||
data += String.fromCharCode(req.body[i]);
|
||||
}
|
||||
request_headers.post_data = data;
|
||||
} else {
|
||||
request_headers.post_data = "";
|
||||
}
|
||||
request_headers.post_data = data;
|
||||
} else {
|
||||
request_headers.post_data = "";
|
||||
}
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
IMAGE /ROMCache/Themes/Images/ButtonBorder10.gif
|
||||
INNERBOUNDS 22, 14, 35, 22
|
||||
PADBOUNDS 14, 9, 16, 6
|
||||
DRAWCENTER
|
||||
SCALEEDGES
|
||||
@@ -1,5 +0,0 @@
|
||||
IMAGE /ROMCache/Themes/Images/ButtonBorder3.gif
|
||||
INNERBOUNDS 22, 14, 35, 22
|
||||
PADBOUNDS 14, 9, 16, 6
|
||||
DRAWCENTER
|
||||
SCALEEDGES
|
||||
@@ -1,5 +0,0 @@
|
||||
IMAGE /ROMCache/Themes/Images/ButtonBorder2.gif
|
||||
INNERBOUNDS 22, 14, 35, 22
|
||||
PADBOUNDS 14, 9, 16, 6
|
||||
DRAWCENTER
|
||||
SCALEEDGES
|
||||
@@ -1,5 +0,0 @@
|
||||
IMAGE /ROMCache/Themes/Images/ButtonBorder4.gif
|
||||
INNERBOUNDS 22, 14, 35, 22
|
||||
PADBOUNDS 14, 9, 16, 6
|
||||
DRAWCENTER
|
||||
SCALEEDGES
|
||||
@@ -1,5 +0,0 @@
|
||||
IMAGE /ROMCache/Themes/Images/ButtonBorder5.gif
|
||||
INNERBOUNDS 22, 14, 35, 22
|
||||
PADBOUNDS 14, 9, 16, 6
|
||||
DRAWCENTER
|
||||
SCALEEDGES
|
||||
@@ -1,5 +0,0 @@
|
||||
IMAGE /ROMCache/Themes/Images/ButtonBorder6.gif
|
||||
INNERBOUNDS 22, 14, 35, 22
|
||||
PADBOUNDS 14, 9, 16, 6
|
||||
DRAWCENTER
|
||||
SCALEEDGES
|
||||
@@ -1,5 +0,0 @@
|
||||
IMAGE /ROMCache/Themes/Images/ButtonBorder7.gif
|
||||
INNERBOUNDS 22, 14, 35, 22
|
||||
PADBOUNDS 14, 9, 16, 6
|
||||
DRAWCENTER
|
||||
SCALEEDGES
|
||||
@@ -1,5 +0,0 @@
|
||||
IMAGE /ROMCache/Themes/Images/ButtonBorder8.gif
|
||||
INNERBOUNDS 22, 14, 35, 22
|
||||
PADBOUNDS 14, 9, 16, 6
|
||||
DRAWCENTER
|
||||
SCALEEDGES
|
||||
@@ -1,5 +0,0 @@
|
||||
IMAGE /ROMCache/Themes/Images/ButtonBorder9.gif
|
||||
INNERBOUNDS 22, 14, 35, 22
|
||||
PADBOUNDS 14, 9, 16, 6
|
||||
DRAWCENTER
|
||||
SCALEEDGES
|
||||
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 668 B |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 987 B |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 175 B |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 346 B |
|
Before Width: | Height: | Size: 84 B |
|
Before Width: | Height: | Size: 297 B |
|
Before Width: | Height: | Size: 278 B |
|
Before Width: | Height: | Size: 69 B |
|
Before Width: | Height: | Size: 261 B |
|
Before Width: | Height: | Size: 6.5 KiB |
@@ -1,246 +0,0 @@
|
||||
if(!String.prototype.replace){String.prototype.replace=function(o,n){return this.split(o).join(n)}}
|
||||
if(!String.prototype.repeat){String.prototype.repeat=function(c){o='';for(i=0;i<c;i++){o+=this;}return o;}}
|
||||
|
||||
d=document
|
||||
rom='file://rom/'
|
||||
rmb=rom+'Borders/'
|
||||
htm=rom+'HTMLs/'
|
||||
cch=rom+'Cache/'
|
||||
|
||||
rch='/ROMCache/'
|
||||
thm=rch+'Themes/'
|
||||
thi=thm+'Images/'
|
||||
thb=rom+'Borders/'
|
||||
|
||||
th=0
|
||||
|
||||
function clientvers(){d.write('<form name=z2><input type=hidden name=v value=&wtv-appvers;></form>');return parseInt(d.z2.v.value)}
|
||||
function go(u){location.href=u;d.open('text/url');d.write(u);d.close();}
|
||||
function dial(){go('client:redialphone');go('client:logoshown')}
|
||||
function nbsp(c){nout='';for(i=0;i<c;i++){nout+=' '}return nout}
|
||||
function gTC(type,itm){
|
||||
//light
|
||||
bgclr='4c5a67'
|
||||
bgimg='Pattern.gif'
|
||||
shimg='ShadowLogo.gif'
|
||||
gclr=''
|
||||
bclr='e7ce4a'
|
||||
tclr='cbcbcb'
|
||||
vclr='dddddd'
|
||||
lclr='dddddd'
|
||||
if(!itm&&itm!=0){itm=th}
|
||||
switch(itm){
|
||||
case 1://dark
|
||||
bgclr='191919'
|
||||
tclr='42bd52'
|
||||
bbif = rmb+'ButtonBorder2'
|
||||
break
|
||||
case 2://red
|
||||
bgclr='6e0005'
|
||||
tclr='f0f0f0'
|
||||
bclr='f0f0f0'
|
||||
bbif = thb+'ButtonBorder2'
|
||||
break
|
||||
case 3://basic
|
||||
bgclr='cccccc'
|
||||
tclr='000000'
|
||||
lclr='2a2aae'
|
||||
vclr='962ab5'
|
||||
bbif=''
|
||||
break
|
||||
case 4://tan
|
||||
bgclr='ece9d8'
|
||||
bgimg='xpbg.gif'
|
||||
tclr='000000'
|
||||
lclr='002244'
|
||||
vclr='002244'
|
||||
bclr='000000'
|
||||
shimg='ShadowLogo4.gif'
|
||||
break
|
||||
case 5://green
|
||||
bgclr='004422'
|
||||
tclr='f0f0f0'
|
||||
bbif = thb+'ButtonBorder2'
|
||||
break
|
||||
case 6://blue
|
||||
bgclr='002244'
|
||||
tclr='f0f0f0'
|
||||
lclr='0080ff'
|
||||
vclr='0080ff'
|
||||
shimg=''
|
||||
gclr='004488'
|
||||
bbif = thb+'ButtonBorder2'
|
||||
break
|
||||
case 7://teal
|
||||
bgclr='008080'
|
||||
bgimg='9xbg.gif'
|
||||
tclr='f0f0f0'
|
||||
bclr='080808'
|
||||
break
|
||||
case 8://purple
|
||||
bgclr='4a2766'
|
||||
lclr='aaaaaa'
|
||||
shimg='ShadowLogo8.gif'
|
||||
bbif = thb+'ButtonBorder2'
|
||||
break
|
||||
case 9://brown
|
||||
bgclr='442200'
|
||||
tclr='e7ce4a'
|
||||
bbif = thb+'ButtonBorder2'
|
||||
break
|
||||
case 10://white
|
||||
bgclr='c9c9c9'
|
||||
bgimg='Paper.jpg'
|
||||
tclr='020202'
|
||||
lclr='002244'
|
||||
vclr='002244'
|
||||
bclr='000000'
|
||||
break
|
||||
case 11://halloween
|
||||
bgclr='080808'
|
||||
tclr='c06000'
|
||||
bbif = thb+'ButtonBorder2'
|
||||
break
|
||||
}switch(type){
|
||||
case 'bg':return bgclr
|
||||
case 'bgimg':return bgimg
|
||||
case 'shimg':return shimg
|
||||
case 'bbif':return bbif
|
||||
case 'g':return gclr
|
||||
case 'b':return bclr
|
||||
case 'l':return lclr
|
||||
case 't':return tclr
|
||||
case 'v':return vclr
|
||||
}
|
||||
}
|
||||
function headr(msg,fs,bgm,lp,nl,logo){
|
||||
th=gV(0)
|
||||
if(!logo){logo=rch+'WebTVLogoJewel.gif'}
|
||||
out=''
|
||||
switch(fs){
|
||||
case 'small':fsn=7
|
||||
break
|
||||
case 'large':fsn=4
|
||||
break
|
||||
default:fs='medium'
|
||||
fsn=5
|
||||
break
|
||||
}
|
||||
bgimg=gTC('bgimg')
|
||||
shimg=gTC('shimg')
|
||||
bgclr=gTC('bg')
|
||||
gclr=gTC('g')
|
||||
tclr=gTC('t')
|
||||
vclr=gTC('v')
|
||||
lclr=gTC('l')
|
||||
if(msg){out+='<title>'+msg+'</title>'}
|
||||
out+='<body background='+thi+bgimg+' text='+tclr+' bgcolor='+bgclr+' vlink='+vclr+' link='+lclr+' hspace=0 vspace=0 fontsize='+fs+'>'
|
||||
if(bgm){
|
||||
if(bgm.indexOf('.')<0){bgm += '.mid'}
|
||||
if(bgm.indexOf('/')<0){bgm = cch+'Music/' + bgm}
|
||||
out+='<embed name=ebgm src="'+bgm+'" autostart=true'
|
||||
if(!lp){out+='>'}
|
||||
else{
|
||||
if(lp==-1){lp=9999}
|
||||
out+=(' loop='+lp+'>')
|
||||
}
|
||||
d.write('</embed>')
|
||||
}
|
||||
if(!msg){msg=''}
|
||||
out+='<table cellspacing=0 cellpadding=0 abswidth=560 absheight=69'
|
||||
if(gclr){out+=' bgcolor='+gclr+' gradcolor='+bgclr}
|
||||
if(!shimg && bgimg=='Pattern.gif'){out+=' background='+thi+bgimg}
|
||||
out+='><tr><td>'
|
||||
out+=tab();
|
||||
out+='<spacer type=block width=11 height=11><br><spacer type=block width=10 height=1>'
|
||||
if(!nl){out+='<a href="javascript:goHTV()">'}
|
||||
out+='<img src='+logo+' width=90 height=69>'
|
||||
if(!nl){out+='</a>'}
|
||||
out+=tab(msg);
|
||||
out+='</td></tr></table>'
|
||||
return out;
|
||||
}
|
||||
function tab(msg){
|
||||
bgimg=gTC('bgimg')
|
||||
shimg=gTC('shimg')
|
||||
bgclr=gTC('bg')
|
||||
gclr=gTC('g')
|
||||
if(msg){
|
||||
msg=msg.replace(' ',' ')
|
||||
if(!shimg && bgimg=='Pattern.gif'){msg += nbsp(5)}
|
||||
tout='<td width=100% height=69 valign=top'
|
||||
if(shimg){tout+=' background='+thi+shimg+' novtilebg'}
|
||||
tout+='><td abswidth=460 height=69 valign=top'
|
||||
if(shimg){tout+=' background='+thi+shimg+' novtilebg'}
|
||||
tout+=' align=right><spacer height=32 type=block><strong><shadow><font color=cbcbcb size=+1>'+msg+' </font></shadow></strong>'
|
||||
}else{
|
||||
tout='<td width=100% height=69 valign=top align=left'
|
||||
if(shimg){tout+=' background='+thi+shimg}
|
||||
if(gclr){tout+=' bgcolor='+gclr+' gradcolor='+bgclr}
|
||||
tout+=' novtilebg>'
|
||||
}
|
||||
return tout
|
||||
}
|
||||
function ta(r,s,n,b,c,x,u){
|
||||
bgclr=gTC('bg')
|
||||
tclr=gTC('t')
|
||||
if(u){x+=' usestyle';d.write('<font color='+tclr+'>')}
|
||||
d.write('<textarea rows='+r+' size='+s+' id='+n+' name='+n+' border='+b+' text='+tclr+' bgcolor='+bgclr+' '+x+'>'+c+'</textarea>');
|
||||
if(u){d.write('</font>')}
|
||||
}
|
||||
|
||||
function as(bg,h,w,g,b,lc,rc,lo,ro,s){
|
||||
if(s){
|
||||
if(!lc){lc=gTC('t')}
|
||||
if(!rc){rc=gTC('bg')}
|
||||
}else{
|
||||
if(!lc){lc=gTC('bg')}
|
||||
if(!rc){rc=gTC('t')}
|
||||
}
|
||||
if(th==1){bgclr='333333'}
|
||||
if(!bg){bg='191919'}
|
||||
if(!h){h=32}
|
||||
if(!w){w=320}
|
||||
if(!g){g=0}
|
||||
if(!lo){lo=0}
|
||||
if(!ro){ro=0}
|
||||
if(!b){b=1}
|
||||
d.write('<audioscope bgcolor='+bg+' height='+h+' width='+w+' gain='+g+' leftcolor='+tclr+' rightcolor='+bgclr+' leftoffset='+lo+' rightoffset='+ro+' border='+b+'>')
|
||||
}
|
||||
function butt(v,n,w,t,x){
|
||||
if(th>0&&th!=4&&th!=7&&th!=10){sh=true}
|
||||
bclr=gTC('b')
|
||||
bbif=gTC('bbif')
|
||||
if(sh){d.write('<shadow>')}
|
||||
d.write('<font color='+bclr+'>')
|
||||
if(!t)t='submit'
|
||||
d.write('<input type='+t+' value="'+v+'"')
|
||||
if(n)d.write(' name='+n)
|
||||
if(w)d.write(' width='+w)
|
||||
if(x)d.write(' '+x)
|
||||
if(bbif){d.write(' usestyle borderimage='+bbif+'.bif')}
|
||||
d.write('></font>')
|
||||
if(sh){d.write('</shadow>')}
|
||||
}
|
||||
function csa(m,i,b1t,b1a,b2t,b2a) {
|
||||
u='client:showalert?message='+escape(m);
|
||||
if(i)u+='&image='+escape(i);
|
||||
if(b1t)u+='&buttonlabel1='+escape(b1t);
|
||||
if(b1t&&!b1a){b1a='client:donothing'}
|
||||
if(b1a)u+='&buttonaction1='+escape(b1a);
|
||||
if(b2t)u+='&buttonlabel2='+escape(b2t);
|
||||
if(b2t&&!b2a){b2a='client:donothing'}
|
||||
if(b2a)u+='&buttonaction2='+escape(b2a);
|
||||
return u;
|
||||
}
|
||||
|
||||
function redir(){
|
||||
r=history.previous
|
||||
if(r==htm+'Themes.html'||r==htm+'PhoneCallWaitThresh.html'||r==htm+'BGM.html'||r==htm+'NVRAM.html'||r.indexOf('wtv-')==0){go(r)}
|
||||
}
|
||||
|
||||
function goHTV(){return go('wtv-home:/home')}
|
||||
function gsa(m,i,b1t,b1a,b2t,b2a){go(csa(m,i,b1t,b1a,b2t,b2a))}
|
||||
function head(msg,fs,bgm,lp,nl){d.write(headr(msg,fs,bgm,lp,nl))}
|
||||
function dhh(tit) {if(tit==1){head('Partition Map','','','',true)}}
|
||||
function vh(){d.write(headr('VFat Hax'))}
|
||||
@@ -1,55 +0,0 @@
|
||||
z_nv=null;
|
||||
z_th=new Array()
|
||||
z_th[0]='HackTV Light'
|
||||
z_th[1]='WebTV Dark'
|
||||
z_th[2]='Amy<br>Red'
|
||||
z_th[3]='Basic Web'
|
||||
z_th[4]='WinXP Tan'
|
||||
z_th[5]='Ryder Green'
|
||||
z_th[6]='SKCro Blue'
|
||||
z_th[7]='Win95 Teal'
|
||||
z_th[8]='zefie Purple'
|
||||
z_th[9]='MattMan Brown'
|
||||
z_th[10]='Paper White'
|
||||
z_th[11]='Halloween Black'
|
||||
|
||||
z_def=new Array()
|
||||
z_def[0]=0//theme
|
||||
|
||||
chars="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz@-"//64 possible different values
|
||||
function gTN(th){return z_th[parseInt(th)]}
|
||||
function pp(){d.write('<form name=z><input type=hidden name=h value=&pname;></form>');z_nv=d.z.h.value}
|
||||
function gB(off){
|
||||
if(!z_nv){pp()}
|
||||
b=z_nv.charAt(parseInt(off))
|
||||
if(b){return chars.indexOf(b)}
|
||||
else{return -1}
|
||||
}
|
||||
function sB(off,dat,raw){
|
||||
if(!z_nv){pp()}
|
||||
off=parseInt(off)
|
||||
prefix=''
|
||||
if(off>0){prefix=z_nv.substring(0,off)}
|
||||
if(off>prefix.length){while(off!=prefix.length){prefix+='.'}}
|
||||
if(!raw){dat=chars.charAt(parseInt(dat));}
|
||||
z_url='client:ConfirmBYOISPSetup?BYOISPProviderName='+prefix+dat+z_nv.substring(off+1)
|
||||
go(z_url)
|
||||
}
|
||||
function eB(off){
|
||||
sB(off,'.',true)
|
||||
}
|
||||
function eAll(){
|
||||
z_url='client:ConfirmBYOISPSetup?BYOISPProviderName='
|
||||
go(z_url)
|
||||
}
|
||||
function gV(off){
|
||||
off=parseInt(off)
|
||||
z_len=0
|
||||
switch(off){
|
||||
case 0:z_len=z_th.length
|
||||
break
|
||||
}
|
||||
z_val=gB(off)
|
||||
if(z_val<0||z_val>=z_len){return z_def[off]}
|
||||
return z_val
|
||||
}
|
||||
@@ -47,19 +47,17 @@ var supportZefieAlert = new clientShowAlert({
|
||||
|
||||
|
||||
if (ssid_sessions[socket.ssid].get("wtv-used-8675309") || ssid_sessions[socket.ssid].get("wtv-need-upgrade")) {
|
||||
data = `<html>
|
||||
data =`<html>
|
||||
<head>
|
||||
<title>MiniBrowser Home</title>
|
||||
<body background=/ROMCache/Themes/Images/Pattern.gif text=cbcbcb bgcolor=6e5b85 vlink=dddddd link=dddddd hspace=0 vspace=0 fontsize=medium>
|
||||
<body background=Themes/Pattern.gif text=cbcbcb bgcolor=4c5a67 vlink=dddddd link=dddddd hspace=0 vspace=0 fontsize=medium>
|
||||
<table cellspacing=0 cellpadding=0>
|
||||
<tr><td>
|
||||
<td width=100% height=80 valign=top align=left background=/ROMCache/Themes/Images/ShadowLogoMB.gif>
|
||||
<td width=100% height=80 valign=top align=left background=Themes/ShadowLogo.gif novtilebg>
|
||||
<spacer type=block width=11 height=11><br>
|
||||
<spacer type=block width=10 height=1>
|
||||
<img src=${minisrv_config.config.service_logo} width=90 height=69>
|
||||
<td width=100% height=80 valign=top background=/ROMCache/Themes/Images/ShadowLogoMB.gif>
|
||||
<td abswidth=460 height=54 valign=top background=/ROMCache/Themes/Images/ShadowLogoMB.gif align=right>
|
||||
<spacer height=32 type=block><b><shadow><blackface><font color=cbcbcb>MiniBrowser Home </font></blackface></shadow></b>
|
||||
<img src=file://ROM/Cache/WebTVLogoJewel.gif width=90 height=69>
|
||||
<td width=100% height=80 valign=top background=Themes/ShadowLogo.gif novtilebg><td abswidth=460 height=54 valign=top background=Themes/ShadowLogo.gif align=right novtilebg><spacer height=32 type=block><b><shadow><blackface><font color=cbcbcb>MiniBrowser Home </font></blackface></shadow></b>
|
||||
</td></tr></table>
|
||||
<table>
|
||||
<tr align=top>
|
||||
@@ -85,168 +83,7 @@ if (ssid_sessions[socket.ssid].get("wtv-used-8675309") || ssid_sessions[socket.s
|
||||
</form>
|
||||
`
|
||||
} else {
|
||||
hasJS = session_data.hasCap("client-can-do-javascript");
|
||||
title = `Home for ${session_data.getSessionData("subscriber_username") || "minisrv"}`
|
||||
data = `<html><head>`;
|
||||
if (hasJS) {
|
||||
data += `<script src=/ROMCache/h.js></script><script src=/ROMCache/n.js></script></head><script>head('${title}','','','',1,'${minisrv_config.config.service_logo}')</script>`
|
||||
} else {
|
||||
data += `<body background=/ROMCache/Themes/Images/Pattern.gif text=42bd52 bgcolor=191919 vlink=dddddd link=dddddd hspace=0 vspace=0 fontsize=medium>
|
||||
<table cellspacing=0 cellpadding=0>
|
||||
<tr><td>
|
||||
<td width=100% height=80 valign=top align=left>
|
||||
<spacer type=block width=11 height=11><br>
|
||||
<spacer type=block width=10 height=1>
|
||||
<img src=${minisrv_config.config.service_logo} width=90 height=69>
|
||||
<td width=100% height=80 valign=top>
|
||||
<td abswidth=460 height=54 valign=top align=right>
|
||||
<spacer height=32 type=block><b><shadow><blackface><font color=cbcbcb>${title} </font></blackface></shadow></b>
|
||||
</td></tr></table>`;
|
||||
}
|
||||
data += `
|
||||
|
||||
<hr>
|
||||
<center>
|
||||
<a href="wtv-mail:/listmail" align="center"><b>Mail</b></a> -
|
||||
<a href="wtv-favorite:/favorite" align="center"><b>Favorites</b></a> -
|
||||
<a href="wtv-setup:/sound" align="center"><b>Music</b></a> -
|
||||
<a href="http://frogfind.com" align="center"><b>Search</b></a> -
|
||||
<a href="wtv-flashrom:/willie" align="center"><b>ROMs</b></a> -
|
||||
<a href="wtv-setup:/setup" align="center"><b>Settings</b></a> -
|
||||
<a href="wtv-guide:/help?topic=Index&subtopic=Glossary" align="center"><b>Help</b></a>
|
||||
</center>
|
||||
<hr>
|
||||
<form action="wtv-tricks:/access">
|
||||
<spacer type=block width="34">`
|
||||
if (hasJS) {
|
||||
data += `<script>document.write('<input type="text" name="url" width=440 autoexecute bgcolor='+gTC("bg")+' text='+gTC("t")+' cursor='+gTC("t")+' value="wtv-tricks:/tricks">')</script>`;
|
||||
} else {
|
||||
data += `<input type="text" name="url" width=440 bgcolor=191919 text=42bd52 cursor=42bd52 autoexecute value="wtv-tricks:/tricks">`;
|
||||
}
|
||||
data += `<script>butt("Go","submit",30,"submit")</script>
|
||||
</form>
|
||||
<hr>
|
||||
<table>
|
||||
<tr>
|
||||
|
||||
<td valign="top" width="135">
|
||||
<table><tr>
|
||||
<td><b>» Community «</b></td>
|
||||
</tr><tr>
|
||||
<td><a href="wtv-chat:/home" height="18" valign="middle">€ Chat</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="wtv-news:/lobby" height="18" valign="middle">€ Discuss</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="wtv-setup:/messenger" height="21" valign="middle">€ Messenger</a></td>
|
||||
</tr></table>
|
||||
</td>
|
||||
<td valign="top" width="120">
|
||||
<table><tr>
|
||||
<td><b>» Account «</b></td>
|
||||
</tr><tr>
|
||||
<td><a href="client:relogin" height="21" valign="middle">€ Relogin</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="wtv-setup:/serve-billing-overview" height="21" valign="middle">€ Configure</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="wtv-setup:/edit-password" height="21" valign="middle">€ Password</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="wtv-setup:/accounts" height="21" valign="middle">€ Add User</a></td>
|
||||
</tr><tr>
|
||||
<td>
|
||||
`;
|
||||
if (session_data.getSessionData("registered")) data += `<a href="wtv-tricks:/unregister" height="21" valign="middle">€ Unregister`;
|
||||
else data += `<a href="wtv-tricks:/register" height="21" valign="middle">€ Register`
|
||||
data += `
|
||||
</a></td>
|
||||
</tr></table>
|
||||
</td>
|
||||
|
||||
<td valign="top" width="120">
|
||||
<table><tr>
|
||||
<td><b>» Tools «</b></td>
|
||||
</tr><tr>
|
||||
<td><a href="wtv-tricks:/tricks">€ WTV Tricks</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="wtv-tricks:/themes">€ Themes</a><td>
|
||||
</tr><tr>
|
||||
<td><a href="wtv-author:/documents">€ Pagebuilder</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="wtv-tricks:/blastbacklist?return_to=wtv-home:/home">€ Clear Cache</a></td>
|
||||
</tr></table>
|
||||
</td>
|
||||
|
||||
<td valign="top">
|
||||
<table><tr>
|
||||
<td><b>» More Stuff «</b></td>
|
||||
</tr><tr>
|
||||
<td><a href="wtv-tricks:/cSetup">€ Switch server</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="${ownMinisrv}">€ Run your own server</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="http://archive.midnightchannel.net/zefie/media/">€ Midnight Archives</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="${supportZefieAlert}">€ Help zefie</a></td>
|
||||
</tr></table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td align="left" colspan=4>
|
||||
<table border=0 cellspacing=0 cellpadding=0 width="100%">
|
||||
<tr>`
|
||||
if (hasJS) {
|
||||
data += `<script>document.write('<td colspan=2 background="'+thi+gTC('shimg')+'" text="'+gTC('bg')+'" valign=middle absheight=24>')</script>`
|
||||
} else {
|
||||
data += `<td colspan=2 background="/ROMCache/Themes/Images/Pattern.gif" text=42bd52 valign="middle" absheight="24">`
|
||||
}
|
||||
data += `
|
||||
<spacer type=block height=3 width=100%><b><shadow> € Welcome to zefie's minisrv ${minisrv_version_string.split(" ")[3]}</shadow></b>
|
||||
</td></tr>
|
||||
<tr><td absheight="6"></tr>
|
||||
<tr>
|
||||
<td valign="top" colspan=3>
|
||||
This server is operated by ${minisrv_config.config.service_owner}.<br>
|
||||
`;
|
||||
if (minisrv_config.config.service_description) {
|
||||
if (typeof minisrv_config.config.service_description === "string") {
|
||||
if (minisrv_config.config.service_description.length > 0) {
|
||||
data += minisrv_config.config.service_description;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
data += `
|
||||
<p></p>
|
||||
</tr>
|
||||
<tr>`
|
||||
if (hasJS) {
|
||||
data += `<script>document.write('<td colspan=2 background="'+thi+gTC('shimg')+'" text="'+gTC('bg')+'" valign=middle absheight=24>')</script>`
|
||||
} else {
|
||||
data += `<td colspan=2 background="/ROMCache/Themes/Images/Pattern.gif" text=42bd52 valign="middle" absheight="24">`
|
||||
}
|
||||
data += `
|
||||
<spacer type=block height=3 width=100%><b><shadow> € minisrv Latest Updates</b></shadow>
|
||||
<tr><td absheight="6"></td></tr>
|
||||
<tr>
|
||||
<td valign="top" colspan=4>
|
||||
• Redesigned home page, uses custom rom theme system.<br>
|
||||
• Added Protoweb Support (<a href="proto://www.webtv.net/">Try it!</a>)<br>
|
||||
• Added a new minisrv logo<br>
|
||||
</td></tr>
|
||||
</table>
|
||||
</table>
|
||||
</body>
|
||||
</html>`
|
||||
}
|
||||
|
||||
/*
|
||||
data =`
|
||||
|
||||
|
||||
<html>
|
||||
<head>
|
||||
data = `<html><head>
|
||||
<display hspace=0 vspace=0 fontsize=small noscroll showwhencomplete>
|
||||
<title>
|
||||
Home for ${session_data.getSessionData("subscriber_username") || "minisrv"}
|
||||
@@ -507,4 +344,3 @@ data += `
|
||||
`
|
||||
}
|
||||
data += "</body>\n</html>";
|
||||
*/
|
||||
@@ -8,7 +8,7 @@ Content-Type: text/html`
|
||||
|
||||
data = `<html>
|
||||
<head>
|
||||
<display hideoptions nostatus showwhencomplete switchtowebmode skipback clearback fontsize=medium>
|
||||
<display hideoptions nostatus showwhencomplete skipback clearback fontsize=medium>
|
||||
<title>Engaging zefie...</title>
|
||||
<meta http-equiv=Refresh content="${(wtvshared.parseBool(session_data.getSessionData("fast_splash"))) ? "0" : "4"}; url=wtv-home:/home?">
|
||||
</head>
|
||||
|
||||
@@ -5,7 +5,6 @@ if (!request_headers.query.registering) {
|
||||
headers = errpage[0];
|
||||
data = errpage[1];
|
||||
} else {
|
||||
var hasJS = session_data.hasCap("client-can-do-javascript");
|
||||
const WTVRegister = require(classPath + "/WTVRegister.js")
|
||||
var wtvr = new WTVRegister(minisrv_config, SessionStore);
|
||||
var errpage = null;
|
||||
@@ -26,10 +25,15 @@ if (!request_headers.query.registering) {
|
||||
} else {
|
||||
|
||||
headers = `200 OK
|
||||
wtv-noback-all: wtv-register:
|
||||
Content-Type: text/html`;
|
||||
var title = "Account Review";
|
||||
var main_data = `<table cellspacing=0 cellpadding=0 border=0 width=560><tr><td>
|
||||
<form ACTION="ValidateReviewAccountInfo" ENCTYPE="x-www-form-encoded" METHOD="POST">
|
||||
var isOldBuild = wtvshared.isOldBuild(session_data);
|
||||
var main_data = '';
|
||||
if (!isOldBuild) main_data += `<table cellspacing=0 cellpadding=0 border=0 width=560 bgcolor=#171726>
|
||||
<tr><td>`;
|
||||
|
||||
main_data += `<form ACTION="ValidateReviewAccountInfo" ENCTYPE="x-www-form-encoded" METHOD="POST">
|
||||
<input type=hidden name=registering value="true">
|
||||
<input type=hidden name=subscriber_name value="${request_headers.query.subscriber_name}">
|
||||
<input type=hidden name=subscriber_username value="${request_headers.query.subscriber_username}">
|
||||
@@ -38,7 +42,10 @@ Content-Type: text/html`;
|
||||
<td height=50 width=300 colspan=6 valign=top align=left>
|
||||
<br>
|
||||
Here is your account information. If you need to<br>
|
||||
correct an item, press <b>Back</b>.<p><table><tr>
|
||||
correct an item, press <b>Back</b>.<p>`;
|
||||
if (isOldBuild) main_data += "<table>";
|
||||
|
||||
main_data += `<tr>
|
||||
<td width=260 valign=top align=left colspan=4>
|
||||
<table cellspacing=0 cellpadding=0 border=0 >
|
||||
<img src="images/arrow.gif"> <font size=-2><b>NAME</b></font><br>
|
||||
@@ -62,18 +69,13 @@ correct an item, press <b>Back</b>.<p><table><tr>
|
||||
<tt><font color=#d1d3d3 size=-2><spacer type=horizontal size=17>${request_headers.query.subscriber_contact_method}</font></tt>
|
||||
</table> <P> <P>
|
||||
<td abswidth=20>
|
||||
</tr></table></table>`;
|
||||
|
||||
|
||||
var form_data = '';
|
||||
if (hasJS) {
|
||||
form_data += `<script>butt('Sign Up','Sign Up',110)</script>`;
|
||||
}
|
||||
else {
|
||||
form_data += `<shadow><input selected Value="Sign Up" name="Sign Up" width="110" type=submit borderimage="file://ROM/Borders/ButtonBorder2.bif"></shadow>`;
|
||||
}
|
||||
|
||||
form_data += '</form>';
|
||||
data = wtvr.getHTMLTemplate(title, main_data, form_data, hasJS);
|
||||
</tr>`;
|
||||
if (isOldBuild) main_data += '</table>';
|
||||
var form_data = `<shadow>
|
||||
<input selected Value="Sign Up" name="Sign Up" width="110" type=submit Value=Continue name="Continue" borderimage="file://ROM/Borders/ButtonBorder2.bif" text="#dddddd">
|
||||
</shadow>
|
||||
</font>
|
||||
</form>`;
|
||||
data = wtvr.getHTMLTemplate(title, main_data, form_data, isOldBuild);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ if (!request_headers.query.registering) {
|
||||
headers = errpage[0];
|
||||
data = errpage[1];
|
||||
} else {
|
||||
var hasJS = session_data.hasCap("client-can-do-javascript");
|
||||
const WTVRegister = require(classPath + "/WTVRegister.js")
|
||||
var wtvr = new WTVRegister(minisrv_config);
|
||||
headers = `200 OK
|
||||
@@ -14,39 +13,32 @@ Content-Type: text/html`;
|
||||
ENCTYPE="x-www-form-encoded" METHOD="POST">
|
||||
<input type=hidden name=registering value="true">
|
||||
Please set up your account:<br><br>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<font size="-2"><b>YOUR NAME:</b></font><img src="ROMCache/spacer.gif" width="7">
|
||||
<img src="ROMCache/spacer.gif" width="78" height="5">
|
||||
</td>
|
||||
<td>
|
||||
<INPUT NAME="subscriber_name" ID="subscriber_name" bgcolor=#444444 text=#ffdd33 cursor=#cc9933 VALUE="${request_headers.query.subscriber_name || ""}" TYPE="text" SIZE="19" MAXLENGTH="18" AutoCaps selected>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="ROMCache/spacer.gif" width="78" height="5"><INPUT NAME="subscriber_name"
|
||||
ID="subscriber_name"
|
||||
bgcolor=#444444 text=#ffdd33 cursor=#cc9933
|
||||
VALUE="${request_headers.query.subscriber_name || ""}" TYPE="text" SIZE="19"
|
||||
MAXLENGTH="18"
|
||||
AutoCaps selected>
|
||||
<p>
|
||||
<font size="-2"><b>DESIRED USERNAME:</b></font><img src="ROMCache/spacer.gif" width="7">
|
||||
<img src="ROMCache/spacer.gif" width="5">
|
||||
</td>
|
||||
<td>
|
||||
<INPUT NAME="subscriber_username" ID="subscriber_username" bgcolor=#444444 text=#ffdd33 cursor=#cc9933 VALUE="${request_headers.query.subscriber_username || ""}" TYPE="text" SIZE="19" MAXLENGTH="16" selected>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="ROMCache/spacer.gif" width="5"><INPUT NAME="subscriber_username"
|
||||
ID="subscriber_username"
|
||||
bgcolor=#444444 text=#ffdd33 cursor=#cc9933
|
||||
VALUE="${request_headers.query.subscriber_username || ""}" TYPE="text" SIZE="19"
|
||||
MAXLENGTH="16"
|
||||
AutoCaps selected>
|
||||
<p>
|
||||
<font size="-2"><b>YOUR CONTACT INFO:</b></font><img src="ROMCache/spacer.gif" width="7">
|
||||
</td><td><INPUT NAME="subscriber_contact"
|
||||
<INPUT NAME="subscriber_contact"
|
||||
ID="subscriber_contact"
|
||||
bgcolor=#444444 text=#ffdd33 cursor=#cc9933
|
||||
VALUE="" TYPE="text" SIZE="19"
|
||||
MAXLENGTH="64"
|
||||
AutoCaps selected>
|
||||
</td></tr>
|
||||
<td><font size="-2"><b>CONTACT INFO TYPE:</b></font><img src="ROMCache/spacer.gif" width="7">
|
||||
<img src="ROMCache/spacer.gif" width="3"></td>
|
||||
<td>
|
||||
<select usestyle id="subscriber_contact_method" name="subscriber_contact_method">
|
||||
<p>
|
||||
<font size="-2"><b>CONTACT INFO TYPE:</b></font><img src="ROMCache/spacer.gif" width="7">
|
||||
<img src="ROMCache/spacer.gif" width="3"><select usestyle id="subscriber_contact_method" name="subscriber_contact_method">
|
||||
<option value="">Type</option>
|
||||
<option>E-Mail</option>
|
||||
<option>Discord</option>
|
||||
@@ -54,13 +46,11 @@ AutoCaps selected>
|
||||
<option>Telegram</option>
|
||||
<option>Instagram</option>
|
||||
</select>
|
||||
</td></tr></table>`;
|
||||
var form_data = ``
|
||||
if (hasJS) {
|
||||
form_data += `<script>butt('Continue','Continue',110)</script>`;
|
||||
} else {
|
||||
form_data += `<shadow><input type=submit Value=Continue name="Continue" borderimage="file://ROM/Borders/ButtonBorder2.bif" width=110></shadow>`;
|
||||
}
|
||||
form_data += `</form>`;
|
||||
data = wtvr.getHTMLTemplate(minisrv_config.config.service_name + " Account Setup", main_data, form_data, hasJS);
|
||||
}
|
||||
`;
|
||||
var form_data = `<shadow>
|
||||
<input type=submit Value=Continue name="Continue" borderimage="file://ROM/Borders/ButtonBorder2.bif" text="#dddddd" width=110>
|
||||
</shadow>
|
||||
</font>
|
||||
</form>`;
|
||||
data = wtvr.getHTMLTemplate(minisrv_config.config.service_name + " Account Setup", main_data, form_data, wtvshared.isOldBuild(session_data));
|
||||
}
|
||||
|
||||
@@ -51,37 +51,78 @@ if (!request_headers.query.registering ||
|
||||
data = errpage[1];
|
||||
} else {
|
||||
|
||||
var hasJS = session_data.hasCap("client-can-do-javascript")
|
||||
headers = `200 OK
|
||||
Content-Type: text/html`;
|
||||
var title = "Finished signing up";
|
||||
var main_data = `<form action="FinishRegistration"
|
||||
<input type=hidden name=registering value="true">
|
||||
<input type=hidden name=subscriber_name value="${request_headers.query.subscriber_name}">
|
||||
<input type=hidden name=subscriber_username value="${request_headers.query.subscriber_username}">
|
||||
<input type=hidden name=subscriber_contact value="${request_headers.query.subscriber_contact}">
|
||||
<input type=hidden name=subscriber_contact_method value="${request_headers.query.subscriber_contact_method}">
|
||||
|
||||
data = `<html>
|
||||
<head>
|
||||
<title>
|
||||
Finished signing up
|
||||
</title>
|
||||
<display nooptions noscroll ClearBack
|
||||
NoScroll
|
||||
>
|
||||
</head>
|
||||
<body noscroll
|
||||
bgcolor="#171726" text="#D1D3D3" link=#FFEA9C vlink=#FFEA9C
|
||||
hspace=0 vspace=0 fontsize="large"
|
||||
>
|
||||
<table cellspacing=0 cellpadding=0 border=0 width=560 bgcolor=#171726>
|
||||
<tr>
|
||||
<td align=middle bgcolor="#5b6c81" border=0 colspan= 3 width="100" height="80">
|
||||
<img src="${minisrv_config.config.service_logo}" WIDTH="87" HEIGHT="67">
|
||||
<td colspan= 6 bgcolor="#5b6c81" border=0 width=100% absheight="80" valign=bottom >
|
||||
<img src="images/head_registration.gif" >
|
||||
<tr>
|
||||
<td bgcolor= "#5b6c81" border=0 rowspan=2 width=21 height= 220></td>
|
||||
<td bgcolor="#171726" border=0 width=9 height=25 align=left valign=top>
|
||||
<img src="images/L_corner.gif" width=8 height=8>
|
||||
<td bgcolor="#171726" border=1 colspan=1 width=70 height=25>
|
||||
<td colspan=6 bgcolor="#171726" border=1 height=25 align=left valign=bottom gradcolor=#262E3D gradangle=90>
|
||||
<font color=#d1d3d3 size=+1>
|
||||
<blackface>
|
||||
You've finished signing up
|
||||
</blackface></font>
|
||||
<tr> <td border=0 width=40 bgcolor="#171726" rowspan="2" >
|
||||
<td absheight=20 width=100 bgcolor="#171726" colspan=6>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing=0 cellpadding=0 border=0 width=560 bgcolor=#171726>
|
||||
<tr>
|
||||
<td bgcolor= "#5b6c81" border=0 rowspan=6 abswidth=21 height= 220></td>
|
||||
<td border=0 abswidth=40 bgcolor="#171726" rowspan="6" >
|
||||
<form action="FinishRegistration"
|
||||
>
|
||||
<td height=230 width= 300 bgcolor="#171726" colspan=5 valign=top align=left>
|
||||
Thank you for signing up for ${minisrv_config.config.service_name}.
|
||||
<p>
|
||||
You will now go
|
||||
to your <b>Web Home</b> page. You can always
|
||||
connect to the Internet by choosing
|
||||
<b>Web Home</b> on your TV Home page.`;
|
||||
|
||||
|
||||
var form_data = '';
|
||||
if (hasJS) {
|
||||
form_data += `<script>butt('Continue','Continue',110)</script>`;
|
||||
}
|
||||
else {
|
||||
form_data += `<shadow><input selected Value="Continue" name="Continue" width="110" type=submit borderimage="file://ROM/Borders/ButtonBorder2.bif"></shadow>`;
|
||||
}
|
||||
|
||||
form_data += '</form>';
|
||||
data = wtvr.getHTMLTemplate(title, main_data, form_data, hasJS);
|
||||
|
||||
headers = `200 OK
|
||||
Content-Type: text/html`;
|
||||
<b>Web Home</b> on your TV Home page.
|
||||
</font>
|
||||
<td abswidth=20 bgcolor=#171726 >
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign= bottom height=15 colspan=7 bgcolor=#171726>
|
||||
<shadow>
|
||||
<hr size=5 valign=bottom></shadow>
|
||||
</tr>
|
||||
<tr>
|
||||
<td border=2 colspan=4 width=300 height=50 bgcolor=#171726 valign=top align=left>
|
||||
<font size=-1><i>
|
||||
</i></font>
|
||||
<td bgcolor=#171726 height=50 width=150 valign=top align=right>
|
||||
<font size=-1 color=#e7ce4a>
|
||||
<shadow>
|
||||
<input type=submit Value=Continue name="Continue" borderimage="file://ROM/Borders/ButtonBorder2.bif" usestyle width=110>
|
||||
</shadow>
|
||||
</font>
|
||||
</form> <td abswidth=13 absheight=50 bgcolor=#171726>
|
||||
</tr> </table>
|
||||
</body>
|
||||
</html>
|
||||
`;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,23 +8,19 @@ var wtvr = new WTVRegister(minisrv_config);
|
||||
var namerand = Math.floor(Math.random() * 100000);
|
||||
var nickname = (minisrv_config.config.service_name + '_' + namerand)
|
||||
var human_name = nickname;
|
||||
var hasJS = session_data.hasCap("client-can-do-javascript") && parseInt(session_data.get('wtv-system-version')) >= 2000;
|
||||
var form_data = "";
|
||||
var isOldBuild = wtvshared.isOldBuild(session_data);
|
||||
var form_data = `<input type=button action="ValidateAgreement?registering=true&subscriber_name=${human_name}&subscriber_username=${nickname}" text="#dddddd" Value="Quick Reg" name="speedyreg" borderimage="file://ROM/Borders/ButtonBorder2.bif" width=130>`;
|
||||
if (minisrv_config.config.allow_guests) form_data += `<input type=button text="#dddddd" action="BeMyGuest" Value="Sign in as Guest" name="noreg" borderimage="file://ROM/Borders/ButtonBorder2.bif" width=170 >`;
|
||||
var main_data = `<form action="ValidateAgreement"
|
||||
ENCTYPE="x-www-form-encoded" METHOD="POST">
|
||||
<input type=hidden name=registering value="true">
|
||||
Welcome to the ${minisrv_config.config.service_name} Mini Service, operated by ${minisrv_config.config.service_owner}.
|
||||
The next screens will lead you through a quick setup process for using this service.<p> Press the "Continue" button below to begin setup.<p>`;
|
||||
|
||||
if (hasJS) {
|
||||
form_data = `<script>butt('Quick Reg','speedyreg',130,'button','action="ValidateAgreement?registering=true&subscriber_name=${human_name}&subscriber_username=${nickname}"');`;
|
||||
if (minisrv_config.config.allow_guests) form_data += `butt('Sign in as Guest', 'noreg', 170, 'button', 'action="BeMyGuest"')`;
|
||||
form_data += `butt('Continue','Continue',110)</script>`;
|
||||
} else {
|
||||
form_data = `<input type=button action="ValidateAgreement?registering=true&subscriber_name=${human_name}&subscriber_username=${nickname}" text="e7ce4a" Value="Quick Reg" name="speedyreg" borderimage="file://ROM/Borders/ButtonBorder2.bif" width=130>`;
|
||||
if (minisrv_config.config.allow_guests) form_data += `<input type=button text="e7ce4a" action="BeMyGuest" Value="Sign in as Guest" name="noreg" borderimage="file://ROM/Borders/ButtonBorder2.bif" width=170 >`;
|
||||
form_data += `<input type=submit Value=Continue name="Continue" text="#e7ce4a" borderimage="file://ROM/Borders/ButtonBorder2.bif" width=110 selected>`;
|
||||
}
|
||||
form_data += `<input type=submit Value=Continue name="Continue" text="#dddddd" borderimage="file://ROM/Borders/ButtonBorder2.bif" width=110 selected>
|
||||
</shadow>
|
||||
</font>
|
||||
</form>
|
||||
`;
|
||||
|
||||
form_data += `</form>`;
|
||||
data = wtvr.getHTMLTemplate("Welcome to " + minisrv_config.config.service_name, main_data, form_data, hasJS);
|
||||
data = wtvr.getHTMLTemplate("Welcome to " + minisrv_config.config.service_name, main_data, form_data, isOldBuild);
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
var minisrv_service_file = true;
|
||||
|
||||
headers = `302 Moved
|
||||
Connection: Keep-Alive
|
||||
wtv-expire-all: wtv-tricks:/themes
|
||||
Location: wtv-tricks:/themes
|
||||
Content-Type: text/html`
|
||||
@@ -1,20 +0,0 @@
|
||||
<html><head><display nooptions noscroll allowoffline notvaudio switchtowebmode noreconnectalert nosave nosend>
|
||||
<script src=/ROMCache/h.js></script><script src=/ROMCache/n.js></script></head>
|
||||
<script>head('Theme Settings','large','',5)
|
||||
function sBG(c){sB(0,c)}</script>
|
||||
<spacer width=30 height=6 type=vertical>
|
||||
<table cellspacing=0 cellpadding=0><tr><td abswidth=14><td colspan=3><spacer height=20 type=vertical><td>
|
||||
<tr><td><td width=350 height=230 valign=top align=left>
|
||||
<table cellspacing=0 cellpadding=0><tr><td height=250 valign=top>
|
||||
<font size=-1> Please select the theme you would like to use from the list below. Click done when finished.<br>
|
||||
<table cellspacing=0 cellpadding=4><tr><font size=-2><script>
|
||||
for(i=0;i<z_th.length;i++){
|
||||
if(i==th){s=' selected'}
|
||||
else{s=''}
|
||||
if(i%6==0){d.write('<tr>')}
|
||||
d.write('<td align=center><font size=-1>'+gTN(i)+'</font><br>')
|
||||
d.write('<table border=1 href="javascript:sBG('+i+')" insetselection'+s+'><tr><td bgcolor='+gTC('bg',i)+' height=45 width=60></table>')
|
||||
}</script></table>
|
||||
</table>
|
||||
<tr><td width=330 valign=top align=right colspan=2><br><form action="javascript:goHTV()"><script>butt('Done','Done',160);</script></form>
|
||||
</table></body></html>
|
||||
@@ -22,7 +22,7 @@ class WTVRegister {
|
||||
}
|
||||
|
||||
checkUsernameSanity(username) {
|
||||
var regex_str = "^([A-Za-z0-9\-\_]{" + this.minisrv_config.config.user_accounts.min_username_length + "," + this.minisrv_config.config.user_accounts.max_username_length + "})$";
|
||||
var regex_str = "^([A-Za-z0-9-\_]{" + this.minisrv_config.config.user_accounts.min_username_length + "," + this.minisrv_config.config.user_accounts.max_username_length + "})$";
|
||||
var regex = new RegExp(regex_str);
|
||||
return regex.test(username);
|
||||
}
|
||||
@@ -73,29 +73,40 @@ class WTVRegister {
|
||||
* @param {string} title HTML Page Title
|
||||
* @param {string} main_content Main center content
|
||||
* @param {string} form_buttons Form and buttons
|
||||
* @param {boolean} is_old_build True or false
|
||||
* @returns {string} HTML Page
|
||||
*/
|
||||
getHTMLTemplate(title, main_content, form_buttons, hasJS) {
|
||||
getHTMLTemplate(title, main_content, form_buttons, is_old_build) {
|
||||
var data;
|
||||
data = `<html><head>`;
|
||||
if (hasJS) {
|
||||
data += `<script src=/ROMCache/h.js></script><script src=/ROMCache/n.js></script></head><script>head('${title}','','','',1)</script>`
|
||||
} else {
|
||||
data += `<body background=/ROMCache/Themes/Images/Pattern.gif text=42bd52 bgcolor=191919 vlink=dddddd link=dddddd hspace=0 vspace=0 fontsize=medium>
|
||||
<table cellspacing=0 cellpadding=0>
|
||||
<tr><td>
|
||||
<td width=100% height=80 valign=top align=left>
|
||||
<spacer type=block width=11 height=11><br>
|
||||
<spacer type=block width=10 height=1>
|
||||
<img src=/ROMCache/WebTVLogoJewel.gif width=90 height=69>
|
||||
<td width=100% height=80 valign=top>
|
||||
<td abswidth=460 height=54 valign=top align=right>
|
||||
<spacer height=32 type=block><b><shadow><blackface><font color=cbcbcb>${title} </font></blackface></shadow></b>
|
||||
</td></tr></table>`;
|
||||
}
|
||||
data += `<display nooptions>
|
||||
|
||||
<table width=480 align=center cellspacing=0 cellpadding=0>
|
||||
if (is_old_build) {
|
||||
data = `<html>
|
||||
<head>
|
||||
<title>
|
||||
${title}
|
||||
</title>
|
||||
<display nooptions>
|
||||
</head>
|
||||
<body bgcolor=#191919 text=#42CC55 fontsize=large hspace=0 vspace=0>
|
||||
<table cellspacing=0 cellpadding=0>
|
||||
<tr>
|
||||
<td width=104 height=74 valign=middle align=center bgcolor=#3B3A4D>
|
||||
<img src="${this.minisrv_config.config.service_logo}" width=86 height=64>
|
||||
<td width=20 valign=top align=left bgcolor=#3B3A4D>
|
||||
<spacer>
|
||||
<td colspan=2 width=100% align=left bgcolor=#3B3A4D>
|
||||
<font color=D6DFD0 size=+2>
|
||||
<blackface>
|
||||
<shadow>
|
||||
<spacer type=block width=1 height=4>
|
||||
<br>
|
||||
${title}
|
||||
</shadow>
|
||||
</blackface>
|
||||
</font>
|
||||
</tr>
|
||||
</td>
|
||||
</table>
|
||||
<table width=520 align=center cellspacing=0 cellpadding=0>
|
||||
<tr>
|
||||
<td height=242>
|
||||
<font size=+1>
|
||||
@@ -121,9 +132,67 @@ class WTVRegister {
|
||||
</body>
|
||||
</html>
|
||||
`;
|
||||
} else {
|
||||
data = `<html>
|
||||
<head>
|
||||
<title>
|
||||
${title}
|
||||
</title>
|
||||
<display nooptions noscroll NoScroll>
|
||||
</head>
|
||||
<body noscroll
|
||||
bgcolor="#171726" text="#D1D3D3" link=#FFEA9C vlink=#FFEA9C
|
||||
hspace=0 vspace=0 fontsize="large"
|
||||
>
|
||||
<table cellspacing=0 cellpadding=0 border=0 width=560 bgcolor=#171726>
|
||||
<tr>
|
||||
<td align=middle bgcolor="#5b6c81" border=0 colspan= 3 width="100" height="80">
|
||||
<img src="${this.minisrv_config.config.service_logo}" WIDTH="87" HEIGHT="67">
|
||||
<td colspan= 6 bgcolor="#5b6c81" border=0 width=100% absheight="80" valign=bottom >
|
||||
<img src="images/head_registration.gif" >
|
||||
<tr>
|
||||
<td bgcolor="#5b6c81" border=0 rowspan=2 width=21 height= 220></td>
|
||||
<td bgcolor="#171726" border=0 width=9 height=25 align=left valign=top>
|
||||
<img src="images/L_corner.gif" width=8 height=8>
|
||||
<td bgcolor="#171726" border=1 colspan=1 width=70 height=25>
|
||||
<td colspan=6 bgcolor="#171726" border=1 height=25 align=left valign=bottom gradcolor=#262E3D gradangle=90>
|
||||
<font color=#d1d3d3 size=+1>
|
||||
<blackface>
|
||||
${title}
|
||||
</blackface></font>
|
||||
<tr> <td border=0 width=40 bgcolor="#171726" rowspan="2" >
|
||||
<td absheight=20 width=100 bgcolor="#171726" colspan=6>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing=0 cellpadding=0 border=0 width=560 bgcolor=#171726>
|
||||
<tr>
|
||||
<td bgcolor= "#5b6c81" border=0 rowspan=6 abswidth=21 height= 220></td>
|
||||
<td border=0 abswidth=40 bgcolor="#171726" rowspan="6" >
|
||||
<td height=230 width= 300 bgcolor="#171726" colspan=5 valign=top align=left>
|
||||
${main_content}
|
||||
<td abswidth=20 bgcolor=#171726 >
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign= bottom height=15 colspan=7 bgcolor=#171726>
|
||||
<shadow>
|
||||
<hr size=5 valign=bottom></shadow>
|
||||
</tr>
|
||||
<tr>
|
||||
<td border=2 colspan=4 width=100 height=50 bgcolor=#171726 valign=top align=left>
|
||||
<font size=-1><i>
|
||||
</i></font>
|
||||
<td bgcolor=#171726 height=50 width=560 valign=top align=right>
|
||||
<font size=-1 color=#e7ce4a>
|
||||
${form_buttons}
|
||||
<td abswidth=13 absheight=50 bgcolor=#171726>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>`;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = WTVRegister;
|
||||
module.exports = WTVRegister;
|
||||
|
||||
@@ -520,8 +520,8 @@ class WTVShared {
|
||||
|
||||
if (minisrv_config.config.verbosity >= 0 && minisrv_config.config.verbosity <= 3) {
|
||||
debugFlags.quiet = minisrv_config.config.verbosity < 2;
|
||||
debugFlags.show_headers = minisrv_config.config.verbosity % 2 === 1;
|
||||
debugFlags.debug = minisrv_config.config.verbosity === 2 || minisrv_config.config.verbosity === 3;
|
||||
debugFlags.show_headers = minisrv_config.config.verbosity === 2
|
||||
debugFlags.debug = minisrv_config.config.verbosity === 3;
|
||||
log(` * Console Verbosity level ${minisrv_config.config.verbosity}`);
|
||||
} else {
|
||||
Object.assign(debugFlags, { debug: true, quiet: false, show_headers: true });
|
||||
|
||||
18
zefie_wtvp_minisrv/package-lock.json
generated
@@ -1,15 +1,14 @@
|
||||
{
|
||||
"name": "zefie_wtvp_minisrv",
|
||||
"version": "0.9.55",
|
||||
"version": "0.9.56",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "zefie_wtvp_minisrv",
|
||||
"version": "0.9.55",
|
||||
"version": "0.9.56-pre",
|
||||
"license": "GPL3",
|
||||
"dependencies": {
|
||||
"@mafintosh/vm2": "^3.9.2",
|
||||
"adm-zip": "^0.5.12",
|
||||
"crypto-js": "^4.2.0",
|
||||
"easy-crc": "0.0.2",
|
||||
@@ -25,7 +24,6 @@
|
||||
"proxy-agent": "^6.4.0",
|
||||
"rc4-crypto": "^1.5.0",
|
||||
"sanitize-html": "^2.13.0",
|
||||
"socks-proxy-agent": "^8.0.2",
|
||||
"strftime": "^0.10.2",
|
||||
"uuid": "^8.3.2"
|
||||
},
|
||||
@@ -138,18 +136,6 @@
|
||||
"dev": true,
|
||||
"license": "BSD-3-Clause"
|
||||
},
|
||||
"node_modules/@mafintosh/vm2": {
|
||||
"version": "3.9.2",
|
||||
"resolved": "https://registry.npmjs.org/@mafintosh/vm2/-/vm2-3.9.2.tgz",
|
||||
"integrity": "sha512-lQS+7KT5H88iMmbz94X9L1B2lY3TTxRbh8etoAaYGfR1rGQLRr4TmejVzAXN65fJWJAHPRgVKHk/wD75XKsfOw==",
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"vm2": "bin/vm2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@nodelib/fs.scandir": {
|
||||
"version": "2.1.5",
|
||||
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "zefie_wtvp_minisrv",
|
||||
"version": "0.9.55",
|
||||
"version": "0.9.56",
|
||||
"description": "WebTV Service (WTVP) Emulation Server",
|
||||
"main": "app.js",
|
||||
"homepage": "https://github.com/zefie/zefie_wtvp_minisrv",
|
||||
@@ -26,7 +26,6 @@
|
||||
"url": "https://github.com/zefie/zefie_wtvp_minisrv.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"@mafintosh/vm2": "^3.9.2",
|
||||
"adm-zip": "^0.5.12",
|
||||
"crypto-js": "^4.2.0",
|
||||
"easy-crc": "0.0.2",
|
||||
@@ -42,7 +41,6 @@
|
||||
"proxy-agent": "^6.4.0",
|
||||
"rc4-crypto": "^1.5.0",
|
||||
"sanitize-html": "^2.13.0",
|
||||
"socks-proxy-agent": "^8.0.2",
|
||||
"strftime": "^0.10.2",
|
||||
"uuid": "^8.3.2"
|
||||
},
|
||||
|
||||
99
zefie_wtvp_minisrv/user_config.pconly_example.json
Normal file
@@ -0,0 +1,99 @@
|
||||
{
|
||||
/*
|
||||
STOP! STOP! STOP!
|
||||
Do NOT edit this file. Instead make a file called "user_config.json" in the same folder as "app.js"
|
||||
With that, you can override anything defined here. You can copy this config as a template, but should
|
||||
only leave in things you are actually overriding, in case a future feature update changes any defaults.
|
||||
*/
|
||||
"services": {
|
||||
// service definitions
|
||||
|
||||
"wtv-head-waiter": {
|
||||
"disabled": true
|
||||
},
|
||||
"wtv-tricks": {
|
||||
"disabled": true
|
||||
},
|
||||
"wtv-star": {
|
||||
"disabled": true
|
||||
},
|
||||
"wtv-news": {
|
||||
"disabled": true
|
||||
},
|
||||
"news": {
|
||||
"disabled": true
|
||||
},
|
||||
"wtv-register": {
|
||||
"disabled": true
|
||||
},
|
||||
"wtv-log": {
|
||||
"disabled": true
|
||||
},
|
||||
"wtv-home": {
|
||||
"disabled": true
|
||||
},
|
||||
"wtv-1800": {
|
||||
"disabled": true
|
||||
},
|
||||
"wtv-flashrom": {
|
||||
"disabled": true
|
||||
},
|
||||
"wtv-setup": {
|
||||
"disabled": true
|
||||
},
|
||||
"wtv-music": {
|
||||
"disabled": true
|
||||
},
|
||||
"wtv-cookie": {
|
||||
"disabled": true
|
||||
},
|
||||
"wtv-chat": {
|
||||
"disabled": true
|
||||
},
|
||||
"wtvchat": {
|
||||
"disabled": true
|
||||
},
|
||||
"irc": {
|
||||
"disabled": true
|
||||
},
|
||||
"wtv-disk": {
|
||||
"disabled": true
|
||||
},
|
||||
"wtv-guide": {
|
||||
"disabled": true
|
||||
},
|
||||
"wtv-mail": {
|
||||
"disabled": true
|
||||
},
|
||||
"wtv-passport": {
|
||||
"disabled": true
|
||||
},
|
||||
"wtv-favorite": {
|
||||
"disabled": true
|
||||
},
|
||||
"wtv-admin": {
|
||||
"disabled": true
|
||||
},
|
||||
"wtv-author": {
|
||||
"disabled": true
|
||||
},
|
||||
"http": {
|
||||
"disabled": true
|
||||
},
|
||||
"https": {
|
||||
"disabled": true
|
||||
},
|
||||
"proto": {
|
||||
"disabled": true
|
||||
},
|
||||
"pb_services": {
|
||||
"disabled": true
|
||||
},
|
||||
"pc_services": {
|
||||
// PC Services
|
||||
"port": 1699,
|
||||
"pc_services": true,
|
||||
"disabled": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,5 +5,6 @@
|
||||
}
|
||||
],
|
||||
"settings": {
|
||||
"codeQL.createQuery.qlPackLocation": "/home/zefie/dev/zefie_wtvp_minisrv"
|
||||
}
|
||||
}
|
||||