diff --git a/zefie_wtvp_minisrv/app.js b/zefie_wtvp_minisrv/app.js
index df34cd34..fdab7442 100644
--- a/zefie_wtvp_minisrv/app.js
+++ b/zefie_wtvp_minisrv/app.js
@@ -1,9 +1,8 @@
'use strict';
const path = require('path');
-var classPath = __dirname + path.sep + "includes" + path.sep + "classes" + path.sep;
+var classPath = path.resolve(__dirname + path.sep + "includes" + path.sep + "classes" + path.sep) + path.sep;
const { WTVShared, clientShowAlert } = require(classPath + "WTVShared.js");
const wtvshared = new WTVShared(); // creates minisrv_config
-classPath = wtvshared.getAbsolutePath(classPath, __dirname);
const fs = require('fs');
const tls = require('tls');
@@ -337,7 +336,7 @@ var runScriptInVM = function (script_data, user_contextObj = {}, privileged = fa
"breakOnSigint": true
});
} catch (e) {
- console.error(e);
+ throw e;
}
// unload any loaded modules for this vm
@@ -382,7 +381,7 @@ async function processPath(socket, service_vault_file_path, request_headers = ne
}
var privileged = false;
if (minisrv_config.services[service_name]) privileged = (minisrv_config.services[service_name].privileged) ? true : false;
- else if (pc_services) privileged = (minisrv_config.services['pc_services'].privileged) ? true : false;
+ else if (pc_services) privileged = (minisrv_config.services[pc_service_name].privileged) ? true : false;
if (privileged) {
updateFromVM.push(["ssid_sessions", "ssid_sessions"]); // global ssid_sessions object for privileged service scripts, such as wtv-setup, wtv-head-waiter, etc
@@ -440,6 +439,7 @@ async function processPath(socket, service_vault_file_path, request_headers = ne
contextObj.cwd = service_vault_file_path.substr(0, service_vault_file_path.lastIndexOf(path.sep));
}
+
if (file_exists && !is_dir) {
// file exists, read it and return it
service_vault_found = true;
@@ -616,7 +616,7 @@ async function processPath(socket, service_vault_file_path, request_headers = ne
headers = errpage[0];
data = errpage[1];
if (pc_services) {
- if (minisrv_config.services[real_service_name].show_verbose_errors)
+ if (minisrv_config.services[pc_service_name].show_verbose_errors)
data += "
The interpreter said:
" + e.stack + ""; } console.error(" * Scripting error:", e); @@ -2043,7 +2043,7 @@ if (!minisrv_config) { var service_vaults = new Array(); if (minisrv_config.config.ServiceVaults) { Object.keys(minisrv_config.config.ServiceVaults).forEach(function (k) { - var service_vault = wtvshared.returnAbsolutePath(minisrv_config.config.ServiceVaults[k]); + var service_vault = wtvshared.getAbsolutePath(minisrv_config.config.ServiceVaults[k]); service_vaults.push(service_vault); console.log(" * Configured Service Vault at", service_vault, "with priority", (parseInt(k) + 1)); }) @@ -2054,7 +2054,7 @@ if (minisrv_config.config.ServiceVaults) { var service_deps = new Array(); if (minisrv_config.config.ServiceDeps) { Object.keys(minisrv_config.config.ServiceDeps).forEach(function (k) { - var service_dep = wtvshared.returnAbsolutePath(minisrv_config.config.ServiceDeps[k]); + var service_dep = wtvshared.getAbsolutePath(minisrv_config.config.ServiceDeps[k]); service_deps.push(service_dep); console.log(" * Configured Service Dependencies at", service_dep, "with priority", (parseInt(k) + 1)); }) @@ -2063,7 +2063,7 @@ if (minisrv_config.config.ServiceDeps) { } if (minisrv_config.config.SessionStore) { - var SessionStore = wtvshared.returnAbsolutePath(minisrv_config.config.SessionStore); + var SessionStore = wtvshared.getAbsolutePath(minisrv_config.config.SessionStore); console.log(" * Configured Session Storage at", SessionStore); } else { throw ("ERROR: No Session Storage Directory (SessionStore) defined!"); diff --git a/zefie_wtvp_minisrv/includes/ServiceDeps/wtv-tricks/benchmark.jpg b/zefie_wtvp_minisrv/includes/ServiceDeps/wtv-tricks/benchmark.jpg new file mode 100644 index 00000000..255074bc Binary files /dev/null and b/zefie_wtvp_minisrv/includes/ServiceDeps/wtv-tricks/benchmark.jpg differ diff --git a/zefie_wtvp_minisrv/includes/ServiceVault/SharedROMCache/h.js b/zefie_wtvp_minisrv/includes/ServiceVault/SharedROMCache/h.js index c933eda1..81f52f07 100644 --- a/zefie_wtvp_minisrv/includes/ServiceVault/SharedROMCache/h.js +++ b/zefie_wtvp_minisrv/includes/ServiceVault/SharedROMCache/h.js @@ -9,7 +9,7 @@ cch=rom+'Cache/' rch='/ROMCache/' thm=rch+'Themes/' thi=thm+'Images/' -thb=thm+'Borders/' +thb=rom+'Borders/' th=0 @@ -32,13 +32,13 @@ function gTC(type,itm){ case 1://dark bgclr='191919' tclr='42bd52' - bbif = rom + 'ButtonBorder2' + bbif = thb+'ButtonBorder2' break case 2://red bgclr='6e0005' tclr='f0f0f0' bclr='f0f0f0' - bbif = rom + 'ButtonBorder2' + bbif = thb+'ButtonBorder2' break case 3://basic bgclr='cccccc' @@ -59,7 +59,7 @@ function gTC(type,itm){ case 5://green bgclr='004422' tclr='f0f0f0' - bbif = rom + 'ButtonBorder2' + bbif = thb+'ButtonBorder2' break case 6://blue bgclr='002244' @@ -68,7 +68,7 @@ function gTC(type,itm){ vclr='0080ff' shimg='' gclr='004488' - bbif = rom + 'ButtonBorder2' + bbif = thb+'ButtonBorder2' break case 7://teal bgclr='008080' @@ -80,12 +80,12 @@ function gTC(type,itm){ bgclr='4a2766' lclr='aaaaaa' shimg='ShadowLogo8.gif' - bbif=rom+'ButtonBorder2' + bbif = thb+'ButtonBorder2' break case 9://brown bgclr='442200' tclr='e7ce4a' - bbif = rom + 'ButtonBorder2' + bbif = thb+'ButtonBorder2' break case 10://white bgclr='c9c9c9' @@ -98,7 +98,7 @@ function gTC(type,itm){ case 11://halloween bgclr='080808' tclr='c06000' - bbif = rom + 'ButtonBorder2' + bbif = thb+'ButtonBorder2' break }switch(type){ case 'bg':return bgclr @@ -187,6 +187,7 @@ function ta(r,s,n,b,c,x,u){ d.write(''); if(u){d.write('')} } + function as(bg,h,w,g,b,lc,rc,lo,ro,s){ if(s){ if(!lc){lc=gTC('t')} diff --git a/zefie_wtvp_minisrv/includes/ServiceVault/SharedROMCache/n.js b/zefie_wtvp_minisrv/includes/ServiceVault/SharedROMCache/n.js index 024bda21..f1cd2056 100644 --- a/zefie_wtvp_minisrv/includes/ServiceVault/SharedROMCache/n.js +++ b/zefie_wtvp_minisrv/includes/ServiceVault/SharedROMCache/n.js @@ -2,7 +2,7 @@ z_nv=null; z_th=new Array() z_th[0]='HackTV Light' z_th[1]='WebTV Dark' -z_th[2]='Avegee Red' +z_th[2]='Amy
+Welcome to the zefie minisrv v${minisrv_config.version} Account Administration +
+`; + data = htmlhead; + if (!request_headers.query.cmd) { + data += `Please select an option to get started: +| ${accounts[k][0]} | ${(accounts[k][1]['username'] === undefined) ? "Unregistered SSID" : accounts[k][1]['username'] } |
Management for SSID: ${ssid}
`; + data += `|
Redesigned home page, uses custom rom theme system. Added Protoweb Support (Try it!) - Added a WebTV Character Map - Redesigned homepage based on MattMan69's HackTV Added a new minisrv logo |
| + | ||
| + | ☎ + | |
| + | &rate; + | |
| + | &modem; + | |
| + | ||
| + | ${image_size_kb} KBytes + | |
| + | ${new Date(start_time).toISOString().replace('T', ' ').substr(0, 19)} + | |
| + | ${new Date(end_time).toISOString().replace('T', ' ').substr(0, 19)} + | |
| + | ${parseFloat(download_time / 1000).toFixed(1)} seconds + | |
| + | ${throughput} bytes/sec + + |
+
+Re-Test +