Update AppData--2.5-HE.zip from MattMan
- moved all viewergen data to ServiceDeps, outside of the requestable file path - Added "ServiceDeps" config option to specific the name of the ServiceDeps folder - Updated wtv-1800 tellyscript code accordingly
This commit is contained in:
BIN
zefie_wtvp_minisrv/ServiceDeps/viewergen/AppData--2.5-HE.zip
Normal file
BIN
zefie_wtvp_minisrv/ServiceDeps/viewergen/AppData--2.5-HE.zip
Normal file
Binary file not shown.
@@ -1,6 +1,8 @@
|
|||||||
var minisrv_service_file = true;
|
var minisrv_service_file = true;
|
||||||
var viewer = 2 // debug override
|
var viewer = 2 // debug override
|
||||||
|
|
||||||
|
var viewergen_resource_dir = __dirname + "/" + minisrv_config.config.ServiceDeps + "/viewergen/";
|
||||||
|
|
||||||
var viewers = {
|
var viewers = {
|
||||||
0: "WebTVIntel--1.0.exe",
|
0: "WebTVIntel--1.0.exe",
|
||||||
1: "WebTVIntel--1.1.exe",
|
1: "WebTVIntel--1.1.exe",
|
||||||
@@ -72,10 +74,10 @@ function getPatchDataType(type, invert = false) {
|
|||||||
function getResData(file) {
|
function getResData(file) {
|
||||||
var res_data = null;
|
var res_data = null;
|
||||||
if (file.substr(-2, 2).toLowerCase() == "gz") {
|
if (file.substr(-2, 2).toLowerCase() == "gz") {
|
||||||
var res_gz_data = fs.readFileSync(cwd + "/viewers/" + file);
|
var res_gz_data = fs.readFileSync(viewergen_resource_dir + file);
|
||||||
res_data = zlib.gunzipSync(res_gz_data);
|
res_data = zlib.gunzipSync(res_gz_data);
|
||||||
} else {
|
} else {
|
||||||
res_data = fs.readFileSync(cwd + "/viewers/" + file);
|
res_data = fs.readFileSync(viewergen_resource_dir + file);
|
||||||
}
|
}
|
||||||
return res_data;
|
return res_data;
|
||||||
}
|
}
|
||||||
@@ -318,7 +320,7 @@ function buildProfile(build) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var enable_full_hacktv = false;
|
var enable_full_hacktv = false;
|
||||||
if (fs.existsSync(cwd + path.sep + "viewers" + path.sep + "HackTV.zip")) {
|
if (fs.existsSync(viewergen_resource_dir + "HackTV.zip")) {
|
||||||
enable_full_hacktv = true;
|
enable_full_hacktv = true;
|
||||||
disksets['99'] = "HackTV.zip";
|
disksets['99'] = "HackTV.zip";
|
||||||
}
|
}
|
||||||
@@ -338,7 +340,7 @@ if (request_headers.query.viewer &&
|
|||||||
headers = errpage[0];
|
headers = errpage[0];
|
||||||
data = errpage[1];
|
data = errpage[1];
|
||||||
} else {
|
} else {
|
||||||
var viewer_gz_data = fs.readFileSync(cwd + "/viewers/" + viewer_file + ".gz");
|
var viewer_gz_data = fs.readFileSync(viewergen_resource_dir + viewer_file + ".gz");
|
||||||
var viewer_data = zlib.gunzipSync(viewer_gz_data);
|
var viewer_data = zlib.gunzipSync(viewer_gz_data);
|
||||||
var viewer_md5 = crypto.createHash('md5').update(viewer_data).digest("hex");
|
var viewer_md5 = crypto.createHash('md5').update(viewer_data).digest("hex");
|
||||||
if (viewer_md5 != viewer_stock_md5s[viewer_file]) {
|
if (viewer_md5 != viewer_stock_md5s[viewer_file]) {
|
||||||
@@ -378,13 +380,13 @@ Content-Disposition: attachment; filename="${viewer_file.replace(".exe", ".zip")
|
|||||||
zip.addZipComment("Viewer SSID: " + client_ssid);
|
zip.addZipComment("Viewer SSID: " + client_ssid);
|
||||||
zip.addFile(viewer_file, patched_file);
|
zip.addFile(viewer_file, patched_file);
|
||||||
if (!request_headers.query.viewer_only) {
|
if (!request_headers.query.viewer_only) {
|
||||||
var romset_zip = new AdmZip(cwd + "/viewers/" + viewer_file.replace(".exe", "").replace("WebTVIntel", "AppData") + ".zip");
|
var romset_zip = new AdmZip(viewergen_resource_dir + viewer_file.replace(".exe", "").replace("WebTVIntel", "AppData") + ".zip");
|
||||||
var zipEntries = romset_zip.getEntries();
|
var zipEntries = romset_zip.getEntries();
|
||||||
zipEntries.forEach(function (zipEntry) {
|
zipEntries.forEach(function (zipEntry) {
|
||||||
if (zipEntry.entryName == "Setup.bmp" && request_headers.query.logo) {
|
if (zipEntry.entryName == "Setup.bmp" && request_headers.query.logo) {
|
||||||
var logo_file = logos[parseInt(request_headers.query.logo) || 0];
|
var logo_file = logos[parseInt(request_headers.query.logo) || 0];
|
||||||
if (logo_file) {
|
if (logo_file) {
|
||||||
var logo_gz_data = fs.readFileSync(cwd + "/viewers/" + logo_file + ".gz");
|
var logo_gz_data = fs.readFileSync(viewergen_resource_dir + logo_file + ".gz");
|
||||||
var logo_data = zlib.gunzipSync(logo_gz_data);
|
var logo_data = zlib.gunzipSync(logo_gz_data);
|
||||||
zip.addFile(zipEntry.entryName, logo_data);
|
zip.addFile(zipEntry.entryName, logo_data);
|
||||||
} else {
|
} else {
|
||||||
@@ -397,7 +399,7 @@ Content-Disposition: attachment; filename="${viewer_file.replace(".exe", ".zip")
|
|||||||
if (request_headers.query.diskset) {
|
if (request_headers.query.diskset) {
|
||||||
var diskset_file = disksets[parseInt(request_headers.query.diskset) || 0];
|
var diskset_file = disksets[parseInt(request_headers.query.diskset) || 0];
|
||||||
if (diskset_file) {
|
if (diskset_file) {
|
||||||
var diskset_zip = new AdmZip(cwd + "/viewers/" + diskset_file);
|
var diskset_zip = new AdmZip(viewergen_resource_dir + diskset_file);
|
||||||
var zipEntries = diskset_zip.getEntries();
|
var zipEntries = diskset_zip.getEntries();
|
||||||
zipEntries.forEach(function (zipEntry) {
|
zipEntries.forEach(function (zipEntry) {
|
||||||
zip.addFile("Disk/" + zipEntry.entryName, zipEntry.getData());
|
zip.addFile("Disk/" + zipEntry.entryName, zipEntry.getData());
|
||||||
|
|||||||
Binary file not shown.
@@ -29,7 +29,7 @@ wtv-client-time-zone: GMT -0000
|
|||||||
wtv-client-time-dst-rule: GMT
|
wtv-client-time-dst-rule: GMT
|
||||||
wtv-client-date: `+ strftime("%a, %d %b %Y %H:%M:%S", new Date(new Date().toUTCString())) + ` GMT`;
|
wtv-client-date: `+ strftime("%a, %d %b %Y %H:%M:%S", new Date(new Date().toUTCString())) + ` GMT`;
|
||||||
|
|
||||||
var file_path = __dirname + "/ServiceDeps/wtv-1800/tellyscripts/bf0app/bf0app_WTV_18006138199.tok";
|
var file_path = __dirname + "/" + minisrv_config.config.ServiceDeps + "/wtv-1800/tellyscripts/bf0app/bf0app_WTV_18006138199.tok";
|
||||||
|
|
||||||
if (file_path) {
|
if (file_path) {
|
||||||
request_is_async = true;
|
request_is_async = true;
|
||||||
|
|||||||
@@ -77,22 +77,22 @@ if (session_data.data_store.wtvsec_login) {
|
|||||||
case "US-WEBSTAR-disk-0MB-16MB-softmodem-CPU5230":
|
case "US-WEBSTAR-disk-0MB-16MB-softmodem-CPU5230":
|
||||||
prereg_contype = "text/tellyscript";
|
prereg_contype = "text/tellyscript";
|
||||||
// if wtv-open-access: true then client expects OpenISP
|
// if wtv-open-access: true then client expects OpenISP
|
||||||
if (session_data.get("wtv-open-access")) file_path = __dirname + "/ServiceDeps/wtv-1800/tellyscripts/LC2/LC2_OpenISP_56k.tok";
|
if (session_data.get("wtv-open-access")) file_path = __dirname + "/" + minisrv_config.config.ServiceDeps + "/wtv-1800/tellyscripts/LC2/LC2_OpenISP_56k.tok";
|
||||||
else var file_path = __dirname + "/ServiceDeps/wtv-1800/tellyscripts/LC2/LC2_WTV_18006138199.tok";
|
else var file_path = __dirname + "/" + minisrv_config.config.ServiceDeps + "/wtv-1800/tellyscripts/LC2/LC2_WTV_18006138199.tok";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "US-DTV-disk-0MB-32MB-softmodem-CPU5230":
|
case "US-DTV-disk-0MB-32MB-softmodem-CPU5230":
|
||||||
if (wtvshared.isMiniBrowser(session_data)) {
|
if (wtvshared.isMiniBrowser(session_data)) {
|
||||||
prereg_contype = "text/tellyscript";
|
prereg_contype = "text/tellyscript";
|
||||||
if (session_data.get("wtv-open-access")) file_path = __dirname + "/ServiceDeps/wtv-1800/tellyscripts/LC2/LC2_OpenISP_56k.tok";
|
if (session_data.get("wtv-open-access")) file_path = __dirname + "/" + minisrv_config.config.ServiceDeps + "/wtv-1800/tellyscripts/LC2/LC2_OpenISP_56k.tok";
|
||||||
else file_path = __dirname + "/ServiceDeps/wtv-1800/tellyscripts/LC2/LC2_WTV_18006138199.tok";
|
else file_path = __dirname + "/" + minisrv_config.config.ServiceDeps + "/wtv-1800/tellyscripts/LC2/LC2_WTV_18006138199.tok";
|
||||||
} else {
|
} else {
|
||||||
prereg_contype = "text/dialscript";
|
prereg_contype = "text/dialscript";
|
||||||
if (session_data.get("wtv-lan") == "true") {
|
if (session_data.get("wtv-lan") == "true") {
|
||||||
file_path = __dirname + "/ServiceDeps/wtv-1800/tellyscripts/UTV/utv_hsd.tok";
|
file_path = __dirname + "/" + minisrv_config.config.ServiceDeps + "/wtv-1800/tellyscripts/UTV/utv_hsd.tok";
|
||||||
} else {
|
} else {
|
||||||
// todo OpenISP telly
|
// todo OpenISP telly
|
||||||
file_path = __dirname + "/ServiceDeps/wtv-1800/tellyscripts/UTV/utv_normal.tok";
|
file_path = __dirname + "/" + minisrv_config.config.ServiceDeps + "/wtv-1800/tellyscripts/UTV/utv_normal.tok";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -100,8 +100,8 @@ if (session_data.data_store.wtvsec_login) {
|
|||||||
case "bf0app":
|
case "bf0app":
|
||||||
prereg_contype = "text/tellyscript";
|
prereg_contype = "text/tellyscript";
|
||||||
// if wtv-open-access: true then client expects OpenISP
|
// if wtv-open-access: true then client expects OpenISP
|
||||||
if (session_data.get("wtv-open-access")) file_path = __dirname + "/ServiceDeps/wtv-1800/tellyscripts/bf0app/bf0app_OISP.tok";
|
if (session_data.get("wtv-open-access")) file_path = __dirname + "/" + minisrv_config.config.ServiceDeps + "/wtv-1800/tellyscripts/bf0app/bf0app_OISP.tok";
|
||||||
else file_path = __dirname + "/ServiceDeps/wtv-1800/tellyscripts/bf0app/bf0app_WTV_18006138199.tok";
|
else file_path = __dirname + "/" + minisrv_config.config.ServiceDeps + "/wtv-1800/tellyscripts/bf0app/bf0app_WTV_18006138199.tok";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// the following are not yet zefie generated and may have an unknown username/password attached
|
// the following are not yet zefie generated and may have an unknown username/password attached
|
||||||
@@ -109,8 +109,8 @@ if (session_data.data_store.wtvsec_login) {
|
|||||||
case "JP-Fiji":
|
case "JP-Fiji":
|
||||||
prereg_contype = "text/tellyscript";
|
prereg_contype = "text/tellyscript";
|
||||||
// if wtv-open-access: true then client expects OpenISP
|
// if wtv-open-access: true then client expects OpenISP
|
||||||
if (session_data.get("wtv-open-access")) var file_path = __dirname + "/ServiceDeps/wtv-1800/tellyscripts/FIJI/dc_production_normal.tok";
|
if (session_data.get("wtv-open-access")) var file_path = __dirname + "/" + minisrv_config.config.ServiceDeps + "/wtv-1800/tellyscripts/FIJI/dc_production_normal.tok";
|
||||||
else var file_path = __dirname + "/ServiceDeps/wtv-1800/tellyscripts/FIJI/dc_production_normal.tok";
|
else var file_path = __dirname + "/" + minisrv_config.config.ServiceDeps + "/wtv-1800/tellyscripts/FIJI/dc_production_normal.tok";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -120,7 +120,7 @@ if (session_data.data_store.wtvsec_login) {
|
|||||||
|
|
||||||
if (socket.ssid.substr(0, 8) == "MSTVSIMU") {
|
if (socket.ssid.substr(0, 8) == "MSTVSIMU") {
|
||||||
prereg_contype = "text/dialscript";
|
prereg_contype = "text/dialscript";
|
||||||
var file_path = __dirname + "/ServiceDeps/wtv-1800/tellyscripts/UTV/utv_hsd.tok";
|
var file_path = __dirname + "/" + minisrv_config.config.ServiceDeps + "/wtv-1800/tellyscripts/UTV/utv_hsd.tok";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -129,7 +129,7 @@ if (session_data.data_store.wtvsec_login) {
|
|||||||
// assume old classic in flash mode, override user setting and send tellyscript
|
// assume old classic in flash mode, override user setting and send tellyscript
|
||||||
// because it is required to proceed in flash mode
|
// because it is required to proceed in flash mode
|
||||||
prereg_contype = "text/tellyscript";
|
prereg_contype = "text/tellyscript";
|
||||||
var file_path = __dirname + "/ServiceDeps/wtv-1800/tellyscripts/bf0app/bf0app_WTV_18006138199.tok";
|
var file_path = __dirname + "/" + minisrv_config.config.ServiceDeps + "/wtv-1800/tellyscripts/bf0app/bf0app_WTV_18006138199.tok";
|
||||||
var bf0app_update = true;
|
var bf0app_update = true;
|
||||||
session_data.set("bf0app_update", bf0app_update);
|
session_data.set("bf0app_update", bf0app_update);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"UserServiceVault",
|
"UserServiceVault",
|
||||||
"ServiceVault"
|
"ServiceVault"
|
||||||
],
|
],
|
||||||
|
"ServiceDeps": "ServiceDeps",
|
||||||
"SessionStore": "SessionStore",
|
"SessionStore": "SessionStore",
|
||||||
"SharedROMCache": "SharedROMCache",
|
"SharedROMCache": "SharedROMCache",
|
||||||
"enable_shared_romcache": true,
|
"enable_shared_romcache": true,
|
||||||
|
|||||||
Reference in New Issue
Block a user