fix DealerDemo and other stuff

This commit is contained in:
zefie
2022-02-13 00:15:52 -05:00
parent 445e28c91a
commit f32c4b1926
58 changed files with 372 additions and 58 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 779 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 875 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 875 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 875 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -210,42 +210,45 @@ if (request_headers['wtv-request-type'] == 'download') {
var wtv_download_list = new Array();
var newest_file_epoch = version;
Object.keys(diskmap_group_data.files).forEach(function (k) {
if (!diskmap_group_data.files[k].location) diskmap_group_data.files[k].location = wtvshared.makeSafePath(diskmap_group_data.location,diskmap_group_data.files[k].file.replace(diskmap_group_data.base, ""));
if (!diskmap_group_data.files[k].location) diskmap_group_data.files[k].location = wtvshared.makeSafePath(diskmap_group_data.location,diskmap_group_data.files[k].file.replace(diskmap_group_data.base, ""), true);
var diskmap_data_file = null;
Object.keys(service_vaults).forEach(function (g) {
if (diskmap_data_file != null) return;
diskmap_data_file = service_vaults[g] + "/" + service_name + "/" + diskmap_group_data.files[k].location;
console.log(diskmap_data_file)
if (!fs.existsSync(diskmap_data_file)) diskmap_data_file = null;
});
var diskmap_file_stat = fs.lstatSync(diskmap_data_file);
var diskmap_file_data = new Buffer.from(fs.readFileSync(diskmap_data_file, {
encoding: null,
flags: 'r'
}));
diskmap_group_data.files[k].base = diskmap_group_data.base;
diskmap_group_data.files[k].last_modified = (new Date(new Date(diskmap_file_stat.mtime).toUTCString()) / 1000);
diskmap_group_data.files[k].content_length = diskmap_file_stat.size;
diskmap_group_data.files[k].action = (diskmap_group_data.files[k].action) ? diskmap_group_data.files[k].action.toUpperCase() : "GET";
if (diskmap_data_file) {
var diskmap_file_stat = fs.lstatSync(diskmap_data_file);
var diskmap_file_data = new Buffer.from(fs.readFileSync(diskmap_data_file, {
encoding: null,
flags: 'r'
}));
diskmap_group_data.files[k].base = diskmap_group_data.base;
diskmap_group_data.files[k].last_modified = (new Date(new Date(diskmap_file_stat.mtime).toUTCString()) / 1000);
diskmap_group_data.files[k].content_length = diskmap_file_stat.size;
diskmap_group_data.files[k].action = (diskmap_group_data.files[k].action) ? diskmap_group_data.files[k].action.toUpperCase() : "GET";
// we need the checksum of the uncompressed data
if (wtvshared.getFileExt(diskmap_data_file).toLowerCase() == "gz") {
var gunzipped = zlib.gunzipSync(diskmap_file_data);
diskmap_group_data.files[k].checksum = CryptoJS.MD5(CryptoJS.lib.WordArray.create(gunzipped)).toString(CryptoJS.enc.Hex).toLowerCase();
var gzip_fn_end = diskmap_file_data.indexOf("\0", 10);
if (!diskmap_group_data.files[k].dont_extract_filename) {
diskmap_group_data.files[k].original_filename = diskmap_file_data.toString('utf8', 10, gzip_fn_end);
// we need the checksum of the uncompressed data
if (wtvshared.getFileExt(diskmap_data_file).toLowerCase() == "gz") {
var gunzipped = zlib.gunzipSync(diskmap_file_data);
diskmap_group_data.files[k].checksum = CryptoJS.MD5(CryptoJS.lib.WordArray.create(gunzipped)).toString(CryptoJS.enc.Hex).toLowerCase();
var gzip_fn_end = diskmap_file_data.indexOf("\0", 10);
if (!diskmap_group_data.files[k].dont_extract_filename) {
diskmap_group_data.files[k].original_filename = diskmap_file_data.toString('utf8', 10, gzip_fn_end);
}
diskmap_group_data.files[k].uncompressed_size = gunzipped.byteLength;
gunzipped = null;
} else {
diskmap_group_data.files[k].checksum = CryptoJS.MD5(CryptoJS.lib.WordArray.create(diskmap_file_data)).toString(CryptoJS.enc.Hex).toLowerCase();
}
diskmap_group_data.files[k].uncompressed_size = gunzipped.byteLength;
gunzipped = null;
} else {
diskmap_group_data.files[k].checksum = CryptoJS.MD5(CryptoJS.lib.WordArray.create(diskmap_file_data)).toString(CryptoJS.enc.Hex).toLowerCase();
if (parseInt(diskmap_group_data.files[k].last_modified) > newest_file_epoch) newest_file_epoch = parseInt(diskmap_group_data.files[k].last_modified);
diskmap_group_data.files[k].invalid = true;
wtv_download_list.push(diskmap_group_data.files[k]);
}
if (parseInt(diskmap_group_data.files[k].last_modified) > newest_file_epoch) newest_file_epoch = parseInt(diskmap_group_data.files[k].last_modified);
diskmap_group_data.files[k].invalid = true;
wtv_download_list.push(diskmap_group_data.files[k]);
});
// check to see if client says they have this version
diskmap_group_data.version = newest_file_epoch;

View File

@@ -46,8 +46,6 @@ novtilebg
nohtilebg
bgcolor=191919
text="AA9B4A" link=189cd6 vlink=189cd6 hspace=0 fontsize="large">
<LINK href="ROMCache/TopBackground_Classic.jpg" rel=next>
<LINK href="ROMCache/Community.gif" rel=next>
<LINK href="ROMCache/UtilityBullet.gif" rel=next>
<form action=/ValidateLogin enctype="x-www-form-encoded" method=post>
<input type="hidden" NAME="target-url" VALUE="">

View File

@@ -21,7 +21,7 @@ bgcolor=00292f
<table cellspacing=0 cellpadding=0>
<tr>
<td width=560 height=96 valign=top>
<table background="wtv-guide:/ROMCache/help/common/helpMastheadBlank.swf" width=560 height=96 cellspacing=0 cellpadding=0>
<table background="wtv-mail:/ROMCache/help/common/helpMastheadBlank.swf" width=560 height=96 cellspacing=0 cellpadding=0>
<tr>
<td width=107 height=96 valign=top rowspan=2>
<spacer type=vertical height=7><br>

View File

@@ -281,6 +281,7 @@ ${username}@${minisrv_config.config.service_name}
`;
Object.keys(message_list).forEach(function (k) {
var message = message_list[k];
if (typeof message.subject == "object" && message.subject) message.subject = wtvshared.decodeBufferText(message.subject);
var message_font_open = "<font color=#7A9FCC>";
var message_font_close = "</font>";
if (message.unread) {

View File

@@ -40,6 +40,7 @@ Location: wtv-mail:/listmail`;
headers = `200 OK
Content-type: text/html`;
if (typeof message.subject == "object" && message.subject) message.subject = wtvshared.decodeBufferText(message.subject);
data = `<wtvnoscript>
<sendpanel
action = "wtv-mail:/sendmail?message_forward_id=14&mailbox_name=inbox"
@@ -257,8 +258,7 @@ ${wtvshared.htmlEntitize(message.to_addr)} ${(message.to_name) ? '(' + wtvshared
<td nowrap valign=top>
Subject: <td>
<td>`;
if (typeof message.subject == "object") message.subject = new Buffer.from(message.subject).toString('latin1');
data += `
${(message.subject) ? wtvshared.htmlEntitize(message.subject) : '(No subject)'}
<tr>
@@ -278,7 +278,7 @@ ${wtvshared.htmlEntitize(message.body, true)}
<br>
<br>`;
if (message.signature) {
data += ssid_sessions[socket.ssid].mailstore.sanitizeSignature(message.signature);
data += wtvshared.sanitizeSignature(message.signature);
}
data += `<p>
`;

View File

@@ -61,7 +61,7 @@ Content-Type: audio/wav`;
} else {
var username = ssid_sessions[socket.ssid].getSessionData("subscriber_username");
var userdisplayname = html_entities.encode(ssid_sessions[socket.ssid].getSessionData("subscriber_name"));
var userdisplayname = wtvshared.htmlEntitize(ssid_sessions[socket.ssid].getSessionData("subscriber_name"));
var address = username + "@" + minisrv_config.config.service_name
var notImplementedAlert = new clientShowAlert({
'image': minisrv_config.config.service_logo,
@@ -413,7 +413,7 @@ vlink=#62B362
vspace=0
hspace=0>`;
if (ssid_sessions[socket.ssid].getSessionData("subscriber_signature") && ssid_sessions[socket.ssid].getSessionData("subscriber_signature") != "" && !no_signature) {
data += ssid_sessions[socket.ssid].mailstore.sanitizeSignature(ssid_sessions[socket.ssid].getSessionData("subscriber_signature"));
data += wtvshared.sanitizeSignature(ssid_sessions[socket.ssid].getSessionData("subscriber_signature"));
}
data += `
<td abswidth=2 bgcolor=#000000>