commit e122e7a6ae21afacac17803e9f2243b489cc1b42
Author: sysadmin
Date: Sat Jul 29 20:32:17 2023 +0200
Initial commit
diff --git a/.dirimages/archive.png b/.dirimages/archive.png
new file mode 100644
index 0000000..3ebc995
Binary files /dev/null and b/.dirimages/archive.png differ
diff --git a/.dirimages/audio.png b/.dirimages/audio.png
new file mode 100644
index 0000000..5b6d4c5
Binary files /dev/null and b/.dirimages/audio.png differ
diff --git a/.dirimages/bad.png b/.dirimages/bad.png
new file mode 100644
index 0000000..115fb0e
Binary files /dev/null and b/.dirimages/bad.png differ
diff --git a/.dirimages/css.png b/.dirimages/css.png
new file mode 100644
index 0000000..753b7c4
Binary files /dev/null and b/.dirimages/css.png differ
diff --git a/.dirimages/directory.png b/.dirimages/directory.png
new file mode 100644
index 0000000..9dcd620
Binary files /dev/null and b/.dirimages/directory.png differ
diff --git a/.dirimages/diskimage.png b/.dirimages/diskimage.png
new file mode 100644
index 0000000..4306ca2
Binary files /dev/null and b/.dirimages/diskimage.png differ
diff --git a/.dirimages/fifo.png b/.dirimages/fifo.png
new file mode 100644
index 0000000..79a24f7
Binary files /dev/null and b/.dirimages/fifo.png differ
diff --git a/.dirimages/font.png b/.dirimages/font.png
new file mode 100644
index 0000000..58942e9
Binary files /dev/null and b/.dirimages/font.png differ
diff --git a/.dirimages/html.png b/.dirimages/html.png
new file mode 100644
index 0000000..0bd2993
Binary files /dev/null and b/.dirimages/html.png differ
diff --git a/.dirimages/hwdevice.png b/.dirimages/hwdevice.png
new file mode 100644
index 0000000..3310396
Binary files /dev/null and b/.dirimages/hwdevice.png differ
diff --git a/.dirimages/image.png b/.dirimages/image.png
new file mode 100644
index 0000000..5c9d726
Binary files /dev/null and b/.dirimages/image.png differ
diff --git a/.dirimages/important.png b/.dirimages/important.png
new file mode 100644
index 0000000..b68e876
Binary files /dev/null and b/.dirimages/important.png differ
diff --git a/.dirimages/javascript.png b/.dirimages/javascript.png
new file mode 100644
index 0000000..3392699
Binary files /dev/null and b/.dirimages/javascript.png differ
diff --git a/.dirimages/other.png b/.dirimages/other.png
new file mode 100644
index 0000000..29c53a3
Binary files /dev/null and b/.dirimages/other.png differ
diff --git a/.dirimages/php.png b/.dirimages/php.png
new file mode 100644
index 0000000..93e9834
Binary files /dev/null and b/.dirimages/php.png differ
diff --git a/.dirimages/return.png b/.dirimages/return.png
new file mode 100644
index 0000000..83e9a2a
Binary files /dev/null and b/.dirimages/return.png differ
diff --git a/.dirimages/socket.png b/.dirimages/socket.png
new file mode 100644
index 0000000..19bc9ca
Binary files /dev/null and b/.dirimages/socket.png differ
diff --git a/.dirimages/text.png b/.dirimages/text.png
new file mode 100644
index 0000000..fc4cd51
Binary files /dev/null and b/.dirimages/text.png differ
diff --git a/.dirimages/video.png b/.dirimages/video.png
new file mode 100644
index 0000000..8d44d54
Binary files /dev/null and b/.dirimages/video.png differ
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..86e6d90
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+node_modules
+commit.sh
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..ded992d
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 DorianTech S.A.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/config.json b/config.json
new file mode 100644
index 0000000..9090fe9
--- /dev/null
+++ b/config.json
@@ -0,0 +1,86 @@
+{
+ "users": [],
+ "port": 80,
+ "pubport": 80,
+ "page404": "404.html",
+ "timestamp": 1680954429282,
+ "blacklist": [],
+ "nonStandardCodes": [],
+ "enableCompression": true,
+ "customHeaders": {},
+ "enableHTTP2": false,
+ "enableLogging": true,
+ "enableDirectoryListing": true,
+ "enableDirectoryListingWithDefaultHead": false,
+ "serverAdministratorEmail": "[no contact information]",
+ "stackHidden": false,
+ "enableRemoteLogBrowsing": true,
+ "exposeServerVersion": true,
+ "disableServerSideScriptExpose": false,
+ "rewriteMap": [
+ {
+ "definingRegex": "/\\/invoke500\\/\\?/",
+ "replacements": [
+ {
+ "regex": "/\\/invoke500\\/\\?/",
+ "replacement": "/invoke500.svr?"
+ }
+ ]
+ },
+ {
+ "definingRegex": "/\\/invoke500\\/.+\\//",
+ "replacements": [
+ {
+ "regex": "/\\/\\?/",
+ "replacement": "&"
+ },
+ {
+ "regex": "/invoke500\\//",
+ "replacement": "invoke500.svr?"
+ },
+ {
+ "regex": "/\\/(?!invoke500.svr?)/",
+ "replacement": ""
+ }
+ ]
+ },
+ {
+ "definingRegex": "/\\/invoke500\\/.+/",
+ "replacements": [
+ {
+ "regex": "/\\?/",
+ "replacement": "&"
+ },
+ {
+ "regex": "/invoke500\\//",
+ "replacement": "invoke500.svr?"
+ }
+ ]
+ },
+ {
+ "definingRegex": "/\\/invoke500\\//",
+ "replacements": [
+ {
+ "regex": "/\\/invoke500\\//",
+ "replacement": "/invoke500.svr"
+ }
+ ]
+ },
+ {
+ "definingRegex": "/\\/invoke500$/",
+ "replacements": [
+ {
+ "regex": "/\\/invoke500/",
+ "replacement": "/invoke500.svr"
+ }
+ ]
+ }
+ ],
+ "allowStatus": true,
+ "dontCompress": ["/.*\\.ipxe$/","/.*\\.img$/","/.*\\.iso$/"],
+ "enableIPSpoofing": false,
+ "secure": false,
+ "sni": {},
+ "disableNonEncryptedServer": false,
+ "disableToHTTPSRedirect": false
+}
diff --git a/favicon.ico b/favicon.ico
new file mode 100644
index 0000000..c5d08a7
Binary files /dev/null and b/favicon.ico differ
diff --git a/hexstrbase64/fail.png b/hexstrbase64/fail.png
new file mode 100644
index 0000000..bbebb5d
Binary files /dev/null and b/hexstrbase64/fail.png differ
diff --git a/hexstrbase64/hexstrbase64/base64.js b/hexstrbase64/hexstrbase64/base64.js
new file mode 100644
index 0000000..a995d36
--- /dev/null
+++ b/hexstrbase64/hexstrbase64/base64.js
@@ -0,0 +1,124 @@
+//Base64.js for hexstrbase64 library for Node.js
+/*
+ * Copyright (c) 2012 Miles Shang
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * Usage:
+ * Set your settings:
+ * base64.settings.char62 = "-";
+ * base64.settings.char63 = "_";
+ * etc.
+ *
+ * Then:
+ * base64.encode(str) takes a string and returns the base64 encoding of it.
+ * base64.decode(str) does the reverse.
+ */
+
+/* TODO:
+ * Add a "padding_mandatory" flag to check for bad padding in the decoder.
+ * Add test cases that throw errors.
+ */
+
+var base64 = new Object();
+
+base64.settings = { // defaults
+ "char62" : "+",
+ "char63" : "/",
+ "pad" : "=",
+ "ascii" : false
+};
+
+/*
+ * Settings:
+ * If "pad" is not null or undefined, then it will be used for encoding.
+ *
+ * If "ascii" is set to true, then the encoder
+ * will assume that plaintext is in 8-bit chars (the standard).
+ * In this case, for every 3 chars in plaintext, you get 4 chars of base64.
+ * Any non-8-bit chars will cause an error.
+ * Otherwise, assume that all plaintext can be in the full range
+ * of Javascript chars, i.e. 16 bits. Get 8 chars of base64 for 3 chars
+ * of plaintext. Any possible JS string can be encoded.
+ */
+
+base64.encode = function (str) {
+ this.char_set =
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
+ + this.settings.char62 + this.settings.char63;
+
+ var output = ""; // final output
+ var buf = ""; // binary buffer
+ for (var i = 0; i < str.length; ++i) {
+ var c_num = str.charCodeAt(i);
+ if (this.settings.ascii)
+ if (c_num >= 256)
+ throw "Not an 8-bit char.";
+ var c_bin = c_num.toString(2);
+ while (c_bin.length < (this.settings.ascii ? 8 : 16))
+ c_bin = "0" + c_bin;
+ buf += c_bin;
+
+ while (buf.length >= 6) {
+ var sextet = buf.slice(0, 6);
+ buf = buf.slice(6);
+ output += this.char_set.charAt(parseInt(sextet, 2));
+ }
+ }
+
+ if (buf) { // not empty
+ while (buf.length < 6) buf += "0";
+ output += this.char_set.charAt(parseInt(buf, 2));
+ }
+
+ if (this.settings.pad)
+ while (output.length % (this.settings.ascii ? 4 : 8) != 0)
+ output += this.settings.pad;
+
+ return output;
+}
+
+base64.decode = function (str) {
+ this.char_set =
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
+ + this.settings.char62 + this.settings.char63;
+
+ var output = ""; // final output
+ var buf = ""; // binary buffer
+ var bits = (this.settings.ascii ? 8 : 16);
+ for (var i = 0; i < str.length; ++i) {
+ if (str[i] == this.settings.pad) break;
+ var c_num = this.char_set.indexOf(str.charAt(i));
+ if (c_num == -1) throw "Not base64.";
+ var c_bin = c_num.toString(2);
+ while (c_bin.length < 6) c_bin = "0" + c_bin;
+ buf += c_bin;
+
+ while (buf.length >= bits) {
+ var octet = buf.slice(0, bits);
+ buf = buf.slice(bits);
+ output += String.fromCharCode(parseInt(octet, 2));
+ }
+ }
+ return output;
+}
+module.exports = base64;
\ No newline at end of file
diff --git a/hexstrbase64/hexstrbase64/base64_browser.js b/hexstrbase64/hexstrbase64/base64_browser.js
new file mode 100644
index 0000000..44dec66
--- /dev/null
+++ b/hexstrbase64/hexstrbase64/base64_browser.js
@@ -0,0 +1,123 @@
+//Base64.js for hexstrbase64 library for browser
+/*
+ * Copyright (c) 2012 Miles Shang
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * Usage:
+ * Set your settings:
+ * base64.settings.char62 = "-";
+ * base64.settings.char63 = "_";
+ * etc.
+ *
+ * Then:
+ * base64.encode(str) takes a string and returns the base64 encoding of it.
+ * base64.decode(str) does the reverse.
+ */
+
+/* TODO:
+ * Add a "padding_mandatory" flag to check for bad padding in the decoder.
+ * Add test cases that throw errors.
+ */
+
+var base64 = new Object();
+
+base64.settings = { // defaults
+ "char62" : "+",
+ "char63" : "/",
+ "pad" : "=",
+ "ascii" : false
+};
+
+/*
+ * Settings:
+ * If "pad" is not null or undefined, then it will be used for encoding.
+ *
+ * If "ascii" is set to true, then the encoder
+ * will assume that plaintext is in 8-bit chars (the standard).
+ * In this case, for every 3 chars in plaintext, you get 4 chars of base64.
+ * Any non-8-bit chars will cause an error.
+ * Otherwise, assume that all plaintext can be in the full range
+ * of Javascript chars, i.e. 16 bits. Get 8 chars of base64 for 3 chars
+ * of plaintext. Any possible JS string can be encoded.
+ */
+
+base64.encode = function (str) {
+ this.char_set =
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
+ + this.settings.char62 + this.settings.char63;
+
+ var output = ""; // final output
+ var buf = ""; // binary buffer
+ for (var i = 0; i < str.length; ++i) {
+ var c_num = str.charCodeAt(i);
+ if (this.settings.ascii)
+ if (c_num >= 256)
+ throw "Not an 8-bit char.";
+ var c_bin = c_num.toString(2);
+ while (c_bin.length < (this.settings.ascii ? 8 : 16))
+ c_bin = "0" + c_bin;
+ buf += c_bin;
+
+ while (buf.length >= 6) {
+ var sextet = buf.slice(0, 6);
+ buf = buf.slice(6);
+ output += this.char_set.charAt(parseInt(sextet, 2));
+ }
+ }
+
+ if (buf) { // not empty
+ while (buf.length < 6) buf += "0";
+ output += this.char_set.charAt(parseInt(buf, 2));
+ }
+
+ if (this.settings.pad)
+ while (output.length % (this.settings.ascii ? 4 : 8) != 0)
+ output += this.settings.pad;
+
+ return output;
+}
+
+base64.decode = function (str) {
+ this.char_set =
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
+ + this.settings.char62 + this.settings.char63;
+
+ var output = ""; // final output
+ var buf = ""; // binary buffer
+ var bits = (this.settings.ascii ? 8 : 16);
+ for (var i = 0; i < str.length; ++i) {
+ if (str[i] == this.settings.pad) break;
+ var c_num = this.char_set.indexOf(str.charAt(i));
+ if (c_num == -1) throw "Not base64.";
+ var c_bin = c_num.toString(2);
+ while (c_bin.length < 6) c_bin = "0" + c_bin;
+ buf += c_bin;
+
+ while (buf.length >= bits) {
+ var octet = buf.slice(0, bits);
+ buf = buf.slice(bits);
+ output += String.fromCharCode(parseInt(octet, 2));
+ }
+ }
+ return output;
+}
\ No newline at end of file
diff --git a/hexstrbase64/hexstrbase64/main.js b/hexstrbase64/hexstrbase64/main.js
new file mode 100644
index 0000000..4f3d12d
--- /dev/null
+++ b/hexstrbase64/hexstrbase64/main.js
@@ -0,0 +1,129 @@
+//Requires base64
+var base64 = require('./base64.js');
+var HexStrBase64Buffer = {
+ from: function(s, e) {
+ var type = e;
+ var value = '';
+ if (e == 'base64') {
+ value = base64.decode(s);
+ } else if (e == 'hex') {
+ try {
+ var escaped = "";
+ var hex = "";
+ if(s.length%4 > 0) {
+ for(i=0;i<(4-(s.length%4));i++) {
+ hex += "0";
+ }
+ }
+ hex += s;
+ for(var i = 0;i 4) {
+ result += hex.substring(hex.length-5,hex.length-1);
+ } else if(hex.length < 4) {
+ for(var j=0;j<=4-(hex.length%4);j++) {
+ result += "0";
+ }
+ result += hex;
+ }
+ }
+ return result.split("undefined").join("").split("%").join("");
+ } else {
+ //return Buffer.from(value, type).toString(en);
+ return Buffer.from(value,"utf8").toString(en);
+ }
+ }
+ //}
+ //function toString(en) {
+ //return toStringE(en,type);
+ //}
+ return { type: type, value: value, toString: toString };
+ }
+};
+var hexstrbase64 = {
+ strtobase64: function(s) {
+ return HexStrBase64Buffer.from(s, 'utf8').toString('base64');
+ },
+ base64tostr: function(b) {
+ return HexStrBase64Buffer.from(b, 'base64').toString('utf8');
+ },
+ strtohex: function(s) {
+ return HexStrBase64Buffer.from(s, 'utf8').toString('hex');
+ },
+ hextostr: function(h) {
+ return HexStrBase64Buffer.from(h, 'hex').toString('utf8');
+ },
+ hextobase64: function(h) {
+ return hexstrbase64.strtobase64(hexstrbase64.hextostr(h));
+ },
+ base64tohex: function(b) {
+ return hexstrbase64.strtohex(hexstrbase64.base64tostr(b));
+ },
+ cipher: function() {
+ this.strtobase64 = hexstrbase64.strtobase64;
+ this.base64tostr = hexstrbase64.base64tostr;
+ this.strtohex = hexstrbase64.strtohex;
+ this.hextostr = hexstrbase64.hextostr;
+ this.hextobase64 = hextobase64.hextobase64;
+ this.base64tohex = hextobase64.base64tohex;
+ },
+ native: {
+ btoa: function(b) {
+ return hexstrbase64.strtobase64(b);
+ },
+ atob: function(a) {
+ return hexstrbase64.base64tostr(a);
+ }
+ }
+};
+module.exports = hexstrbase64;
\ No newline at end of file
diff --git a/hexstrbase64/hexstrbase64/main_browser.js b/hexstrbase64/hexstrbase64/main_browser.js
new file mode 100644
index 0000000..a2b4531
--- /dev/null
+++ b/hexstrbase64/hexstrbase64/main_browser.js
@@ -0,0 +1,126 @@
+//Requires base64_browser.js
+var HexStrBase64Buffer = {
+ from: function(s, e) {
+ var type = e;
+ var value = '';
+ if (e == 'base64') {
+ value = base64.decode(s);
+ } else if (e == 'hex') {
+ try {
+ var escaped = "";
+ var hex = "";
+ if(s.length%4 > 0) {
+ for(i=0;i<(4-(s.length%4));i++) {
+ hex += "0";
+ }
+ }
+ hex += s;
+ for(var i = 0;i 4) {
+ result += hex.substring(hex.length-5,hex.length-1);
+ } else if(hex.length < 4) {
+ for(var j=0;j<=4-(hex.length%4);j++) {
+ result += "0";
+ }
+ result += hex;
+ }
+ }
+ return result.split("undefined").join("").split("%").join("");
+ } else {
+ //return new TextDecoder(en).decode(new TextEncoder(type).encode(value));
+ return new TextDecoder(en).decode(new TextEncoder("utf8").encode(value));
+ }
+ }
+ //function toString(en) {
+ //return toStringE(en,type);
+ //}
+ return { type: type, value: value, toString: toString };
+ }
+};
+var hexstrbase64 = {
+ strtobase64: function(s) {
+ return HexStrBase64Buffer.from(s, 'utf8').toString('base64');
+ },
+ base64tostr: function(b) {
+ return HexStrBase64Buffer.from(b, 'base64').toString('utf8');
+ },
+ strtohex: function(s) {
+ return HexStrBase64Buffer.from(s, 'utf8').toString('hex');
+ },
+ hextostr: function(h) {
+ return HexStrBase64Buffer.from(h, 'hex').toString('utf8');
+ },
+ hextobase64: function(h) {
+ return hexstrbase64.strtobase64(hexstrbase64.hextostr(h));
+ },
+ base64tohex: function(b) {
+ return hexstrbase64.strtohex(hexstrbase64.base64tostr(b));
+ },
+ cipher: function() {
+ this.strtobase64 = hexstrbase64.strtobase64;
+ this.base64tostr = hexstrbase64.base64tostr;
+ this.strtohex = hexstrbase64.strtohex;
+ this.hextostr = hexstrbase64.hextostr;
+ this.hextobase64 = hextobase64.hextobase64;
+ this.base64tohex = hextobase64.base64tohex;
+ },
+ native: {
+ btoa: function(b) {
+ return hexstrbase64.strtobase64(b);
+ },
+ atob: function(a) {
+ return hexstrbase64.base64tostr(a);
+ }
+ }
+};
\ No newline at end of file
diff --git a/hexstrbase64/index.js b/hexstrbase64/index.js
new file mode 100644
index 0000000..4ec8879
--- /dev/null
+++ b/hexstrbase64/index.js
@@ -0,0 +1,11 @@
+let hexstrbase64 = require("./hexstrbase64/main.js");
+function decodeBase(b) {
+ return hexstrbase64.native.atob(b);
+}
+function encodeStr(s) {
+ return hexstrbase64.native.btoa(s);
+}
+var m = Object.create(hexstrbase64);
+m.decodeBase = decodeBase;
+m.encodeBase = encodeStr;
+module.exports = m;
\ No newline at end of file
diff --git a/hexstrbase64/ok.png b/hexstrbase64/ok.png
new file mode 100644
index 0000000..1293b27
Binary files /dev/null and b/hexstrbase64/ok.png differ
diff --git a/hexstrbase64/readme.css b/hexstrbase64/readme.css
new file mode 100644
index 0000000..aa7c526
--- /dev/null
+++ b/hexstrbase64/readme.css
@@ -0,0 +1,8 @@
+.code {
+ border-width: 5px;
+ border-color: #BEBEBE;
+ border-style: solid;
+ color:black;
+ background-color: #7F7F7F;
+ font-family: Hack,Consolas,Monaco,monospace;
+}
\ No newline at end of file
diff --git a/hexstrbase64/readme.html b/hexstrbase64/readme.html
new file mode 100644
index 0000000..54a6a47
--- /dev/null
+++ b/hexstrbase64/readme.html
@@ -0,0 +1,31 @@
+
+
+
+ HexStrBase64 Readme
+
+
+
+
');
+ console.log("NOT EQUALS");
+ }
+ console.log("CASE " + enccases[i].value[j].name + " ENDED");
+ }
+ console.log("SWITCH " + enccases[i].name + " ENDED");
+ }
+ console.log("TESTING ENDED");
+}
+
+var enccases = [
+ nameObj('Ascii', [
+ nameObj('Hello world!', '00480065006c006c006f00200077006f0072006c00640021'),
+ nameObj('Lorem ipsum', '004c006f00720065006d00200069007000730075006d')
+ ]),
+ nameObj('Ascii More Than 64 Bytes', [
+ nameObj(
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum fermentum ac nisl a sollicitudin. Cras interdum dui turpis, non scelerisque.',
+ '004c006f00720065006d00200069007000730075006d00200064006f006c006f0072002000730069007400200061006d00650074002C00200063006f006e00730065006300740065007400750072002000610064006900700069007300630069006e006700200065006c00690074002e00200056006500730074006900620075006c0075006d0020006600650072006d0065006e00740075006d0020006100630020006e00690073006c0020006100200073006f006c006c0069006300690074007500640069006e002e0020004300720061007300200069006e00740065007200640075006d00200064007500690020007400750072007000690073002C0020006e006f006e0020007300630065006c0065007200690073007100750065002e'
+ ),
+ nameObj(
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus dapibus volutpat ligula at pulvinar. Etiam consequat mi fringilla facilisis eleifend.',
+ '004c006f00720065006d00200069007000730075006d00200064006f006c006f0072002000730069007400200061006d00650074002C00200063006f006e00730065006300740065007400750072002000610064006900700069007300630069006e006700200065006c00690074002e002000500068006100730065006c006c007500730020006400610070006900620075007300200076006f006c007500740070006100740020006c006900670075006c0061002000610074002000700075006c00760069006e00610072002e00200045007400690061006d00200063006f006e0073006500710075006100740020006d00690020006600720069006e00670069006c006c006100200066006100630069006c006900730069007300200065006c0065006900660065006e0064002e'
+ )
+ ]),
+ nameObj('Unicode UTF8', [
+ nameObj(
+ 'DorianTech Hex String Base64转换器',
+ '0044006f007200690061006e0054006500630068002000480065007800200053007400720069006e006700200042006100730065003600348F6C63625668'
+ ),
+ nameObj(
+ 'DorianTech Hex String Base64转换器,用于由DorianTech提供的Node.js',
+ '0044006f007200690061006e0054006500630068002000480065007800200053007400720069006e006700200042006100730065003600348F6C63625668FF0C75284E8E75310044006f007200690061006e005400650063006863D04F9B7684004e006f00640065002e006a0073'
+ )
+ ])
+];
\ No newline at end of file
diff --git a/hexstrbase64/test/index.html b/hexstrbase64/test/index.html
new file mode 100644
index 0000000..b0ae622
--- /dev/null
+++ b/hexstrbase64/test/index.html
@@ -0,0 +1,16 @@
+
+
+
+ hexstrbase64 test
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/hviews.txt b/hviews.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/hviews.txt
@@ -0,0 +1 @@
+0
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..8bb0e4c
--- /dev/null
+++ b/index.html
@@ -0,0 +1,130 @@
+
+
+
+ SVR.JS 3.4.17
+
+
+
+
+
+
Welcome to SVR.JS 3.4.17
+
+
+
+
If you see this page, that means, that the server is properly working. You can further configure the server and replace index.html and tests.html pages with custom ones.
Some very old mods requiring hexstrbase64 will fail to load.
+
On first load server-side JavaScript will fail to load when SVR.JS is running on Bun.
+
+
+ Tests
+ Licenses
+ SVR.JS status page
+ More Information
+
+
+
+
+
diff --git a/lib/hexstrbase64/fail.png b/lib/hexstrbase64/fail.png
new file mode 100644
index 0000000..bbebb5d
Binary files /dev/null and b/lib/hexstrbase64/fail.png differ
diff --git a/lib/hexstrbase64/hexstrbase64/base64.js b/lib/hexstrbase64/hexstrbase64/base64.js
new file mode 100644
index 0000000..a995d36
--- /dev/null
+++ b/lib/hexstrbase64/hexstrbase64/base64.js
@@ -0,0 +1,124 @@
+//Base64.js for hexstrbase64 library for Node.js
+/*
+ * Copyright (c) 2012 Miles Shang
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * Usage:
+ * Set your settings:
+ * base64.settings.char62 = "-";
+ * base64.settings.char63 = "_";
+ * etc.
+ *
+ * Then:
+ * base64.encode(str) takes a string and returns the base64 encoding of it.
+ * base64.decode(str) does the reverse.
+ */
+
+/* TODO:
+ * Add a "padding_mandatory" flag to check for bad padding in the decoder.
+ * Add test cases that throw errors.
+ */
+
+var base64 = new Object();
+
+base64.settings = { // defaults
+ "char62" : "+",
+ "char63" : "/",
+ "pad" : "=",
+ "ascii" : false
+};
+
+/*
+ * Settings:
+ * If "pad" is not null or undefined, then it will be used for encoding.
+ *
+ * If "ascii" is set to true, then the encoder
+ * will assume that plaintext is in 8-bit chars (the standard).
+ * In this case, for every 3 chars in plaintext, you get 4 chars of base64.
+ * Any non-8-bit chars will cause an error.
+ * Otherwise, assume that all plaintext can be in the full range
+ * of Javascript chars, i.e. 16 bits. Get 8 chars of base64 for 3 chars
+ * of plaintext. Any possible JS string can be encoded.
+ */
+
+base64.encode = function (str) {
+ this.char_set =
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
+ + this.settings.char62 + this.settings.char63;
+
+ var output = ""; // final output
+ var buf = ""; // binary buffer
+ for (var i = 0; i < str.length; ++i) {
+ var c_num = str.charCodeAt(i);
+ if (this.settings.ascii)
+ if (c_num >= 256)
+ throw "Not an 8-bit char.";
+ var c_bin = c_num.toString(2);
+ while (c_bin.length < (this.settings.ascii ? 8 : 16))
+ c_bin = "0" + c_bin;
+ buf += c_bin;
+
+ while (buf.length >= 6) {
+ var sextet = buf.slice(0, 6);
+ buf = buf.slice(6);
+ output += this.char_set.charAt(parseInt(sextet, 2));
+ }
+ }
+
+ if (buf) { // not empty
+ while (buf.length < 6) buf += "0";
+ output += this.char_set.charAt(parseInt(buf, 2));
+ }
+
+ if (this.settings.pad)
+ while (output.length % (this.settings.ascii ? 4 : 8) != 0)
+ output += this.settings.pad;
+
+ return output;
+}
+
+base64.decode = function (str) {
+ this.char_set =
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
+ + this.settings.char62 + this.settings.char63;
+
+ var output = ""; // final output
+ var buf = ""; // binary buffer
+ var bits = (this.settings.ascii ? 8 : 16);
+ for (var i = 0; i < str.length; ++i) {
+ if (str[i] == this.settings.pad) break;
+ var c_num = this.char_set.indexOf(str.charAt(i));
+ if (c_num == -1) throw "Not base64.";
+ var c_bin = c_num.toString(2);
+ while (c_bin.length < 6) c_bin = "0" + c_bin;
+ buf += c_bin;
+
+ while (buf.length >= bits) {
+ var octet = buf.slice(0, bits);
+ buf = buf.slice(bits);
+ output += String.fromCharCode(parseInt(octet, 2));
+ }
+ }
+ return output;
+}
+module.exports = base64;
\ No newline at end of file
diff --git a/lib/hexstrbase64/hexstrbase64/base64_browser.js b/lib/hexstrbase64/hexstrbase64/base64_browser.js
new file mode 100644
index 0000000..44dec66
--- /dev/null
+++ b/lib/hexstrbase64/hexstrbase64/base64_browser.js
@@ -0,0 +1,123 @@
+//Base64.js for hexstrbase64 library for browser
+/*
+ * Copyright (c) 2012 Miles Shang
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * Usage:
+ * Set your settings:
+ * base64.settings.char62 = "-";
+ * base64.settings.char63 = "_";
+ * etc.
+ *
+ * Then:
+ * base64.encode(str) takes a string and returns the base64 encoding of it.
+ * base64.decode(str) does the reverse.
+ */
+
+/* TODO:
+ * Add a "padding_mandatory" flag to check for bad padding in the decoder.
+ * Add test cases that throw errors.
+ */
+
+var base64 = new Object();
+
+base64.settings = { // defaults
+ "char62" : "+",
+ "char63" : "/",
+ "pad" : "=",
+ "ascii" : false
+};
+
+/*
+ * Settings:
+ * If "pad" is not null or undefined, then it will be used for encoding.
+ *
+ * If "ascii" is set to true, then the encoder
+ * will assume that plaintext is in 8-bit chars (the standard).
+ * In this case, for every 3 chars in plaintext, you get 4 chars of base64.
+ * Any non-8-bit chars will cause an error.
+ * Otherwise, assume that all plaintext can be in the full range
+ * of Javascript chars, i.e. 16 bits. Get 8 chars of base64 for 3 chars
+ * of plaintext. Any possible JS string can be encoded.
+ */
+
+base64.encode = function (str) {
+ this.char_set =
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
+ + this.settings.char62 + this.settings.char63;
+
+ var output = ""; // final output
+ var buf = ""; // binary buffer
+ for (var i = 0; i < str.length; ++i) {
+ var c_num = str.charCodeAt(i);
+ if (this.settings.ascii)
+ if (c_num >= 256)
+ throw "Not an 8-bit char.";
+ var c_bin = c_num.toString(2);
+ while (c_bin.length < (this.settings.ascii ? 8 : 16))
+ c_bin = "0" + c_bin;
+ buf += c_bin;
+
+ while (buf.length >= 6) {
+ var sextet = buf.slice(0, 6);
+ buf = buf.slice(6);
+ output += this.char_set.charAt(parseInt(sextet, 2));
+ }
+ }
+
+ if (buf) { // not empty
+ while (buf.length < 6) buf += "0";
+ output += this.char_set.charAt(parseInt(buf, 2));
+ }
+
+ if (this.settings.pad)
+ while (output.length % (this.settings.ascii ? 4 : 8) != 0)
+ output += this.settings.pad;
+
+ return output;
+}
+
+base64.decode = function (str) {
+ this.char_set =
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
+ + this.settings.char62 + this.settings.char63;
+
+ var output = ""; // final output
+ var buf = ""; // binary buffer
+ var bits = (this.settings.ascii ? 8 : 16);
+ for (var i = 0; i < str.length; ++i) {
+ if (str[i] == this.settings.pad) break;
+ var c_num = this.char_set.indexOf(str.charAt(i));
+ if (c_num == -1) throw "Not base64.";
+ var c_bin = c_num.toString(2);
+ while (c_bin.length < 6) c_bin = "0" + c_bin;
+ buf += c_bin;
+
+ while (buf.length >= bits) {
+ var octet = buf.slice(0, bits);
+ buf = buf.slice(bits);
+ output += String.fromCharCode(parseInt(octet, 2));
+ }
+ }
+ return output;
+}
\ No newline at end of file
diff --git a/lib/hexstrbase64/hexstrbase64/main.js b/lib/hexstrbase64/hexstrbase64/main.js
new file mode 100644
index 0000000..4f3d12d
--- /dev/null
+++ b/lib/hexstrbase64/hexstrbase64/main.js
@@ -0,0 +1,129 @@
+//Requires base64
+var base64 = require('./base64.js');
+var HexStrBase64Buffer = {
+ from: function(s, e) {
+ var type = e;
+ var value = '';
+ if (e == 'base64') {
+ value = base64.decode(s);
+ } else if (e == 'hex') {
+ try {
+ var escaped = "";
+ var hex = "";
+ if(s.length%4 > 0) {
+ for(i=0;i<(4-(s.length%4));i++) {
+ hex += "0";
+ }
+ }
+ hex += s;
+ for(var i = 0;i 4) {
+ result += hex.substring(hex.length-5,hex.length-1);
+ } else if(hex.length < 4) {
+ for(var j=0;j<=4-(hex.length%4);j++) {
+ result += "0";
+ }
+ result += hex;
+ }
+ }
+ return result.split("undefined").join("").split("%").join("");
+ } else {
+ //return Buffer.from(value, type).toString(en);
+ return Buffer.from(value,"utf8").toString(en);
+ }
+ }
+ //}
+ //function toString(en) {
+ //return toStringE(en,type);
+ //}
+ return { type: type, value: value, toString: toString };
+ }
+};
+var hexstrbase64 = {
+ strtobase64: function(s) {
+ return HexStrBase64Buffer.from(s, 'utf8').toString('base64');
+ },
+ base64tostr: function(b) {
+ return HexStrBase64Buffer.from(b, 'base64').toString('utf8');
+ },
+ strtohex: function(s) {
+ return HexStrBase64Buffer.from(s, 'utf8').toString('hex');
+ },
+ hextostr: function(h) {
+ return HexStrBase64Buffer.from(h, 'hex').toString('utf8');
+ },
+ hextobase64: function(h) {
+ return hexstrbase64.strtobase64(hexstrbase64.hextostr(h));
+ },
+ base64tohex: function(b) {
+ return hexstrbase64.strtohex(hexstrbase64.base64tostr(b));
+ },
+ cipher: function() {
+ this.strtobase64 = hexstrbase64.strtobase64;
+ this.base64tostr = hexstrbase64.base64tostr;
+ this.strtohex = hexstrbase64.strtohex;
+ this.hextostr = hexstrbase64.hextostr;
+ this.hextobase64 = hextobase64.hextobase64;
+ this.base64tohex = hextobase64.base64tohex;
+ },
+ native: {
+ btoa: function(b) {
+ return hexstrbase64.strtobase64(b);
+ },
+ atob: function(a) {
+ return hexstrbase64.base64tostr(a);
+ }
+ }
+};
+module.exports = hexstrbase64;
\ No newline at end of file
diff --git a/lib/hexstrbase64/hexstrbase64/main_browser.js b/lib/hexstrbase64/hexstrbase64/main_browser.js
new file mode 100644
index 0000000..a2b4531
--- /dev/null
+++ b/lib/hexstrbase64/hexstrbase64/main_browser.js
@@ -0,0 +1,126 @@
+//Requires base64_browser.js
+var HexStrBase64Buffer = {
+ from: function(s, e) {
+ var type = e;
+ var value = '';
+ if (e == 'base64') {
+ value = base64.decode(s);
+ } else if (e == 'hex') {
+ try {
+ var escaped = "";
+ var hex = "";
+ if(s.length%4 > 0) {
+ for(i=0;i<(4-(s.length%4));i++) {
+ hex += "0";
+ }
+ }
+ hex += s;
+ for(var i = 0;i 4) {
+ result += hex.substring(hex.length-5,hex.length-1);
+ } else if(hex.length < 4) {
+ for(var j=0;j<=4-(hex.length%4);j++) {
+ result += "0";
+ }
+ result += hex;
+ }
+ }
+ return result.split("undefined").join("").split("%").join("");
+ } else {
+ //return new TextDecoder(en).decode(new TextEncoder(type).encode(value));
+ return new TextDecoder(en).decode(new TextEncoder("utf8").encode(value));
+ }
+ }
+ //function toString(en) {
+ //return toStringE(en,type);
+ //}
+ return { type: type, value: value, toString: toString };
+ }
+};
+var hexstrbase64 = {
+ strtobase64: function(s) {
+ return HexStrBase64Buffer.from(s, 'utf8').toString('base64');
+ },
+ base64tostr: function(b) {
+ return HexStrBase64Buffer.from(b, 'base64').toString('utf8');
+ },
+ strtohex: function(s) {
+ return HexStrBase64Buffer.from(s, 'utf8').toString('hex');
+ },
+ hextostr: function(h) {
+ return HexStrBase64Buffer.from(h, 'hex').toString('utf8');
+ },
+ hextobase64: function(h) {
+ return hexstrbase64.strtobase64(hexstrbase64.hextostr(h));
+ },
+ base64tohex: function(b) {
+ return hexstrbase64.strtohex(hexstrbase64.base64tostr(b));
+ },
+ cipher: function() {
+ this.strtobase64 = hexstrbase64.strtobase64;
+ this.base64tostr = hexstrbase64.base64tostr;
+ this.strtohex = hexstrbase64.strtohex;
+ this.hextostr = hexstrbase64.hextostr;
+ this.hextobase64 = hextobase64.hextobase64;
+ this.base64tohex = hextobase64.base64tohex;
+ },
+ native: {
+ btoa: function(b) {
+ return hexstrbase64.strtobase64(b);
+ },
+ atob: function(a) {
+ return hexstrbase64.base64tostr(a);
+ }
+ }
+};
\ No newline at end of file
diff --git a/lib/hexstrbase64/index.js b/lib/hexstrbase64/index.js
new file mode 100644
index 0000000..4ec8879
--- /dev/null
+++ b/lib/hexstrbase64/index.js
@@ -0,0 +1,11 @@
+let hexstrbase64 = require("./hexstrbase64/main.js");
+function decodeBase(b) {
+ return hexstrbase64.native.atob(b);
+}
+function encodeStr(s) {
+ return hexstrbase64.native.btoa(s);
+}
+var m = Object.create(hexstrbase64);
+m.decodeBase = decodeBase;
+m.encodeBase = encodeStr;
+module.exports = m;
\ No newline at end of file
diff --git a/lib/hexstrbase64/ok.png b/lib/hexstrbase64/ok.png
new file mode 100644
index 0000000..1293b27
Binary files /dev/null and b/lib/hexstrbase64/ok.png differ
diff --git a/lib/hexstrbase64/readme.css b/lib/hexstrbase64/readme.css
new file mode 100644
index 0000000..aa7c526
--- /dev/null
+++ b/lib/hexstrbase64/readme.css
@@ -0,0 +1,8 @@
+.code {
+ border-width: 5px;
+ border-color: #BEBEBE;
+ border-style: solid;
+ color:black;
+ background-color: #7F7F7F;
+ font-family: Hack,Consolas,Monaco,monospace;
+}
\ No newline at end of file
diff --git a/lib/hexstrbase64/readme.html b/lib/hexstrbase64/readme.html
new file mode 100644
index 0000000..54a6a47
--- /dev/null
+++ b/lib/hexstrbase64/readme.html
@@ -0,0 +1,31 @@
+
+
+
+ HexStrBase64 Readme
+
+
+
+
');
+ console.log("NOT EQUALS");
+ }
+ console.log("CASE " + enccases[i].value[j].name + " ENDED");
+ }
+ console.log("SWITCH " + enccases[i].name + " ENDED");
+ }
+ console.log("TESTING ENDED");
+}
+
+var enccases = [
+ nameObj('Ascii', [
+ nameObj('Hello world!', '00480065006c006c006f00200077006f0072006c00640021'),
+ nameObj('Lorem ipsum', '004c006f00720065006d00200069007000730075006d')
+ ]),
+ nameObj('Ascii More Than 64 Bytes', [
+ nameObj(
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum fermentum ac nisl a sollicitudin. Cras interdum dui turpis, non scelerisque.',
+ '004c006f00720065006d00200069007000730075006d00200064006f006c006f0072002000730069007400200061006d00650074002C00200063006f006e00730065006300740065007400750072002000610064006900700069007300630069006e006700200065006c00690074002e00200056006500730074006900620075006c0075006d0020006600650072006d0065006e00740075006d0020006100630020006e00690073006c0020006100200073006f006c006c0069006300690074007500640069006e002e0020004300720061007300200069006e00740065007200640075006d00200064007500690020007400750072007000690073002C0020006e006f006e0020007300630065006c0065007200690073007100750065002e'
+ ),
+ nameObj(
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus dapibus volutpat ligula at pulvinar. Etiam consequat mi fringilla facilisis eleifend.',
+ '004c006f00720065006d00200069007000730075006d00200064006f006c006f0072002000730069007400200061006d00650074002C00200063006f006e00730065006300740065007400750072002000610064006900700069007300630069006e006700200065006c00690074002e002000500068006100730065006c006c007500730020006400610070006900620075007300200076006f006c007500740070006100740020006c006900670075006c0061002000610074002000700075006c00760069006e00610072002e00200045007400690061006d00200063006f006e0073006500710075006100740020006d00690020006600720069006e00670069006c006c006100200066006100630069006c006900730069007300200065006c0065006900660065006e0064002e'
+ )
+ ]),
+ nameObj('Unicode UTF8', [
+ nameObj(
+ 'DorianTech Hex String Base64转换器',
+ '0044006f007200690061006e0054006500630068002000480065007800200053007400720069006e006700200042006100730065003600348F6C63625668'
+ ),
+ nameObj(
+ 'DorianTech Hex String Base64转换器,用于由DorianTech提供的Node.js',
+ '0044006f007200690061006e0054006500630068002000480065007800200053007400720069006e006700200042006100730065003600348F6C63625668FF0C75284E8E75310044006f007200690061006e005400650063006863D04F9B7684004e006f00640065002e006a0073'
+ )
+ ])
+];
\ No newline at end of file
diff --git a/lib/hexstrbase64/test/index.html b/lib/hexstrbase64/test/index.html
new file mode 100644
index 0000000..b0ae622
--- /dev/null
+++ b/lib/hexstrbase64/test/index.html
@@ -0,0 +1,16 @@
+
+
+
+ hexstrbase64 test
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/licenses/.index.html.kate-swp b/licenses/.index.html.kate-swp
new file mode 100644
index 0000000..d9b6320
Binary files /dev/null and b/licenses/.index.html.kate-swp differ
diff --git a/licenses/asap.txt b/licenses/asap.txt
new file mode 100644
index 0000000..ba18c61
--- /dev/null
+++ b/licenses/asap.txt
@@ -0,0 +1,21 @@
+
+Copyright 2009–2014 Contributors. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
+
diff --git a/licenses/asn1.js-rfc2560.txt b/licenses/asn1.js-rfc2560.txt
new file mode 100644
index 0000000..e69de29
diff --git a/licenses/asn1.js-rfc5280.txt b/licenses/asn1.js-rfc5280.txt
new file mode 100644
index 0000000..e69de29
diff --git a/licenses/asn1.js.txt b/licenses/asn1.js.txt
new file mode 100644
index 0000000..e69de29
diff --git a/licenses/async.txt b/licenses/async.txt
new file mode 100644
index 0000000..8f29698
--- /dev/null
+++ b/licenses/async.txt
@@ -0,0 +1,19 @@
+Copyright (c) 2010-2014 Caolan McMahon
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/licenses/bn.js.txt b/licenses/bn.js.txt
new file mode 100644
index 0000000..c328f04
--- /dev/null
+++ b/licenses/bn.js.txt
@@ -0,0 +1,19 @@
+Copyright Fedor Indutny, 2015.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/licenses/call-bind.txt b/licenses/call-bind.txt
new file mode 100644
index 0000000..48f05d0
--- /dev/null
+++ b/licenses/call-bind.txt
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 Jordan Harband
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/licenses/chownr.txt b/licenses/chownr.txt
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/licenses/chownr.txt
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/licenses/dezalgo.txt b/licenses/dezalgo.txt
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/licenses/dezalgo.txt
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/licenses/formidable.txt b/licenses/formidable.txt
new file mode 100644
index 0000000..5e7ad11
--- /dev/null
+++ b/licenses/formidable.txt
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2011-present Felix Geisendörfer, and contributors.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/licenses/fs-minipass.txt b/licenses/fs-minipass.txt
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/licenses/fs-minipass.txt
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/licenses/function-bind.txt b/licenses/function-bind.txt
new file mode 100644
index 0000000..62d6d23
--- /dev/null
+++ b/licenses/function-bind.txt
@@ -0,0 +1,20 @@
+Copyright (c) 2013 Raynos.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
diff --git a/licenses/get-intrinsic.txt b/licenses/get-intrinsic.txt
new file mode 100644
index 0000000..48f05d0
--- /dev/null
+++ b/licenses/get-intrinsic.txt
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 Jordan Harband
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/licenses/graceful-fs.txt b/licenses/graceful-fs.txt
new file mode 100644
index 0000000..9d2c803
--- /dev/null
+++ b/licenses/graceful-fs.txt
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter, Ben Noordhuis, and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/licenses/has-symbols.txt b/licenses/has-symbols.txt
new file mode 100644
index 0000000..df31cbf
--- /dev/null
+++ b/licenses/has-symbols.txt
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2016 Jordan Harband
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/licenses/has.txt b/licenses/has.txt
new file mode 100644
index 0000000..ae7014d
--- /dev/null
+++ b/licenses/has.txt
@@ -0,0 +1,22 @@
+Copyright (c) 2013 Thiago de Arruda
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/licenses/hexoid.txt b/licenses/hexoid.txt
new file mode 100644
index 0000000..fa6089f
--- /dev/null
+++ b/licenses/hexoid.txt
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Luke Edwards (lukeed.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/licenses/index.html b/licenses/index.html
new file mode 100644
index 0000000..64063b5
--- /dev/null
+++ b/licenses/index.html
@@ -0,0 +1,357 @@
+
+
+
+ SVR.JS 3.4.17 Licenses
+
+
+
+
+
+
SVR.JS 3.4.17 Licenses
+
SVR.JS 3.4.17
+
+ MIT License
+
+ Copyright (c) 2020 DorianTech S.A.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
+
+
+
+
+
diff --git a/licenses/inherits.txt b/licenses/inherits.txt
new file mode 100644
index 0000000..dea3013
--- /dev/null
+++ b/licenses/inherits.txt
@@ -0,0 +1,16 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
diff --git a/licenses/mime-db.txt b/licenses/mime-db.txt
new file mode 100644
index 0000000..a7ae8ee
--- /dev/null
+++ b/licenses/mime-db.txt
@@ -0,0 +1,22 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/licenses/mime-types.txt b/licenses/mime-types.txt
new file mode 100644
index 0000000..0616607
--- /dev/null
+++ b/licenses/mime-types.txt
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2014 Jonathan Ong
+Copyright (c) 2015 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/licenses/minimalistic-assert.txt b/licenses/minimalistic-assert.txt
new file mode 100644
index 0000000..adca66b
--- /dev/null
+++ b/licenses/minimalistic-assert.txt
@@ -0,0 +1,13 @@
+Copyright 2015 Calvin Metcalf
+
+Permission to use, copy, modify, and/or distribute this software for any purpose
+with or without fee is hereby granted, provided that the above copyright notice
+and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
\ No newline at end of file
diff --git a/licenses/minipass.txt b/licenses/minipass.txt
new file mode 100644
index 0000000..20a4762
--- /dev/null
+++ b/licenses/minipass.txt
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) npm, Inc. and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/licenses/minizlib.txt b/licenses/minizlib.txt
new file mode 100644
index 0000000..ffce738
--- /dev/null
+++ b/licenses/minizlib.txt
@@ -0,0 +1,26 @@
+Minizlib was created by Isaac Z. Schlueter.
+It is a derivative work of the Node.js project.
+
+"""
+Copyright Isaac Z. Schlueter and Contributors
+Copyright Node.js contributors. All rights reserved.
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+"""
diff --git a/licenses/mkdirp.txt b/licenses/mkdirp.txt
new file mode 100644
index 0000000..13fcd15
--- /dev/null
+++ b/licenses/mkdirp.txt
@@ -0,0 +1,21 @@
+Copyright James Halliday (mail@substack.net) and Isaac Z. Schlueter (i@izs.me)
+
+This project is free software released under the MIT license:
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/licenses/object-inspect.txt b/licenses/object-inspect.txt
new file mode 100644
index 0000000..ca64cc1
--- /dev/null
+++ b/licenses/object-inspect.txt
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2013 James Halliday
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/licenses/ocsp.txt b/licenses/ocsp.txt
new file mode 100644
index 0000000..8aa2645
--- /dev/null
+++ b/licenses/ocsp.txt
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) [year] [fullname]
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/licenses/once.txt b/licenses/once.txt
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/licenses/once.txt
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/licenses/pretty-bytes.txt b/licenses/pretty-bytes.txt
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/licenses/pretty-bytes.txt
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/licenses/qs.txt b/licenses/qs.txt
new file mode 100644
index 0000000..fecf6b6
--- /dev/null
+++ b/licenses/qs.txt
@@ -0,0 +1,29 @@
+BSD 3-Clause License
+
+Copyright (c) 2014, Nathan LaFreniere and other [contributors](https://github.com/ljharb/qs/graphs/contributors)
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+3. Neither the name of the copyright holder nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/licenses/side-channel.txt b/licenses/side-channel.txt
new file mode 100644
index 0000000..3900dd7
--- /dev/null
+++ b/licenses/side-channel.txt
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019 Jordan Harband
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/licenses/simple-lru-cache.txt b/licenses/simple-lru-cache.txt
new file mode 100644
index 0000000..1b60e29
--- /dev/null
+++ b/licenses/simple-lru-cache.txt
@@ -0,0 +1,19 @@
+Copyright (c) 2013 Mercadolibre.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/licenses/tar.txt b/licenses/tar.txt
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/licenses/tar.txt
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/licenses/wrappy.txt b/licenses/wrappy.txt
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/licenses/wrappy.txt
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/licenses/yallist.txt b/licenses/yallist.txt
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/licenses/yallist.txt
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/loghighlight.js b/loghighlight.js
new file mode 100644
index 0000000..a934a27
--- /dev/null
+++ b/loghighlight.js
@@ -0,0 +1,50 @@
+//SVR.JS LOG HIGHLIGHTER
+
+var readline = require("readline");
+var process = require("process");
+
+var args = process.argv;
+for (var i = (process.argv[0].indexOf("node") > -1 || process.argv[0].indexOf("bun") > -1 ? 2 : 1); i < args.length; i++) {
+ if (args[i] == "-h" || args[i] == "--help" || args[i] == "-?" || args[i] == "/h" || args[i] == "/?") {
+ console.log("SVR.JS log highlighter usage:");
+ console.log(" | node loghighlight.js [-h] [--help] [-?] [/h] [/?]");
+ console.log("-h -? /h /? --help -- Displays help");
+ process.exit(0);
+ } else {
+ console.log("Unrecognized argument: " + args[i]);
+ console.log("SVR.JS log highlighter usage:");
+ console.log(" | node loghighlight.js [-h] [--help] [-?] [/h] [/?]");
+ console.log("-h -? /h /? --help -- Displays help");
+ process.exit(1);
+ }
+}
+
+var rl = readline.createInterface({
+ input: process.stdin,
+ output: process.stdout,
+ terminal: false,
+ prompt: ''
+});
+rl.prompt();
+rl.on('line', (line) => {
+ viewLog([line]);
+});
+
+function viewLog(log) {
+ if(log[log.length-1] == "") log.pop();
+ if(log[0] == "") log.shift();
+ for(var i=0;i -1 || process.argv[0].indexOf("bun") > -1 ? 2 : 1); i < args.length; i++) {
+ if (args[i] == "-h" || args[i] == "--help" || args[i] == "-?" || args[i] == "/h" || args[i] == "/?") {
+ console.log("SVR.JS log viewer usage:");
+ console.log("node logviewer.js [-h] [--help] [-?] [/h] [/?]");
+ console.log("-h -? /h /? --help -- Displays help");
+ process.exit(0);
+ } else {
+ console.log("Unrecognized argument: " + args[i]);
+ console.log("SVR.JS log viewer usage:");
+ console.log("node logviewer.js [-h] [--help] [-?] [/h] [/?]");
+ console.log("-h -? /h /? --help -- Displays help");
+ process.exit(1);
+ }
+}
+
+var logo = ["","",""," \u001b[38;5;002m&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&"," &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&%"," &&\u001b[38;5;243m(((((\u001b[38;5;242m(\u001b[38;5;243m(((\u001b[38;5;241m##(###\u001b[38;5;243m(\u001b[38;5;241m##\u001b[38;5;243m((((((((((((((((((((((\u001b[38;5;143m*\u001b[38;5;243m(((\u001b[38;5;101m/\u001b[38;5;143m/\u001b[38;5;243m(((\u001b[38;5;185m*\u001b[38;5;243m((\u001b[38;5;242m(\u001b[38;5;002m&&"," \u001b[38;5;m&\u001b[38;5;002m&\u001b[38;5;243m((((((\u001b[38;5;242m(\u001b[38;5;243m(((((((\u001b[38;5;241m#\u001b[38;5;243m(((((((((((((((((((((((((\u001b[38;5;011m***\u001b[38;5;244m(\u001b[38;5;185m*\u001b[38;5;011m***\u001b[38;5;243m(\u001b[38;5;011m***\u001b[38;5;243m((\u001b[38;5;002m&&"," \u001b[38;5;m&\u001b[38;5;002m&&&\u001b[38;5;243m((((((((((((((((((((((((((((((((((((((((((((((((((\u001b[38;5;002m&&&&"," \u001b[38;5;m&\u001b[38;5;002m&&\u001b[38;5;243m((((((((((((((((((((((((((((((((((((((((((((((((((((\u001b[38;5;002m&&&"," \u001b[38;5;m&\u001b[38;5;002m&\u001b[38;5;243m((((((\u001b[38;5;241m###\u001b[38;5;243m(((((\u001b[38;5;241m#\u001b[38;5;243m((\u001b[38;5;241m##\u001b[38;5;243m(((((((((((((((((((((\u001b[38;5;011m****\u001b[38;5;015m \u001b[38;5;243m(\u001b[38;5;011m***\u001b[38;5;243m((\u001b[38;5;002m&&"," \u001b[38;5;m&\u001b[38;5;002m&&\u001b[38;5;243m((((((((((((((((((((((((((((((((((((((((((((((((((((\u001b[38;5;002m&&&"," \u001b[38;5;m&\u001b[38;5;002m&&&%\u001b[38;5;243m((((((((((((((((((((((((((((((((((((((((((((((((\u001b[38;5;065m#\u001b[38;5;002m&&&&"," \u001b[38;5;m&\u001b[38;5;002m&\u001b[38;5;243m((((((\u001b[38;5;242m(\u001b[38;5;243m(((((((\u001b[38;5;241m(\u001b[38;5;243m((((\u001b[38;5;242m(\u001b[38;5;243m((((((((((((((((((((\u001b[38;5;015m \u001b[38;5;143m/\u001b[38;5;187m.\u001b[38;5;015m \u001b[38;5;243m(\u001b[38;5;015m \u001b[38;5;243m((\u001b[38;5;002m&&"," \u001b[38;5;m&\u001b[38;5;002m&&\u001b[38;5;243m(((((\u001b[38;5;242m(\u001b[38;5;243m(((((((\u001b[38;5;241m#\u001b[38;5;243m(((((((((((((((((((((((((((((((((((((((\u001b[38;5;002m&&"," \u001b[38;5;m&\u001b[38;5;002m&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&"," \u001b[38;5;m&\u001b[38;5;002m&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&"," \u001b[38;5;m&\u001b[38;5;002m&&&&&&&&\u001b[38;5;010m########################################\u001b[38;5;071m#\u001b[38;5;002m&&&&&&&&"," \u001b[38;5;m&\u001b[38;5;002m&&&&&\u001b[38;5;010m##############################################\u001b[38;5;002m&&&&&&"," \u001b[38;5;m&\u001b[38;5;002m&&&\u001b[38;5;010m##################################################\u001b[38;5;002m&&&&"," \u001b[38;5;m&\u001b[38;5;002m&&\u001b[38;5;010m####\u001b[38;5;016m@@@@@@\u001b[38;5;010m#\u001b[38;5;016m@@\u001b[38;5;010m####\u001b[38;5;016m@@\u001b[38;5;040m#\u001b[38;5;010m#\u001b[38;5;016m@@@@@@@\u001b[38;5;010m###########\u001b[38;5;016m@@\u001b[38;5;010m##\u001b[38;5;016m@@@@@@\u001b[38;5;010m###\u001b[38;5;002m&&&"," \u001b[38;5;m&\u001b[38;5;002m&\u001b[38;5;083m/\u001b[38;5;010m###\u001b[38;5;016m@@\u001b[38;5;010m#######\u001b[38;5;016m@@\u001b[38;5;010m###\u001b[38;5;016m@\u001b[38;5;233m@\u001b[38;5;010m##\u001b[38;5;016m@@\u001b[38;5;010m####\u001b[38;5;016m@@\u001b[38;5;010m##########\u001b[38;5;016m@@\u001b[38;5;010m#\u001b[38;5;016m@@\u001b[38;5;010m#########\u001b[38;5;002m&&"," \u001b[38;5;m&\u001b[38;5;002m&\u001b[38;5;010m#######\u001b[38;5;022m@\u001b[38;5;016m@@@@\u001b[38;5;010m##\u001b[38;5;016m@@\u001b[38;5;010m#\u001b[38;5;016m@@\u001b[38;5;010m###\u001b[38;5;016m@@@@@@@\u001b[38;5;010m#######\u001b[38;5;016m@\u001b[38;5;010m###\u001b[38;5;016m@@\u001b[38;5;010m####\u001b[38;5;040m#\u001b[38;5;016m@@@@\u001b[38;5;010m###\u001b[38;5;002m&&"," \u001b[38;5;m&\u001b[38;5;002m&\u001b[38;5;114m*\u001b[38;5;010m###\u001b[38;5;016m@@\u001b[38;5;010m###\u001b[38;5;002m&\u001b[38;5;016m@@\u001b[38;5;010m###\u001b[38;5;016m@@@\u001b[38;5;010m####\u001b[38;5;016m@@\u001b[38;5;010m####\u001b[38;5;016m@@\u001b[38;5;010m##\u001b[38;5;016m@@\u001b[38;5;010m#\u001b[38;5;034m%\u001b[38;5;010m#\u001b[38;5;016m@@@@\u001b[38;5;010m##\u001b[38;5;016m@@\u001b[38;5;034m%\u001b[38;5;010m###\u001b[38;5;016m@@\u001b[38;5;010m###\u001b[38;5;002m&&"," \u001b[38;5;m&\u001b[38;5;002m&&\u001b[38;5;010m####################################################\u001b[38;5;002m&&&"," \u001b[38;5;m&\u001b[38;5;002m&&&\u001b[38;5;010m##################################################\u001b[38;5;002m&&&&"," \u001b[38;5;m&\u001b[38;5;002m&&&&&\u001b[38;5;010m##############################################\u001b[38;5;002m&&&&&&"," \u001b[38;5;m&\u001b[38;5;002m&&&&&&&&\u001b[38;5;010m########################################\u001b[38;5;002m&&&&&&&&&"," \u001b[38;5;m#\u001b[38;5;002m&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&"," &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&"," &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&"," \u001b[38;5;247m*\u001b[38;5;246m///\u001b[38;5;247m*\u001b[38;5;246m///"," ////\u001b[38;5;247m*\u001b[38;5;246m///"," \u001b[38;5;208m////////"," \u001b[38;5;m&\u001b[38;5;208m(((((/(((("," \u001b[38;5;246m/\u001b[38;5;247m*\u001b[38;5;246m///\u001b[38;5;247m*\u001b[38;5;246m///\u001b[38;5;247m*\u001b[38;5;246m///\u001b[38;5;247m*\u001b[38;5;246m///\u001b[38;5;247m*\u001b[38;5;246m/\u001b[38;5;208m/(/(((/(((/\u001b[38;5;137m/\u001b[38;5;246m//\u001b[38;5;247m*\u001b[38;5;246m///\u001b[38;5;247m*\u001b[38;5;246m///\u001b[38;5;247m*\u001b[38;5;246m///\u001b[38;5;247m*\u001b[38;5;246m///"," //\u001b[38;5;247m*\u001b[38;5;246m///////\u001b[38;5;247m*\u001b[38;5;246m///////\u001b[38;5;247m*\u001b[38;5;246m/\u001b[38;5;208m/(((((/((((\u001b[38;5;137m/\u001b[38;5;246m//\u001b[38;5;247m*\u001b[38;5;246m///////\u001b[38;5;247m*\u001b[38;5;246m///////\u001b[38;5;247m*"," *\u001b[38;5;246m/\u001b[38;5;247m*\u001b[38;5;246m/\u001b[38;5;247m*\u001b[38;5;246m/\u001b[38;5;247m*\u001b[38;5;246m/\u001b[38;5;247m*\u001b[38;5;246m/\u001b[38;5;247m*\u001b[38;5;246m/\u001b[38;5;247m*\u001b[38;5;246m/\u001b[38;5;247m*\u001b[38;5;246m/\u001b[38;5;247m*\u001b[38;5;246m/\u001b[38;5;247m*\u001b[38;5;246m/\u001b[38;5;247m*\u001b[38;5;208m(/(/(/(/(/\u001b[38;5;246m/\u001b[38;5;247m*\u001b[38;5;246m/\u001b[38;5;247m*\u001b[38;5;246m/\u001b[38;5;247m*\u001b[38;5;246m/\u001b[38;5;247m*\u001b[38;5;246m/\u001b[38;5;247m*\u001b[38;5;246m/\u001b[38;5;247m*\u001b[38;5;246m/\u001b[38;5;247m*\u001b[38;5;246m/\u001b[38;5;247m*\u001b[38;5;246m/\u001b[38;5;247m*\u001b[38;5;246m/\u001b[38;5;247m*"," \u001b[38;5;208m((((/(((","","","","\u001b[0m"];
+
+for(var i=0;i '
+});
+console.log("Options:");
+for(var i=0;i {
+ var op = line.trim();
+ if(op == "") {
+ rl.prompt();
+ return;
+ }
+ var opn = parseInt(op);
+ rl.close();
+ if(options[op]) {
+ options[op].callback();
+ } else {
+ console.log("Invalid option.");
+ prompt(options);
+ }
+});
+}
+
+
+function viewLog(log) {
+ if(log[log.length-1] == "") log.pop();
+ if(log[0] == "") log.shift();
+ for(var i=0;i '
+});
+console.log("Input filter:");
+rl2.prompt();
+rl2.on('line', (line) => {
+ rl2.close();
+ viewFilteredWorkerLogs(line);
+});
+}
+
+var mainOptions = [
+ {name: "View latest master log", callback: viewMasterLogs},
+ {name: "View 5 latest worker logs", callback: viewWorkerLogs},
+ {name: "View filtered worker logs (latest 20 logs)", callback: viewFilteredWorkerLogsPrompt},
+ {name: "Exit log viewer", callback: function(){console.log("Bye!");process.exit(0);}}
+]
+
+prompt(mainOptions);
diff --git a/mods/primitiveanalytics.tar.gz b/mods/primitiveanalytics.tar.gz
new file mode 100644
index 0000000..af6c34f
Binary files /dev/null and b/mods/primitiveanalytics.tar.gz differ
diff --git a/powered.png b/powered.png
new file mode 100644
index 0000000..56a8049
Binary files /dev/null and b/powered.png differ
diff --git a/serverSideScript.js b/serverSideScript.js
new file mode 100644
index 0000000..747a3c8
--- /dev/null
+++ b/serverSideScript.js
@@ -0,0 +1,90 @@
+//Server-side Javascript (Node.js)
+//This implementation uses Node.js, which powers SVR.JS.
+//This implementation contains elements specific for SVR.JS mods:
+// req - A server request instance
+// res - A server response instance
+// serverconsole - A console output object for SVR.JS
+// responseEnd - Response ending method of SVR.JS
+// href - Request URL without query
+// ext - File extension of requested file
+// uobject - Request URL object
+// search - Request URL queries
+// defaultPage - An index page location (deprecated, always returns 'index.json')
+// users - A list of users (deprecated)
+// page404 - 404 Not Found page location
+// head - A head of server response
+// foot - A foot of server response
+// fd - A response body used by responseEnd method
+// elseCallback - Method summoning SVR.JS internal callbacks
+// callServerError - Method to end with server error
+// getCustomHeaders - Method to get headers defined in config.json file
+// origHref - Original request URL without query (before URL rewriting)
+// redirect - Method to redirect.
+// parsePostData - Method to parse POST data.
+//Along with elements added by this implementation:
+// disableEndElseCallbackExecute - Determines execution of elseCallback on end
+// filterHeaders - Removes invalid HTTP/1.0 headers
+// customvar1, customvar2, customvar3, customvar4 - Custom variables
+//Built-in libraries:
+// http
+// https
+// readline
+// os
+// url
+// hexstrbase64
+// fs
+// path
+// crypto
+// stream
+//If you send response remember and don't use disableEndElseCallbackExecute, use "return;", or else SVR.JS will crash.
+//If you use proxy, use filterHeaders to remove HTTP/2.0 headers, which are invalid in HTTP/1.0.
+//If you type no code, elseCallback is executed.
+//Below we have example script, which serves dynamic content.
+disableEndElseCallbackExecute = true; //Avoid crashing on async.
+var headers = getCustomHeaders(); //Headers
+if(!fs.existsSync(__dirname + "/../temp/requestCounter")) {
+ fs.writeFileSync(__dirname + "/../temp/requestCounter","0"); //Reset counter
+}
+headers["Content-Type"] = 'text/html; charset=utf-8' //HTML output
+if(href == "/hello.svr") {
+ fs.readFile(__dirname + "/../temp/requestCounter", (err,data) => {
+ if(err) throw err;
+ var requestCounter = parseInt(data.toString()); //Counter
+ fs.writeFile(__dirname + "/../temp/requestCounter",(requestCounter + 1).toString(),() => {
+ //Increase value of counter
+ });
+ res.writeHead(200, "OK", headers); //Write Head
+ res.end("SVR.JS ServerSide Test
Hello World!
This is a test from server-side JavaScript. This test is executed " + requestCounter.toString() + " times from taking server up." + (req.headers.origin == undefined ? "" : " This request is done from a proxy.") + "
");
+ response.end();
+ }
+ } else {
+ var finished = false;
+ response.on("finish", function () {
+ if (!finished) {
+ finished = true;
+ serverconsole.locmessage("Client disconnected.");
+ }
+ });
+ response.on("close", function () {
+ if (!finished) {
+ finished = true;
+ serverconsole.locmessage("Client disconnected.");
+ }
+ });
+ var isProxy = false;
+ if (request.url.indexOf("/") != 0 && request.url != "*") isProxy = true;
+ serverconsole.locmessage("Somebody connected to port " + (secure && fromMain ? sport : port) + "...");
+
+ if (request.socket == null) {
+ serverconsole.errmessage("Client socket is null!!!");
+ return;
+ }
+
+ var reqport = "";
+ var reqip = "";
+ var oldport = "";
+ var oldip = "";
+ if (request.headers["x-svr-js-client"] != undefined && enableIPSpoofing) {
+ var kl = request.headers["x-svr-js-client"].split(":");
+ reqport = kl.pop();
+ reqip = kl.join(":");
+ try {
+ oldport = request.socket.remotePort;
+ oldip = request.socket.remoteAddress;
+ request.socket.realRemotePort = reqport;
+ request.socket.realRemoteAddress = reqip;
+ request.socket.originalRemotePort = oldport;
+ request.socket.originalRemoteAddress = oldip;
+ response.socket.realRemotePort = reqport;
+ response.socket.realRemoteAddress = reqip;
+ response.socket.originalRemotePort = oldport;
+ response.socket.originalRemoteAddress = oldip;
+ } catch (ex) {
+ //Address setting failed
+ }
+ } else if (request.headers["x-forwarded-for"] != undefined && enableIPSpoofing) {
+ reqport = null;
+ reqip = request.headers["x-forwarded-for"].split(",")[0].replace(/ /g, "");
+ if (reqip.indexOf(":") == -1) reqip = "::ffff:" + reqip;
+ try {
+ oldport = request.socket.remotePort;
+ oldip = request.socket.remoteAddress;
+ request.socket.realRemotePort = reqport;
+ request.socket.realRemoteAddress = reqip;
+ request.socket.originalRemotePort = oldport;
+ request.socket.originalRemoteAddress = oldip;
+ response.socket.realRemotePort = reqport;
+ response.socket.realRemoteAddress = reqip;
+ response.socket.originalRemotePort = oldport;
+ response.socket.originalRemoteAddress = oldip;
+ } catch (ex) {
+ //Address setting failed
+ }
+ } else {
+ reqip = request.socket.remoteAddress;
+ reqport = request.socket.remotePort;
+ }
+
+ if (!isProxy) serverconsole.reqmessage("Client " + ((!reqip || reqip == "") ? "[unknown client]" : (reqip + ((reqport && reqport !== 0) && reqport != "" ? ":" + reqport : ""))) + " wants " + (request.method == "GET" ? "content in " : (request.method == "POST" ? "to post content in " : (request.method == "PUT" ? "to add content in " : (request.method == "DELETE" ? "to delete content in " : (request.method == "PATCH" ? "to patch content in " : "to access content using " + request.method + " method in "))))) + (request.headers.host == undefined ? "" : request.headers.host) + request.url);
+ else serverconsole.reqmessage("Client " + ((!reqip || reqip == "") ? "[unknown client]" : (reqip + ((reqport && reqport !== 0) && reqport != "" ? ":" + reqport : ""))) + " wants " + (request.method == "GET" ? "content in " : (request.method == "POST" ? "to post content in " : (request.method == "PUT" ? "to add content in " : (request.method == "DELETE" ? "to delete content in " : (request.method == "PATCH" ? "to patch content in " : "to access content using " + request.method + " method in "))))) + request.url);
+ if (request.headers["user-agent"] != undefined) serverconsole.reqmessage("Client uses " + request.headers["user-agent"]);
+
+ var acceptEncoding = request.headers["accept-encoding"];
+ if (!acceptEncoding) acceptEncoding = "";
+
+ var head = fs.existsSync("./.head") ? fs.readFileSync("./.head").toString() : (fs.existsSync("./head.html") ? fs.readFileSync("./head.html").toString() : ""); // header
+ var foot = fs.existsSync("./.foot") ? fs.readFileSync("./.foot").toString() : (fs.existsSync("./foot.html") ? fs.readFileSync("./foot.html").toString() : ""); // footer
+
+ var fd = "";
+
+ function responseEnd(d) {
+ if (d === undefined) d = fd;
+ res.write(head + d + foot);
+ res.end();
+ }
+
+ // function responseEndGzip(d) {
+ // if (d === undefined) d = fd;
+ // zlib.gzip(head + d + foot, function (err, buff) {
+ // if (err) {
+ // throw err;
+ // } else {
+ // res.write(buff);
+ // res.end();
+ // }
+ // });
+ // }
+ //
+ // function responseEndDeflate(d) {
+ // if (d === undefined) d = fd;
+ // zlib.deflateRaw(head + d + foot, function (err, buff) {
+ // if (err) {
+ // throw err;
+ // } else {
+ // res.write(buff);
+ // res.end();
+ // }
+ // });
+ // }
+
+ var req = request; // request var is req = request
+ var res = response; // response var is res = response
+
+ //Error descriptions
+ var serverErrorDescs = {
+ 200: "The request succeeded! :)",
+ 201: "New resource has been created.",
+ 202: "The request has been accepted for processing, but the processing has not been completed.",
+ 400: "The request you made is invalid.",
+ 401: "You need to authenticate yourself in order to access the requested file.",
+ 402: "You need to pay in order to access the requested file.",
+ 403: "You don't have access to the requested file.",
+ 404: "The requested file doesn't exist. If you have typed URL manually, then please check the spelling.",
+ 405: "Method used to access the requested file isn't allowed.",
+ 406: "The request is capable of generating only not acceptable content.",
+ 407: "You need to authenticate yourself in order to use the proxy.",
+ 408: "You have timed out.",
+ 409: "The request you sent conflicts with the current state of the server.",
+ 410: "The requested file is permanently deleted.",
+ 411: "Content-Length property is required.",
+ 412: "The server doesn't meet preconditions you put in the request.",
+ 413: "The request you sent is too large.",
+ 414: "URL you sent is too long.",
+ 415: "The media type of request you sent isn't supported by the server.",
+ 416: "Content-Range you sent is unsatisfiable.",
+ 417: "Expectation in Expect property couldn't be satisfied.",
+ 418: "The server (teapot) can't brew any coffee! ;)",
+ 421: "The request you made isn't intended for this server.",
+ 422: "The server couldn't process content sent by you.",
+ 423: "The requested file is locked.",
+ 424: "The request depends on another failed request.",
+ 425: "The server is unwilling to risk processing a request that might be replayed.",
+ 426: "You need to upgrade protocols you use to request a file.",
+ 428: "The request you sent needs to be conditional, but it isn't.",
+ 429: "You sent too much requests to the server.",
+ 431: "The request you sent contains headers, that are too large.",
+ 451: "The requested file isn't accessible for legal reasons.",
+ 500: "The server had an unexpected error. Below, the error stack is shown: {stack}
Please contact with developer/administrator at {contact}.",
+ 501: "The request requires use of a function, which isn't implemented (yet) by the server.",
+ 502: "The server had an error, while it was acting as a gateway.
Please contact with developer/administrator at {contact}.",
+ 503: "Service provided by the server isn't available (yet).
Please contact with developer/administrator at {contact}.",
+ 504: "The server couldn't get response in time, while it was acting as a gateway.
Please contact with developer/administrator at {contact}.",
+ 505: "The server doesn't support HTTP version used in the request.",
+ 506: "Variant header is configured to be engaged in content negotiation.
Please contact with developer/administrator at {contact}.",
+ 507: "The server ran out of disk space neccessary to complete the request.",
+ 508: "The server detected an infinite loop while processing the request.",
+ 509: "The server has it's bandwidth limit exceeded.
Please contact with developer/administrator at {contact}.",
+ 510: "The server requires an extended HTTP request. The request you made isn't an extended HTTP request.",
+ 511: "You need to authenticate yourself in order to get network access.",
+ 598: "The server couldn't get response in time, while it was acting as a proxy.",
+ 599: "The server couldn't connect in time, while it was acting as a proxy."
+ };
+
+ //Server error calling method
+ // Server error calling method
+ function callServerError(errorCode, extName, stack, ch) {
+ if (typeof errorCode !== "number") {
+ throw new TypeError("HTTP error code parameter needs to be an integer.");
+ }
+
+ // Handle optional parameters
+ if (extName && typeof extName === "object") {
+ ch = stack;
+ stack = extName;
+ extName = undefined;
+ } else if (typeof extName !== "string" && extName !== null && extName !== undefined) {
+ throw new TypeError("Extension name parameter needs to be a string.");
+ }
+
+ if (stack && typeof stack === "object" && Object.prototype.toString.call(stack) !== "[object Error]") {
+ ch = stack;
+ stack = undefined;
+ } else if (typeof stack !== "object" && typeof stack !== "string" && stack) {
+ throw new TypeError("Error stack parameter needs to be either a string or an instance of Error object.");
+ }
+
+ var errorFile = errorCode.toString() + ".html";
+ var errorFile2 = "." + errorCode.toString();
+ if (fs.existsSync(errorFile2)) errorFile = errorFile2;
+ if (errorCode == 404 && fs.existsSync(page404)) errorFile = page404;
+
+ // Generate error stack if not provided
+ if (Object.prototype.toString.call(stack) === "[object Error]") stack = generateErrorStack(stack);
+ if (stack === undefined) stack = generateErrorStack(new Error("Unknown error"));
+
+ if (errorCode == 500 || errorCode == 502) {
+ serverconsole.errmessage("There was an error while processing the request!");
+ serverconsole.errmessage("Stack:");
+ serverconsole.errmessage(stack);
+ }
+
+ // Hide the error stack if specified
+ if (stackHidden) stack = "[error stack hidden]";
+
+ // Validate the error code and handle unknown codes
+ if (serverErrorDescs[errorCode] === undefined) {
+ callServerError(501, extName, stack);
+ } else {
+ var cheaders = getCustomHeaders();
+
+ // Process custom headers if provided
+ if (ch) {
+ var chon = Object.keys(cheaders);
+ var chn = Object.keys(ch);
+ for (var i = 0; i < chn.length; i++) {
+ var nhn = chn[i];
+ for (var j = 0; j < chon.length; j++) {
+ if (chon[j].toLowerCase() == chn[i].toLowerCase()) {
+ nhn = chon[j];
+ break;
+ }
+ }
+ if (ch[chn[i]]) cheaders[nhn] = ch[chn[i]];
+ }
+ }
+
+ cheaders["Content-Type"] = "text/html; charset=utf-8";
+
+ // Set default Allow header for 405 error if not provided
+ if (errorCode == 405 && !cheaders["Allow"]) cheaders["Allow"] = "GET, POST, HEAD, OPTIONS";
+
+ // Read the error file and replace placeholders with error information
+ fs.readFile(errorFile, function (err, data) {
+ try {
+ if (err) throw err;
+ response.writeHead(errorCode, http.STATUS_CODES[errorCode], cheaders);
+ fd += data.toString().replace(/{errorMessage}/g, errorCode.toString() + " " + http.STATUS_CODES[errorCode]).replace(/{errorDesc}/g, serverErrorDescs[errorCode]).replace(/{stack}/g, stack.replace(/&/g, "&").replace(//g, ">").replace(/\r\n/g, " ").replace(/\n/g, " ").replace(/\r/g, " ").replace(/ {2}/g, " ")).replace(/{path}/g, request.url.replace(/&/g, "&").replace(//g, ">")).replace(/{server}/g, "" + (exposeServerVersion ? "SVR.JS/" + version + " (" + getOS() + "; " + (process.isBun ? ("Bun/v" + process.versions.bun + "; like Node.JS/" + process.version) : ("Node.JS/" + process.version)) + ")" : "SVR.JS") + (extName == undefined ? "" : " " + extName) + ((req.headers.host == undefined || isProxy) ? "" : " on " + String(req.headers.host).replace(/&/g, "&").replace(//g, ">"))).replace(/{contact}/g, serverAdmin.replace(/\./g, "[dot]").replace(/@/g, "[at]")); // Replace placeholders in error response
+ responseEnd();
+ } catch (ex) {
+ var additionalError = 500;
+ // Handle additional error cases
+ if (ex.code == "ENOENT") {
+ additionalError = 404;
+ } else if (ex.code == "EACCES") {
+ additionalError = 403;
+ } else if (ex.code == "EMFILE") {
+ additionalError = 429;
+ } else if (ex.code == "ELOOP") {
+ additionalError = 508;
+ }
+
+ response.writeHead(errorCode, http.STATUS_CODES[errorCode], cheaders);
+ response.write(("
{errorMessage}
{errorMessage}
{errorDesc}
" + ((additionalError == 404) ? "" : "
Additionally, a {additionalError} error occurred while loading an error page.
To use all DorianTech SVR.JS features, such as all directory traversal protections; use server-side JS; and recieve product support, your copy of DorianTech SVR.JS must be validated as genuine.
This copy of SVR.JS is not genuine.");
+ serverconsole.resmessage("You may be a victim of software counterfeiting.");
+ } else {
+ res.writeHead(200, "OK", hdhds);
+ res.end("\n\n\n\nSVR.JS Genuine Advantage\n\n\n
Activate SVR.JS
\nYou will then be able to use all of SVR.JS features through SVR.JS Genuine Advantage!\n\n
And Satan created Mammon. His work won people from all over the school. When people abandoned them through the Piracy Window, so Satan went back in time and created the Server to continue to wreak havoc all over the school.
\n
from The Summary of Book of ZSOiE
\n \n \n");
+ return;
+ }
+ var randomValue = Math.random();
+ if (randomValue > 0.85714) {
+ res.end("\n\n\n\n \n The Book of ZSOiE, 7:28\n \n \n \n \n \n \n
The Server continues to cultivate it's Dafa. The Author found the Robot and asked him for help. Then the Robot started to help the Author to improve his Server. And the Author tries to create yet another server without using the main node...
\n
from The Book of ZSOiE, 7:28
\n \n \n");
+ } else if (randomValue > 0.71429) {
+ res.end("\n\n\n\n \n The Book of ZSOiE, 7:16\n \n \n \n \n \n \n
The Server is still going. But the Author commanded to the Server: \"thou shalt you split to two branches.\". And the Server did split it's Dafa. One of two branches stopped serving on old and rusty node. Other one is still serving on that, but it will later vanish... \"Mammon will get confused\" - said the Author.
\n
from The Book of ZSOiE, 7:16
\n \n \n");
+ } else if (randomValue > 0.57143) {
+ res.end("\n\n\n\n \n The Book of ZSOiE, 7:2\n \n \n \n \n \n \n
The old Server forces died. The all-powerful new Server rosen from ashes of old Server like phoenix followed the ways of Durability-Ease-Reliability and cultivated his Dafa. Then, the Author and Whyvn appeared on best former Mammon's disciples paper.
\n
from The Book of ZSOiE, 7:2
\n \n \n");
+ } else if (randomValue > 0.42857) {
+ res.end("\n\n\n\n \n The Book of ZSOiE, 6:24\n \n \n \n \n \n \n
Mammon had enough karmic retribution. The Author tried it's Server on main node's substitute. Then, the Author saw, that Server's Dafa is good, and that main node, it's substitute, and older Mammon are good. Meanwhile the Author, Whyvn, and Snovbyn rejoiced even more from their success over older Mammon.
\n
from The Book of ZSOiE, 6:24
\n \n \n");
+ } else if (randomValue > 0.32143) {
+ res.end("\n\n\n\n \n The Book of ZSOiE, 6:6\n \n \n \n \n \n \n
And the Server is about to come. The Author along with Whyvn and Snovbyn passing the Mammon's test rejoiced their success over older Mammon.
\n
from The Book of ZSOiE, 6:6
\n \n \n");
+ } else if (randomValue > 0.14286) {
+ res.end("\n\n\n\n \n The Book of ZSOiE, 5:25\n \n \n \n \n \n \n
The twins of Mammon quarrelled. The Author with it's Server and it's main node plunged the Mammon's servers into darkness. Meanwhile Whyvn and Snovbyn helped him to break Mammon's servers.
\n
from The Book of ZSOiE, 5:25
\n \n \n");
+ } else {
+ res.end("\n\n\n\n \n The Book of ZSOiE, 3:16\n \n \n \n \n \n \n
Mammon slept. Meanwhile, the Author, Whyvn and Snovbyn being in very skill-requiring challenge casted tcpdump and mongodb on him.