Initial commit
BIN
.dirimages/archive.png
Normal file
After Width: | Height: | Size: 6.6 KiB |
BIN
.dirimages/audio.png
Normal file
After Width: | Height: | Size: 6.4 KiB |
BIN
.dirimages/bad.png
Normal file
After Width: | Height: | Size: 6.8 KiB |
BIN
.dirimages/css.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
.dirimages/directory.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
.dirimages/diskimage.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
.dirimages/fifo.png
Normal file
After Width: | Height: | Size: 4 KiB |
BIN
.dirimages/font.png
Normal file
After Width: | Height: | Size: 8.9 KiB |
BIN
.dirimages/html.png
Normal file
After Width: | Height: | Size: 9.8 KiB |
BIN
.dirimages/hwdevice.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
.dirimages/image.png
Normal file
After Width: | Height: | Size: 6.4 KiB |
BIN
.dirimages/important.png
Normal file
After Width: | Height: | Size: 6.5 KiB |
BIN
.dirimages/javascript.png
Normal file
After Width: | Height: | Size: 7 KiB |
BIN
.dirimages/other.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
.dirimages/php.png
Normal file
After Width: | Height: | Size: 8.2 KiB |
BIN
.dirimages/return.png
Normal file
After Width: | Height: | Size: 6.7 KiB |
BIN
.dirimages/socket.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
.dirimages/text.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
.dirimages/video.png
Normal file
After Width: | Height: | Size: 7.1 KiB |
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
node_modules
|
||||||
|
commit.sh
|
21
LICENSE
Normal file
|
@ -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.
|
86
config.json
Normal file
|
@ -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
|
||||||
|
}
|
BIN
favicon.ico
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
hexstrbase64/fail.png
Normal file
After Width: | Height: | Size: 243 B |
124
hexstrbase64/hexstrbase64/base64.js
Normal file
|
@ -0,0 +1,124 @@
|
||||||
|
//Base64.js for hexstrbase64 library for Node.js
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2012 Miles Shang <mail@mshang.ca>
|
||||||
|
*
|
||||||
|
* 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;
|
123
hexstrbase64/hexstrbase64/base64_browser.js
Normal file
|
@ -0,0 +1,123 @@
|
||||||
|
//Base64.js for hexstrbase64 library for browser
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2012 Miles Shang <mail@mshang.ca>
|
||||||
|
*
|
||||||
|
* 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;
|
||||||
|
}
|
129
hexstrbase64/hexstrbase64/main.js
Normal file
|
@ -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<hex.length;i += 4) {
|
||||||
|
escaped += new String("%u" + hex.charAt(i) + hex.charAt(i + 1) + hex.charAt(i + 2) + hex.charAt(i + 3)).toString().split("undefined").join("");
|
||||||
|
}
|
||||||
|
value = unescape(escaped).split(unescape("%00")).join("");
|
||||||
|
} catch (ex) {
|
||||||
|
var modex = ex.toString().split('Error: ');
|
||||||
|
modex[0] = '';
|
||||||
|
if (typeof modex == 'object') {
|
||||||
|
throw new Error(
|
||||||
|
'Invaild hex input: ' + s + '. Reason: ' + modex.join('')
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
throw new Error('Invaild hex input: ' + s + '. Reason: ' + ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
value = Buffer.from(s, 'utf8').toString(e);
|
||||||
|
}
|
||||||
|
function toString(en) {
|
||||||
|
//function toStringE(en,type) {
|
||||||
|
if (en == 'base64') {
|
||||||
|
return base64.encode(value);
|
||||||
|
} else if (en == 'hex') {
|
||||||
|
var result = "";
|
||||||
|
for(var i=0;i<value.length;i++) {
|
||||||
|
var unicode = escape(value.charAt(i));
|
||||||
|
var hex = "";
|
||||||
|
if(value.charAt(i) == "\n") {
|
||||||
|
hex = "000a";
|
||||||
|
} else if(value.charAt(i) == "\r") {
|
||||||
|
hex = "000d";
|
||||||
|
} else if(value.charAt(i) == " ") {
|
||||||
|
hex = "0020";
|
||||||
|
} else if(value.charAt(i) == "\0") {
|
||||||
|
hex = "";
|
||||||
|
} else if(unicode == value.charAt(i)) {
|
||||||
|
var oldhex = value.charCodeAt(i).toString(16);
|
||||||
|
var newhex = "";
|
||||||
|
if(oldhex.length < 4) {
|
||||||
|
for(var j=0;j<4-(oldhex.length%4);j++) {
|
||||||
|
newhex += "0";
|
||||||
|
}
|
||||||
|
newhex += oldhex;
|
||||||
|
} else {
|
||||||
|
newhex = oldhex;
|
||||||
|
}
|
||||||
|
hex = newhex;
|
||||||
|
} else {
|
||||||
|
hex = unicode.split("%u").join("");
|
||||||
|
}
|
||||||
|
if(hex.length == 4 || hex === "") {
|
||||||
|
result += hex;
|
||||||
|
} else if(hex.length > 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;
|
126
hexstrbase64/hexstrbase64/main_browser.js
Normal file
|
@ -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<hex.length;i += 4) {
|
||||||
|
escaped += new String("%u" + hex.charAt(i) + hex.charAt(i + 1) + hex.charAt(i + 2) + hex.charAt(i + 3)).toString().split("undefined").join("");
|
||||||
|
}
|
||||||
|
value = unescape(escaped).split(unescape("%00")).join("");
|
||||||
|
} catch (ex) {
|
||||||
|
var modex = ex.toString().split('Error: ');
|
||||||
|
modex[0] = '';
|
||||||
|
if (typeof modex == 'object') {
|
||||||
|
throw new Error(
|
||||||
|
'Invaild hex input: ' + s + '. Reason: ' + modex.join('')
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
throw new Error('Invaild hex input: ' + s + '. Reason: ' + ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
value = new TextDecoder(e).decode(new TextEncoder('utf8').encode(s));
|
||||||
|
}
|
||||||
|
//function toStringE(en,type) {
|
||||||
|
function toString(en) {
|
||||||
|
if (en == 'base64') {
|
||||||
|
return base64.encode(value);
|
||||||
|
} else if (en == 'hex') {
|
||||||
|
var result = "";
|
||||||
|
for(var i=0;i<value.length;i++) {
|
||||||
|
var unicode = escape(value.charAt(i));
|
||||||
|
var hex = "";
|
||||||
|
if(value.charAt(i) == "\n") {
|
||||||
|
hex = "000a";
|
||||||
|
} else if(value.charAt(i) == "\r") {
|
||||||
|
hex = "000d";
|
||||||
|
} else if(value.charAt(i) == " ") {
|
||||||
|
hex = "0020";
|
||||||
|
} else if(value.charAt(i) == "\0") {
|
||||||
|
hex = "";
|
||||||
|
} else if(unicode == value.charAt(i)) {
|
||||||
|
var oldhex = value.charCodeAt(i).toString(16);
|
||||||
|
var newhex = "";
|
||||||
|
if(oldhex.length < 4) {
|
||||||
|
for(var j=0;j<4-(oldhex.length%4);j++) {
|
||||||
|
newhex += "0";
|
||||||
|
}
|
||||||
|
newhex += oldhex;
|
||||||
|
} else {
|
||||||
|
newhex = oldhex;
|
||||||
|
}
|
||||||
|
hex = newhex;
|
||||||
|
} else {
|
||||||
|
hex = unicode.split("%u").join("");
|
||||||
|
}
|
||||||
|
if(hex.length == 4 || hex === "") {
|
||||||
|
result += hex;
|
||||||
|
} else if(hex.length > 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
11
hexstrbase64/index.js
Normal file
|
@ -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;
|
BIN
hexstrbase64/ok.png
Normal file
After Width: | Height: | Size: 252 B |
8
hexstrbase64/readme.css
Normal file
|
@ -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;
|
||||||
|
}
|
31
hexstrbase64/readme.html
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>HexStrBase64 Readme</title>
|
||||||
|
<link rel="stylesheet" href="readme.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>hexstrbase64</h1>
|
||||||
|
<h2>How to install?</h2>
|
||||||
|
<h3>Node.js</h3>
|
||||||
|
<ol>
|
||||||
|
<li>Download library from <a href="https://repl.it/@DorianNiemiec/Hex-String-Base64-NodeJS-Library.zip" download>here</a>.</li>
|
||||||
|
<li>Modify index.js</li>
|
||||||
|
<li>Write header in program (replace <b>./hexstrbase64</b> with your path to hexstrbase64 library):</li>
|
||||||
|
<div class="code">
|
||||||
|
var hexstrbase64 = require("<b>./hexstrbase64</b>/index.js");<br/>
|
||||||
|
</div>
|
||||||
|
<li>Now hexstrbase64 library added to program!</li>
|
||||||
|
</ol>
|
||||||
|
<h3>Browser Javascript</h3>
|
||||||
|
<ol>
|
||||||
|
<li>Download library from <a href="https://repl.it/@DorianNiemiec/Hex-String-Base64-NodeJS-Library.zip" download>here</a>.</li>
|
||||||
|
<li>Write this code in <head> element (replace <b>hexstrbase64/</b> with your path to hexstrbase64 library):</li>
|
||||||
|
<div class="code">
|
||||||
|
<script src="<b>hexstrbase64/</b>hexstrbase64/base64_browser.js"></script><br/>
|
||||||
|
<script src="<b>hexstrbase64/</b>hexstrbase64/main_browser.js"></script>
|
||||||
|
</div>
|
||||||
|
<li>Now hexstrbase64 library added to HTML!</li>
|
||||||
|
</ol>
|
||||||
|
</body>
|
||||||
|
</html>
|
13
hexstrbase64/test/base64.html
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>hexstrbase64 base64 test</title>
|
||||||
|
<script src="../hexstrbase64/base64_browser.js"></script>
|
||||||
|
<script src="../hexstrbase64/main_browser.js"></script>
|
||||||
|
<script src="base64.js"></script>
|
||||||
|
<script>
|
||||||
|
testStart();
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
</html>
|
56
hexstrbase64/test/base64.js
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
function nameObj(n, v) {
|
||||||
|
return {name:n, value:v};
|
||||||
|
}
|
||||||
|
|
||||||
|
function testStart() {
|
||||||
|
document.write('<meta charset="UTF-8">');
|
||||||
|
document.write('<title>hexstrbase64 base64 test</title>');
|
||||||
|
console.log("TESTING STARTED");
|
||||||
|
for (var i = 0; i < 3; i++) {
|
||||||
|
document.write('<h1>' + enccases[i].name + '</h1>');
|
||||||
|
console.log("SWITCH " + enccases[i].name);
|
||||||
|
for (var j = 0; j < 2; j++) {
|
||||||
|
document.write('<h2>' + enccases[i].value[j].name + '</h2>');
|
||||||
|
console.log("CASE " + enccases[i].value[j].name);
|
||||||
|
console.log("MUST BE: " + enccases[i].value[j].value);
|
||||||
|
console.log("IS : " + hexstrbase64.strtobase64(enccases[i].value[j].name));
|
||||||
|
if (hexstrbase64.strtobase64(enccases[i].value[j].name) == enccases[i].value[j].value) {
|
||||||
|
document.write('<p><img src="../ok.png"></img>Equals</p>');
|
||||||
|
console.log("EQUALS");
|
||||||
|
} else {
|
||||||
|
document.write('<p><img src="../fail.png"></img>Not Equals</p>');
|
||||||
|
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!', 'AEgAZQBsAGwAbwAgAHcAbwByAGwAZAAh'),
|
||||||
|
nameObj('Lorem ipsum', 'AEwAbwByAGUAbQAgAGkAcABzAHUAbQ==')
|
||||||
|
]),
|
||||||
|
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.',
|
||||||
|
'AEwAbwByAGUAbQAgAGkAcABzAHUAbQAgAGQAbwBsAG8AcgAgAHMAaQB0ACAAYQBtAGUAdAAsACAAYwBvAG4AcwBlAGMAdABlAHQAdQByACAAYQBkAGkAcABpAHMAYwBpAG4AZwAgAGUAbABpAHQALgAgAFYAZQBzAHQAaQBiAHUAbAB1AG0AIABmAGUAcgBtAGUAbgB0AHUAbQAgAGEAYwAgAG4AaQBzAGwAIABhACAAcwBvAGwAbABpAGMAaQB0AHUAZABpAG4ALgAgAEMAcgBhAHMAIABpAG4AdABlAHIAZAB1AG0AIABkAHUAaQAgAHQAdQByAHAAaQBzACwAIABuAG8AbgAgAHMAYwBlAGwAZQByAGkAcwBxAHUAZQAu'
|
||||||
|
),
|
||||||
|
nameObj(
|
||||||
|
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus dapibus volutpat ligula at pulvinar. Etiam consequat mi fringilla facilisis eleifend.',
|
||||||
|
'AEwAbwByAGUAbQAgAGkAcABzAHUAbQAgAGQAbwBsAG8AcgAgAHMAaQB0ACAAYQBtAGUAdAAsACAAYwBvAG4AcwBlAGMAdABlAHQAdQByACAAYQBkAGkAcABpAHMAYwBpAG4AZwAgAGUAbABpAHQALgAgAFAAaABhAHMAZQBsAGwAdQBzACAAZABhAHAAaQBiAHUAcwAgAHYAbwBsAHUAdABwAGEAdAAgAGwAaQBnAHUAbABhACAAYQB0ACAAcAB1AGwAdgBpAG4AYQByAC4AIABFAHQAaQBhAG0AIABjAG8AbgBzAGUAcQB1AGEAdAAgAG0AaQAgAGYAcgBpAG4AZwBpAGwAbABhACAAZgBhAGMAaQBsAGkAcwBpAHMAIABlAGwAZQBpAGYAZQBuAGQALg=='
|
||||||
|
)
|
||||||
|
]),
|
||||||
|
nameObj('Unicode UTF8', [
|
||||||
|
nameObj(
|
||||||
|
'DorianTech Hex String Base64转换器',
|
||||||
|
'AEQAbwByAGkAYQBuAFQAZQBjAGgAIABIAGUAeAAgAFMAdAByAGkAbgBnACAAQgBhAHMAZQA2ADSPbGNiVmg====='
|
||||||
|
),
|
||||||
|
nameObj(
|
||||||
|
'DorianTech Hex String Base64转换器,用于由DorianTech提供的Node.js',
|
||||||
|
'AEQAbwByAGkAYQBuAFQAZQBjAGgAIABIAGUAeAAgAFMAdAByAGkAbgBnACAAQgBhAHMAZQA2ADSPbGNiVmj/DHUoTo51MQBEAG8AcgBpAGEAbgBUAGUAYwBoY9BPm3aEAE4AbwBkAGUALgBqAHM====='
|
||||||
|
)
|
||||||
|
])
|
||||||
|
];
|
13
hexstrbase64/test/hex.html
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>hexstrbase64 hex test</title>
|
||||||
|
<script src="../hexstrbase64/base64_browser.js"></script>
|
||||||
|
<script src="../hexstrbase64/main_browser.js"></script>
|
||||||
|
<script src="hex.js"></script>
|
||||||
|
<script>
|
||||||
|
testStart();
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
</html>
|
56
hexstrbase64/test/hex.js
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
function nameObj(n, v) {
|
||||||
|
return {name:n, value:v};
|
||||||
|
}
|
||||||
|
|
||||||
|
function testStart() {
|
||||||
|
document.write('<meta charset="UTF-8">');
|
||||||
|
document.write('<title>hexstrbase64 hex test</title>');
|
||||||
|
console.log("TESTING STARTED");
|
||||||
|
for (var i = 0; i < 3; i++) {
|
||||||
|
document.write('<h1>' + enccases[i].name + '</h1>');
|
||||||
|
console.log("SWITCH " + enccases[i].name);
|
||||||
|
for (var j = 0; j < 2; j++) {
|
||||||
|
document.write('<h2>' + enccases[i].value[j].name + '</h2>');
|
||||||
|
console.log("CASE " + enccases[i].value[j].name);
|
||||||
|
console.log("MUST BE: " + enccases[i].value[j].value);
|
||||||
|
console.log("IS : " + hexstrbase64.strtohex(enccases[i].value[j].name));
|
||||||
|
if (hexstrbase64.strtohex(enccases[i].value[j].name) == enccases[i].value[j].value) {
|
||||||
|
document.write('<p><img src="../ok.png"></img>Equals</p>');
|
||||||
|
console.log("EQUALS");
|
||||||
|
} else {
|
||||||
|
document.write('<p><img src="../fail.png"></img>Not Equals</p>');
|
||||||
|
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'
|
||||||
|
)
|
||||||
|
])
|
||||||
|
];
|
16
hexstrbase64/test/index.html
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>hexstrbase64 test</title>
|
||||||
|
<style>
|
||||||
|
iframe {
|
||||||
|
width: 200px;
|
||||||
|
height: 200px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<iframe src="base64.html"></iframe>
|
||||||
|
<iframe src="hex.html"></iframe>
|
||||||
|
</body>
|
||||||
|
</html>
|
1
hviews.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
0
|
130
index.html
Normal file
|
@ -0,0 +1,130 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>SVR.JS 3.4.17</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: FreeSans, Helvetica, Tahoma, Arial, sans-serif;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Welcome to SVR.JS 3.4.17</h1>
|
||||||
|
<br/>
|
||||||
|
<img src="/logo.png" style="width: 256px;" />
|
||||||
|
<br/>
|
||||||
|
<p>If you see this page, that means, that the server is properly working. You can further configure the server and replace <i>index.html</i> and <i>tests.html</i> pages with custom ones.</p>
|
||||||
|
<p>Default <i>config.json</i> looks like this:</p>
|
||||||
|
<div style="background-color: #e0e0e0; padding: 5px; text-align: left; display: inline-block;">
|
||||||
|
<code>
|
||||||
|
{<br/>
|
||||||
|
"users": [],<br/>
|
||||||
|
"port": 80,<br/>
|
||||||
|
"pubport": 80,<br/>
|
||||||
|
"page404": "404.html",<br/>
|
||||||
|
"timestamp": 1680954429282,<br/>
|
||||||
|
"blacklist": [],<br/>
|
||||||
|
"nonStandardCodes": [],<br/>
|
||||||
|
"enableCompression": true,<br/>
|
||||||
|
"customHeaders": {},<br/>
|
||||||
|
"enableHTTP2": false,<br/>
|
||||||
|
"enableLogging": true,<br/>
|
||||||
|
"enableDirectoryListing": true,<br/>
|
||||||
|
"enableDirectoryListingWithDefaultHead": false,<br/>
|
||||||
|
"serverAdministratorEmail": "[no contact information]",<br/>
|
||||||
|
"stackHidden": false,<br/>
|
||||||
|
"enableRemoteLogBrowsing": true,<br/>
|
||||||
|
"exposeServerVersion": true,<br/>
|
||||||
|
"disableServerSideScriptExpose": false,<br/>
|
||||||
|
"rewriteMap": [<br/>
|
||||||
|
{<br/>
|
||||||
|
"definingRegex": "/\\/invoke500\\/\\?/",<br/>
|
||||||
|
"replacements": dorians[<br/>
|
||||||
|
{<br/>
|
||||||
|
"regex": "/\\/invoke500\\/\\?/",<br/>
|
||||||
|
"replacement": "/invoke500.svr?"<br/>
|
||||||
|
}<br/>
|
||||||
|
]<br/>
|
||||||
|
},<br/>
|
||||||
|
{<br/>
|
||||||
|
"definingRegex": "/\\/invoke500\\/.+\\//",<br/>
|
||||||
|
"replacements": [<br/>
|
||||||
|
{<br/>
|
||||||
|
"regex": "/\\/\\?/",<br/>
|
||||||
|
"replacement": "&"<br/>
|
||||||
|
},<br/>
|
||||||
|
{<br/>
|
||||||
|
"regex": "/invoke500\\//",<br/>
|
||||||
|
"replacement": "invoke500.svr?"<br/>
|
||||||
|
},<br/>
|
||||||
|
{<br/>
|
||||||
|
"regex": "/\\/(?!invoke500.svr?)/",<br/>
|
||||||
|
"replacement": ""<br/>
|
||||||
|
}<br/>
|
||||||
|
]<br/>
|
||||||
|
},<br/>
|
||||||
|
{<br/>
|
||||||
|
"definingRegex": "/\\/invoke500\\/.+/",<br/>
|
||||||
|
"replacements": [<br/>
|
||||||
|
{<br/>
|
||||||
|
"regex": "/\\?/",<br/>
|
||||||
|
"replacement": "&"<br/>
|
||||||
|
},<br/>
|
||||||
|
{<br/>
|
||||||
|
"regex": "/invoke500\\//",<br/>
|
||||||
|
"replacement": "invoke500.svr?"<br/>
|
||||||
|
}<br/>
|
||||||
|
]<br/>
|
||||||
|
},<br/>
|
||||||
|
{<br/>
|
||||||
|
"definingRegex": "/\\/invoke500\\//",<br/>
|
||||||
|
"replacements": [<br/>
|
||||||
|
{<br/>
|
||||||
|
"regex": "/\\/invoke500\\//",<br/>
|
||||||
|
"replacement": "/invoke500.svr"<br/>
|
||||||
|
}<br/>
|
||||||
|
]<br/>
|
||||||
|
},<br/>
|
||||||
|
{<br/>
|
||||||
|
"definingRegex": "/\\/invoke500$/",<br/>
|
||||||
|
"replacements": [<br/>
|
||||||
|
{<br/>
|
||||||
|
"regex": "/\\/invoke500/",<br/>
|
||||||
|
"replacement": "/invoke500.svr"<br/>
|
||||||
|
}<br/>
|
||||||
|
]<br/>
|
||||||
|
}<br/>
|
||||||
|
],<br/>
|
||||||
|
"allowStatus": true,<br/>
|
||||||
|
"dontCompress": ["/.*\\.ipxe$/","/.*\\.img$/","/.*\\.iso$/"],<br/>
|
||||||
|
"enableIPSpoofing": false,<br/>
|
||||||
|
"secure": false,<br/>
|
||||||
|
"sni": {},<br/>
|
||||||
|
"disableNonEncryptedServer": false,<br/>
|
||||||
|
"disableToHTTPSRedirect": false<br/>
|
||||||
|
}
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<p>Changes:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Improved URL sanitizer.</li>
|
||||||
|
<li>Fixed bug with formidable wrapper.</li>
|
||||||
|
</ul>
|
||||||
|
<p>Bugs:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Some very old mods requiring hexstrbase64 will fail to load.</li>
|
||||||
|
<li>On first load server-side JavaScript will fail to load when SVR.JS is running on Bun.</li>
|
||||||
|
</ul>
|
||||||
|
<br/>
|
||||||
|
<a href="/tests.html">Tests</a><br/>
|
||||||
|
<a href="/licenses">Licenses</a><br/>
|
||||||
|
<a href="/svrjsstatus.svr">SVR.JS status page</a><br/>
|
||||||
|
<a href="https://svrjs.org/docs">More Information</a>
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<img src="/powered.png" />
|
||||||
|
</body>
|
||||||
|
</html>
|
BIN
lib/hexstrbase64/fail.png
Normal file
After Width: | Height: | Size: 243 B |
124
lib/hexstrbase64/hexstrbase64/base64.js
Normal file
|
@ -0,0 +1,124 @@
|
||||||
|
//Base64.js for hexstrbase64 library for Node.js
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2012 Miles Shang <mail@mshang.ca>
|
||||||
|
*
|
||||||
|
* 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;
|
123
lib/hexstrbase64/hexstrbase64/base64_browser.js
Normal file
|
@ -0,0 +1,123 @@
|
||||||
|
//Base64.js for hexstrbase64 library for browser
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2012 Miles Shang <mail@mshang.ca>
|
||||||
|
*
|
||||||
|
* 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;
|
||||||
|
}
|
129
lib/hexstrbase64/hexstrbase64/main.js
Normal file
|
@ -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<hex.length;i += 4) {
|
||||||
|
escaped += new String("%u" + hex.charAt(i) + hex.charAt(i + 1) + hex.charAt(i + 2) + hex.charAt(i + 3)).toString().split("undefined").join("");
|
||||||
|
}
|
||||||
|
value = unescape(escaped).split(unescape("%00")).join("");
|
||||||
|
} catch (ex) {
|
||||||
|
var modex = ex.toString().split('Error: ');
|
||||||
|
modex[0] = '';
|
||||||
|
if (typeof modex == 'object') {
|
||||||
|
throw new Error(
|
||||||
|
'Invaild hex input: ' + s + '. Reason: ' + modex.join('')
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
throw new Error('Invaild hex input: ' + s + '. Reason: ' + ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
value = Buffer.from(s, 'utf8').toString(e);
|
||||||
|
}
|
||||||
|
function toString(en) {
|
||||||
|
//function toStringE(en,type) {
|
||||||
|
if (en == 'base64') {
|
||||||
|
return base64.encode(value);
|
||||||
|
} else if (en == 'hex') {
|
||||||
|
var result = "";
|
||||||
|
for(var i=0;i<value.length;i++) {
|
||||||
|
var unicode = escape(value.charAt(i));
|
||||||
|
var hex = "";
|
||||||
|
if(value.charAt(i) == "\n") {
|
||||||
|
hex = "000a";
|
||||||
|
} else if(value.charAt(i) == "\r") {
|
||||||
|
hex = "000d";
|
||||||
|
} else if(value.charAt(i) == " ") {
|
||||||
|
hex = "0020";
|
||||||
|
} else if(value.charAt(i) == "\0") {
|
||||||
|
hex = "";
|
||||||
|
} else if(unicode == value.charAt(i)) {
|
||||||
|
var oldhex = value.charCodeAt(i).toString(16);
|
||||||
|
var newhex = "";
|
||||||
|
if(oldhex.length < 4) {
|
||||||
|
for(var j=0;j<4-(oldhex.length%4);j++) {
|
||||||
|
newhex += "0";
|
||||||
|
}
|
||||||
|
newhex += oldhex;
|
||||||
|
} else {
|
||||||
|
newhex = oldhex;
|
||||||
|
}
|
||||||
|
hex = newhex;
|
||||||
|
} else {
|
||||||
|
hex = unicode.split("%u").join("");
|
||||||
|
}
|
||||||
|
if(hex.length == 4 || hex === "") {
|
||||||
|
result += hex;
|
||||||
|
} else if(hex.length > 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;
|
126
lib/hexstrbase64/hexstrbase64/main_browser.js
Normal file
|
@ -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<hex.length;i += 4) {
|
||||||
|
escaped += new String("%u" + hex.charAt(i) + hex.charAt(i + 1) + hex.charAt(i + 2) + hex.charAt(i + 3)).toString().split("undefined").join("");
|
||||||
|
}
|
||||||
|
value = unescape(escaped).split(unescape("%00")).join("");
|
||||||
|
} catch (ex) {
|
||||||
|
var modex = ex.toString().split('Error: ');
|
||||||
|
modex[0] = '';
|
||||||
|
if (typeof modex == 'object') {
|
||||||
|
throw new Error(
|
||||||
|
'Invaild hex input: ' + s + '. Reason: ' + modex.join('')
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
throw new Error('Invaild hex input: ' + s + '. Reason: ' + ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
value = new TextDecoder(e).decode(new TextEncoder('utf8').encode(s));
|
||||||
|
}
|
||||||
|
//function toStringE(en,type) {
|
||||||
|
function toString(en) {
|
||||||
|
if (en == 'base64') {
|
||||||
|
return base64.encode(value);
|
||||||
|
} else if (en == 'hex') {
|
||||||
|
var result = "";
|
||||||
|
for(var i=0;i<value.length;i++) {
|
||||||
|
var unicode = escape(value.charAt(i));
|
||||||
|
var hex = "";
|
||||||
|
if(value.charAt(i) == "\n") {
|
||||||
|
hex = "000a";
|
||||||
|
} else if(value.charAt(i) == "\r") {
|
||||||
|
hex = "000d";
|
||||||
|
} else if(value.charAt(i) == " ") {
|
||||||
|
hex = "0020";
|
||||||
|
} else if(value.charAt(i) == "\0") {
|
||||||
|
hex = "";
|
||||||
|
} else if(unicode == value.charAt(i)) {
|
||||||
|
var oldhex = value.charCodeAt(i).toString(16);
|
||||||
|
var newhex = "";
|
||||||
|
if(oldhex.length < 4) {
|
||||||
|
for(var j=0;j<4-(oldhex.length%4);j++) {
|
||||||
|
newhex += "0";
|
||||||
|
}
|
||||||
|
newhex += oldhex;
|
||||||
|
} else {
|
||||||
|
newhex = oldhex;
|
||||||
|
}
|
||||||
|
hex = newhex;
|
||||||
|
} else {
|
||||||
|
hex = unicode.split("%u").join("");
|
||||||
|
}
|
||||||
|
if(hex.length == 4 || hex === "") {
|
||||||
|
result += hex;
|
||||||
|
} else if(hex.length > 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
11
lib/hexstrbase64/index.js
Normal file
|
@ -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;
|
BIN
lib/hexstrbase64/ok.png
Normal file
After Width: | Height: | Size: 252 B |
8
lib/hexstrbase64/readme.css
Normal file
|
@ -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;
|
||||||
|
}
|
31
lib/hexstrbase64/readme.html
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>HexStrBase64 Readme</title>
|
||||||
|
<link rel="stylesheet" href="readme.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>hexstrbase64</h1>
|
||||||
|
<h2>How to install?</h2>
|
||||||
|
<h3>Node.js</h3>
|
||||||
|
<ol>
|
||||||
|
<li>Download library from <a href="https://repl.it/@DorianNiemiec/Hex-String-Base64-NodeJS-Library.zip" download>here</a>.</li>
|
||||||
|
<li>Modify index.js</li>
|
||||||
|
<li>Write header in program (replace <b>./hexstrbase64</b> with your path to hexstrbase64 library):</li>
|
||||||
|
<div class="code">
|
||||||
|
var hexstrbase64 = require("<b>./hexstrbase64</b>/index.js");<br/>
|
||||||
|
</div>
|
||||||
|
<li>Now hexstrbase64 library added to program!</li>
|
||||||
|
</ol>
|
||||||
|
<h3>Browser Javascript</h3>
|
||||||
|
<ol>
|
||||||
|
<li>Download library from <a href="https://repl.it/@DorianNiemiec/Hex-String-Base64-NodeJS-Library.zip" download>here</a>.</li>
|
||||||
|
<li>Write this code in <head> element (replace <b>hexstrbase64/</b> with your path to hexstrbase64 library):</li>
|
||||||
|
<div class="code">
|
||||||
|
<script src="<b>hexstrbase64/</b>hexstrbase64/base64_browser.js"></script><br/>
|
||||||
|
<script src="<b>hexstrbase64/</b>hexstrbase64/main_browser.js"></script>
|
||||||
|
</div>
|
||||||
|
<li>Now hexstrbase64 library added to HTML!</li>
|
||||||
|
</ol>
|
||||||
|
</body>
|
||||||
|
</html>
|
13
lib/hexstrbase64/test/base64.html
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>hexstrbase64 base64 test</title>
|
||||||
|
<script src="../hexstrbase64/base64_browser.js"></script>
|
||||||
|
<script src="../hexstrbase64/main_browser.js"></script>
|
||||||
|
<script src="base64.js"></script>
|
||||||
|
<script>
|
||||||
|
testStart();
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
</html>
|
56
lib/hexstrbase64/test/base64.js
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
function nameObj(n, v) {
|
||||||
|
return {name:n, value:v};
|
||||||
|
}
|
||||||
|
|
||||||
|
function testStart() {
|
||||||
|
document.write('<meta charset="UTF-8">');
|
||||||
|
document.write('<title>hexstrbase64 base64 test</title>');
|
||||||
|
console.log("TESTING STARTED");
|
||||||
|
for (var i = 0; i < 3; i++) {
|
||||||
|
document.write('<h1>' + enccases[i].name + '</h1>');
|
||||||
|
console.log("SWITCH " + enccases[i].name);
|
||||||
|
for (var j = 0; j < 2; j++) {
|
||||||
|
document.write('<h2>' + enccases[i].value[j].name + '</h2>');
|
||||||
|
console.log("CASE " + enccases[i].value[j].name);
|
||||||
|
console.log("MUST BE: " + enccases[i].value[j].value);
|
||||||
|
console.log("IS : " + hexstrbase64.strtobase64(enccases[i].value[j].name));
|
||||||
|
if (hexstrbase64.strtobase64(enccases[i].value[j].name) == enccases[i].value[j].value) {
|
||||||
|
document.write('<p><img src="../ok.png"></img>Equals</p>');
|
||||||
|
console.log("EQUALS");
|
||||||
|
} else {
|
||||||
|
document.write('<p><img src="../fail.png"></img>Not Equals</p>');
|
||||||
|
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!', 'AEgAZQBsAGwAbwAgAHcAbwByAGwAZAAh'),
|
||||||
|
nameObj('Lorem ipsum', 'AEwAbwByAGUAbQAgAGkAcABzAHUAbQ==')
|
||||||
|
]),
|
||||||
|
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.',
|
||||||
|
'AEwAbwByAGUAbQAgAGkAcABzAHUAbQAgAGQAbwBsAG8AcgAgAHMAaQB0ACAAYQBtAGUAdAAsACAAYwBvAG4AcwBlAGMAdABlAHQAdQByACAAYQBkAGkAcABpAHMAYwBpAG4AZwAgAGUAbABpAHQALgAgAFYAZQBzAHQAaQBiAHUAbAB1AG0AIABmAGUAcgBtAGUAbgB0AHUAbQAgAGEAYwAgAG4AaQBzAGwAIABhACAAcwBvAGwAbABpAGMAaQB0AHUAZABpAG4ALgAgAEMAcgBhAHMAIABpAG4AdABlAHIAZAB1AG0AIABkAHUAaQAgAHQAdQByAHAAaQBzACwAIABuAG8AbgAgAHMAYwBlAGwAZQByAGkAcwBxAHUAZQAu'
|
||||||
|
),
|
||||||
|
nameObj(
|
||||||
|
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus dapibus volutpat ligula at pulvinar. Etiam consequat mi fringilla facilisis eleifend.',
|
||||||
|
'AEwAbwByAGUAbQAgAGkAcABzAHUAbQAgAGQAbwBsAG8AcgAgAHMAaQB0ACAAYQBtAGUAdAAsACAAYwBvAG4AcwBlAGMAdABlAHQAdQByACAAYQBkAGkAcABpAHMAYwBpAG4AZwAgAGUAbABpAHQALgAgAFAAaABhAHMAZQBsAGwAdQBzACAAZABhAHAAaQBiAHUAcwAgAHYAbwBsAHUAdABwAGEAdAAgAGwAaQBnAHUAbABhACAAYQB0ACAAcAB1AGwAdgBpAG4AYQByAC4AIABFAHQAaQBhAG0AIABjAG8AbgBzAGUAcQB1AGEAdAAgAG0AaQAgAGYAcgBpAG4AZwBpAGwAbABhACAAZgBhAGMAaQBsAGkAcwBpAHMAIABlAGwAZQBpAGYAZQBuAGQALg=='
|
||||||
|
)
|
||||||
|
]),
|
||||||
|
nameObj('Unicode UTF8', [
|
||||||
|
nameObj(
|
||||||
|
'DorianTech Hex String Base64转换器',
|
||||||
|
'AEQAbwByAGkAYQBuAFQAZQBjAGgAIABIAGUAeAAgAFMAdAByAGkAbgBnACAAQgBhAHMAZQA2ADSPbGNiVmg====='
|
||||||
|
),
|
||||||
|
nameObj(
|
||||||
|
'DorianTech Hex String Base64转换器,用于由DorianTech提供的Node.js',
|
||||||
|
'AEQAbwByAGkAYQBuAFQAZQBjAGgAIABIAGUAeAAgAFMAdAByAGkAbgBnACAAQgBhAHMAZQA2ADSPbGNiVmj/DHUoTo51MQBEAG8AcgBpAGEAbgBUAGUAYwBoY9BPm3aEAE4AbwBkAGUALgBqAHM====='
|
||||||
|
)
|
||||||
|
])
|
||||||
|
];
|
13
lib/hexstrbase64/test/hex.html
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>hexstrbase64 hex test</title>
|
||||||
|
<script src="../hexstrbase64/base64_browser.js"></script>
|
||||||
|
<script src="../hexstrbase64/main_browser.js"></script>
|
||||||
|
<script src="hex.js"></script>
|
||||||
|
<script>
|
||||||
|
testStart();
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
</html>
|
56
lib/hexstrbase64/test/hex.js
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
function nameObj(n, v) {
|
||||||
|
return {name:n, value:v};
|
||||||
|
}
|
||||||
|
|
||||||
|
function testStart() {
|
||||||
|
document.write('<meta charset="UTF-8">');
|
||||||
|
document.write('<title>hexstrbase64 hex test</title>');
|
||||||
|
console.log("TESTING STARTED");
|
||||||
|
for (var i = 0; i < 3; i++) {
|
||||||
|
document.write('<h1>' + enccases[i].name + '</h1>');
|
||||||
|
console.log("SWITCH " + enccases[i].name);
|
||||||
|
for (var j = 0; j < 2; j++) {
|
||||||
|
document.write('<h2>' + enccases[i].value[j].name + '</h2>');
|
||||||
|
console.log("CASE " + enccases[i].value[j].name);
|
||||||
|
console.log("MUST BE: " + enccases[i].value[j].value);
|
||||||
|
console.log("IS : " + hexstrbase64.strtohex(enccases[i].value[j].name));
|
||||||
|
if (hexstrbase64.strtohex(enccases[i].value[j].name) == enccases[i].value[j].value) {
|
||||||
|
document.write('<p><img src="../ok.png"></img>Equals</p>');
|
||||||
|
console.log("EQUALS");
|
||||||
|
} else {
|
||||||
|
document.write('<p><img src="../fail.png"></img>Not Equals</p>');
|
||||||
|
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'
|
||||||
|
)
|
||||||
|
])
|
||||||
|
];
|
16
lib/hexstrbase64/test/index.html
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>hexstrbase64 test</title>
|
||||||
|
<style>
|
||||||
|
iframe {
|
||||||
|
width: 200px;
|
||||||
|
height: 200px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<iframe src="base64.html"></iframe>
|
||||||
|
<iframe src="hex.html"></iframe>
|
||||||
|
</body>
|
||||||
|
</html>
|
BIN
licenses/.index.html.kate-swp
Normal file
21
licenses/asap.txt
Normal file
|
@ -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.
|
||||||
|
|
0
licenses/asn1.js-rfc2560.txt
Normal file
0
licenses/asn1.js-rfc5280.txt
Normal file
0
licenses/asn1.js.txt
Normal file
19
licenses/async.txt
Normal file
|
@ -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.
|
19
licenses/bn.js.txt
Normal file
|
@ -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.
|
21
licenses/call-bind.txt
Normal file
|
@ -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.
|
15
licenses/chownr.txt
Normal file
|
@ -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.
|
15
licenses/dezalgo.txt
Normal file
|
@ -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.
|
21
licenses/formidable.txt
Normal file
|
@ -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.
|
15
licenses/fs-minipass.txt
Normal file
|
@ -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.
|
20
licenses/function-bind.txt
Normal file
|
@ -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.
|
||||||
|
|
21
licenses/get-intrinsic.txt
Normal file
|
@ -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.
|
15
licenses/graceful-fs.txt
Normal file
|
@ -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.
|
21
licenses/has-symbols.txt
Normal file
|
@ -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.
|
22
licenses/has.txt
Normal file
|
@ -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.
|
9
licenses/hexoid.txt
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (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.
|
357
licenses/index.html
Normal file
|
@ -0,0 +1,357 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>SVR.JS 3.4.17 Licenses</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: FreeSans, Helvetica, Tahoma, Arial, sans-serif;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>SVR.JS 3.4.17 Licenses</h1>
|
||||||
|
<h2>SVR.JS 3.4.17</h2>
|
||||||
|
<div style="display: inline-block; text-align: left; border-width: 2px; border-style: solid; border-color: gray; padding: 8px;">
|
||||||
|
MIT License<br/>
|
||||||
|
<br/>
|
||||||
|
Copyright (c) 2020 DorianTech S.A.<br/>
|
||||||
|
<br/>
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy<br/>
|
||||||
|
of this software and associated documentation files (the "Software"), to deal<br/>
|
||||||
|
in the Software without restriction, including without limitation the rights<br/>
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell<br/>
|
||||||
|
copies of the Software, and to permit persons to whom the Software is<br/>
|
||||||
|
furnished to do so, subject to the following conditions:<br/>
|
||||||
|
<br/>
|
||||||
|
The above copyright notice and this permission notice shall be included in all<br/>
|
||||||
|
copies or substantial portions of the Software.<br/>
|
||||||
|
<br/>
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR<br/>
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,<br/>
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE<br/>
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER<br/>
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,<br/>
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE<br/>
|
||||||
|
SOFTWARE.<br/>
|
||||||
|
</div>
|
||||||
|
<h2>Packages used by SVR.JS 3.4.17 and utilities</h2>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: MIT</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/asap.txt"><b>asap</b></a>
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
High-priority task queue for Node.js and browsers
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: MIT</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/asn1.js.txt"><b>asn1.js</b></a> (by Fedor Indutny)
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
ASN.1 encoder and decoder
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: MIT</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/asn1.js-rfc2560.txt"><b>asn1.js-rfc2560</b></a> (by Fedor Indutny)
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
RFC2560 structures for asn1.js
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: MIT</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/asn1.js-rfc5280.txt"><b>asn1.js-rfc5280</b></a> (by Felix Hanley)
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
RFC5280 extension structures for asn1.js
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: MIT</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/async.txt"><b>async</b></a> (by Caolan McMahon)
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
Higher-order functions and common patterns for asynchronous code
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: MIT</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/bn.js.txt"><b>bn.js</b></a> (by Fedor Indutny)
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
Big number implementation in pure javascript
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: MIT</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/call-bind.txt"><b>call-bind</b></a> (by Jordan Harband)
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
Robustly `.call.bind()` a function
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: ISC</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/chownr.txt"><b>chownr</b></a> (by Isaac Z. Schlueter)
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
like `chown -R`
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: ISC</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/dezalgo.txt"><b>dezalgo</b></a> (by Isaac Z. Schlueter)
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
Contain async insanity so that the dark pony lord doesn't eat souls
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: MIT</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/formidable.txt"><b>formidable</b></a>
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
A node.js module for parsing form data, especially file uploads.<br/>
|
||||||
|
<b>Required by SVR.JS. Patched to work with Node.JS 8.x</b>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: ISC</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/fs-minipass.txt"><b>fs-minipass</b></a> (by Isaac Z. Schlueter)
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
fs read and write streams based on minipass<br/>
|
||||||
|
<b>Patched to work with Bun</b>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: MIT</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/function-bind.txt"><b>function-bind</b></a> (by Raynos)
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
Implementation of Function.prototype.bind
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: MIT</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/get-intrinsic.txt"><b>get-intrinsic</b></a> (by Jordan Harband)
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
Get and robustly cache all JS language-level intrinsics at first require time
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: ISC</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/graceful-fs.txt"><b>graceful-fs</b></a>
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
A drop-in replacement for fs, making various improvements.<br/>
|
||||||
|
<b>Required by SVR.JS.</b>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: MIT</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/has.txt"><b>has</b></a> (by Thiago de Arruda)
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
Object.prototype.hasOwnProperty.call shortcut
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: MIT</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/has-symbols.txt"><b>has-symbols</b></a> (by Jordan Harband)
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
Determine if the JS environment has Symbol support. Supports spec, or shams.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: MIT</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/hexoid.txt"><b>hexoid</b></a> (by Luke Edwards)
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
A tiny (190B) and extremely fast utility to generate random IDs of fixed length
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: ISC</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/inherits.txt"><b>inherits</b></a>
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
Browser-friendly inheritance fully compatible with standard node.js inherits()
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: MIT</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/mime-db.txt"><b>mime-db</b></a>
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
Media Type Database
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: MIT</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/mime-types.txt"><b>mime-types</b></a>
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
The ultimate javascript content-type utility.<br/>
|
||||||
|
<b>Required by SVR.JS.</b>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: ISC</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/minimalistic-assert.txt"><b>minimalistic-assert</b></a>
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
minimalistic-assert ===
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: ISC</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/minipass.txt"><b>minipass</b></a> (by Isaac Z. Schlueter)
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
minimal implementation of a PassThrough stream
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: MIT</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/minizlib.txt"><b>minizlib</b></a> (by Isaac Z. Schlueter)
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
A small fast zlib stream built on <a href="http://npm.im/minipass">minipass</a> and Node.js's zlib binding.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: MIT</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/mkdirp.txt"><b>mkdirp</b></a>
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
Recursively mkdir, like `mkdir -p`
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: MIT</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/object-inspect.txt"><b>object-inspect</b></a> (by James Halliday)
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
string representations of objects in node and the browser
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: MIT</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/ocsp.txt"><b>ocsp</b></a> (by Fedor Indutny)
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
OCSP Stapling implementation<br/>
|
||||||
|
<b>Required by SVR.JS.</b>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: ISC</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/once.txt"><b>once</b></a> (by Isaac Z. Schlueter)
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
Run a function exactly one time
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: MIT</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/pretty-bytes.txt"><b>pretty-bytes</b></a> (by Sindre Sorhus)
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
Convert bytes to a human readable string: 1337 → 1.34 kB<br/>
|
||||||
|
<b>Required by SVR.JS.</b>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: BSD-3</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/qs.txt"><b>qs</b></a>
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
A querystring parser that supports nesting and arrays, with a depth limit
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: MIT</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/side-channel.txt"><b>side-channel</b></a> (by Jordan Harband)
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
Store information about any JS value in a side channel. Uses WeakMap if available.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: MIT</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/simple-lru-cache.txt"><b>simple-lru-cache</b></a> (by Gabriel Eisbruch)
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
node-simple-lru-cache =====================
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: ISC</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/tar.txt"><b>tar</b></a> (by Isaac Z. Schlueter)
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
tar for node<br/>
|
||||||
|
<b>Required by SVR.JS.</b>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: ISC</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/wrappy.txt"><b>wrappy</b></a> (by Isaac Z. Schlueter)
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
Callback wrapping utility
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
|
<div style="float: right;">License: ISC</div>
|
||||||
|
<div style="font-size: 20px;">
|
||||||
|
<a href="/licenses/yallist.txt"><b>yallist</b></a> (by Isaac Z. Schlueter)
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
Yet Another Linked List
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br/>
|
||||||
|
<img src="/powered.png" />
|
||||||
|
</body>
|
||||||
|
</html>
|
16
licenses/inherits.txt
Normal file
|
@ -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.
|
||||||
|
|
22
licenses/mime-db.txt
Normal file
|
@ -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.
|
23
licenses/mime-types.txt
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
(The MIT License)
|
||||||
|
|
||||||
|
Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
|
||||||
|
Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.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.
|
13
licenses/minimalistic-assert.txt
Normal file
|
@ -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.
|
15
licenses/minipass.txt
Normal file
|
@ -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.
|
26
licenses/minizlib.txt
Normal file
|
@ -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.
|
||||||
|
"""
|
21
licenses/mkdirp.txt
Normal file
|
@ -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.
|
21
licenses/object-inspect.txt
Normal file
|
@ -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.
|
21
licenses/ocsp.txt
Normal file
|
@ -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.
|
15
licenses/once.txt
Normal file
|
@ -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.
|
9
licenses/pretty-bytes.txt
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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.
|
29
licenses/qs.txt
Normal file
|
@ -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.
|
21
licenses/side-channel.txt
Normal file
|
@ -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.
|
19
licenses/simple-lru-cache.txt
Normal file
|
@ -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.
|
15
licenses/tar.txt
Normal file
|
@ -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.
|
15
licenses/wrappy.txt
Normal file
|
@ -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.
|
15
licenses/yallist.txt
Normal file
|
@ -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.
|
50
loghighlight.js
Normal file
|
@ -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("<some process> | 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("<some process> | 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<log.length;i++) {
|
||||||
|
if(log[i].indexOf("SERVER REQUEST MESSAGE") != -1) {
|
||||||
|
log[i] = log[i].replace("SERVER REQUEST MESSAGE","\x1b[34mSERVER REQUEST MESSAGE") + "\x1b[37m\x1b[0m";
|
||||||
|
} else if(log[i].indexOf("SERVER RESPONSE MESSAGE") != -1) {
|
||||||
|
log[i] = log[i].replace("SERVER RESPONSE MESSAGE","\x1b[32mSERVER RESPONSE MESSAGE") + "\x1b[37m\x1b[0m";
|
||||||
|
} else if(log[i].indexOf("SERVER RESPONSE ERROR MESSAGE") != -1) {
|
||||||
|
log[i] = log[i].replace("SERVER RESPONSE ERROR MESSAGE","\x1b[31mSERVER RESPONSE ERROR MESSAGE") + "\x1b[37m\x1b[0m";
|
||||||
|
} else if(log[i].indexOf("SERVER ERROR MESSAGE") != -1) {
|
||||||
|
log[i] = log[i].replace("SERVER ERROR MESSAGE","\x1b[41mSERVER ERROR MESSAGE") + "\x1b[40m\x1b[0m";
|
||||||
|
} else if(log[i].indexOf("SERVER WARNING MESSAGE") != -1) {
|
||||||
|
log[i] = log[i].replace("SERVER WARNING MESSAGE","\x1b[43mSERVER WARNING MESSAGE") + "\x1b[40m\x1b[0m";
|
||||||
|
}
|
||||||
|
console.log(log[i]);
|
||||||
|
}
|
||||||
|
}
|
BIN
logo.png
Normal file
After Width: | Height: | Size: 31 KiB |
175
logviewer.js
Normal file
BIN
mods/primitiveanalytics.tar.gz
Normal file
BIN
powered.png
Normal file
After Width: | Height: | Size: 7.7 KiB |
90
serverSideScript.js
Normal file
|
@ -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("<html><head><title>SVR.JS ServerSide Test</title></head><body><h1>Hello World!</h1><p>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.") + "</p><p><i>SVR.JS/" + configJSON.version + ' (' + os.platform()[0].toUpperCase() + os.platform().slice(1) + ')' + (req.headers.host == undefined ? "" : " on " + req.headers.host) + "</p></body></html>"); //Write response
|
||||||
|
serverconsole.resmessage("Client successfully recieved content."); //Log into SVR.JS
|
||||||
|
return; //Prevent SVR.JS from crashing
|
||||||
|
});
|
||||||
|
} else if(href == "/proxy.svr") {
|
||||||
|
callServerError(403,"SVR.JS-exampleproxy"); //Server error
|
||||||
|
serverconsole.errmessage("Client fails to recieve content."); //Log into SVR.JS
|
||||||
|
} else if(href.indexOf("/proxy.svr/") == 0) {
|
||||||
|
var hdrs = req.headers;
|
||||||
|
hdrs["Host"] = (href.split("/")[2] == "this" ? req.headers.host : href.split("/")[2]);
|
||||||
|
hdrs["Origin"] = (req.headers.host == undefined ? "" : req.headers.host);
|
||||||
|
var options = {
|
||||||
|
hostname: (href.split("/")[2] == "this" ? req.headers.host.split(":")[0] : href.split("/")[2].split(":")[0]),
|
||||||
|
port: (href.split("/")[2] == "this" ? req.headers.host.split(":")[1] : (href.split("/")[2].split(":")[1] == undefined ? 80 : href.split("/")[2].split(":")[1])),
|
||||||
|
path: req.url.replace("/proxy.svr/" + href.split("/")[2],""),
|
||||||
|
method: req.method,
|
||||||
|
headers: filterHeaders(hdrs)
|
||||||
|
};
|
||||||
|
var proxy = http.request(options, function (sres) {
|
||||||
|
res.writeHead(sres.statusCode, sres.headers)
|
||||||
|
sres.pipe(res, {
|
||||||
|
end: true
|
||||||
|
});
|
||||||
|
});
|
||||||
|
proxy.on("error",(ex) => {
|
||||||
|
callServerError(500,"SVR.JS-exampleproxy",ex.stack); //Server error
|
||||||
|
serverconsole.errmessage("Client fails to recieve content."); //Log into SVR.JS
|
||||||
|
});
|
||||||
|
req.pipe(proxy, {
|
||||||
|
end: true
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
elseCallback(); //Load SVR.JS internal callbacks
|
||||||
|
}
|
4828
svr.js
Normal file
1
svr_new.js
Normal file
|
@ -0,0 +1 @@
|
||||||
|
require("./svr.js");
|
346
svrpasswd.js
Normal file
|
@ -0,0 +1,346 @@
|
||||||
|
//SVR.JS USER TOOL
|
||||||
|
var readline = require("readline");
|
||||||
|
var process = require("process");
|
||||||
|
var fs = require("fs");
|
||||||
|
try {
|
||||||
|
var crypto = require('crypto');
|
||||||
|
} catch (ex) {
|
||||||
|
var crypto = {};
|
||||||
|
crypto.__disabled__ = null;
|
||||||
|
crypto.createHash = function(type) {
|
||||||
|
if (type != "SHA256") throw new Error("Hash type not supported!");
|
||||||
|
return {
|
||||||
|
msg: "",
|
||||||
|
update: function(a) {
|
||||||
|
this.msg = a;
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
digest: function(ty) {
|
||||||
|
var chrsz = 8;
|
||||||
|
var hexcase = 0;
|
||||||
|
|
||||||
|
function safe_add(x, y) {
|
||||||
|
var lsw = (x & 0xFFFF) + (y & 0xFFFF);
|
||||||
|
var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
|
||||||
|
return (msw << 16) | (lsw & 0xFFFF);
|
||||||
|
}
|
||||||
|
|
||||||
|
function S(X, n) {
|
||||||
|
return (X >>> n) | (X << (32 - n));
|
||||||
|
}
|
||||||
|
|
||||||
|
function R(X, n) {
|
||||||
|
return (X >>> n);
|
||||||
|
}
|
||||||
|
|
||||||
|
function Ch(x, y, z) {
|
||||||
|
return ((x & y) ^ ((~x) & z));
|
||||||
|
}
|
||||||
|
|
||||||
|
function Maj(x, y, z) {
|
||||||
|
return ((x & y) ^ (x & z) ^ (y & z));
|
||||||
|
}
|
||||||
|
|
||||||
|
function Sigma0256(x) {
|
||||||
|
return (S(x, 2) ^ S(x, 13) ^ S(x, 22));
|
||||||
|
}
|
||||||
|
|
||||||
|
function Sigma1256(x) {
|
||||||
|
return (S(x, 6) ^ S(x, 11) ^ S(x, 25));
|
||||||
|
}
|
||||||
|
|
||||||
|
function Gamma0256(x) {
|
||||||
|
return (S(x, 7) ^ S(x, 18) ^ R(x, 3));
|
||||||
|
}
|
||||||
|
|
||||||
|
function Gamma1256(x) {
|
||||||
|
return (S(x, 17) ^ S(x, 19) ^ R(x, 10));
|
||||||
|
}
|
||||||
|
|
||||||
|
function core_sha256(m, l) {
|
||||||
|
var K = new Array(0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5, 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3, 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174, 0xE49B69C1, 0xEFBE4786, 0xFC19DC6, 0x240CA1CC, 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA, 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7, 0xC6E00BF3, 0xD5A79147, 0x6CA6351, 0x14292967, 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13, 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85, 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3, 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070, 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5, 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3, 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208, 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2);
|
||||||
|
var HASH = new Array(0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19);
|
||||||
|
var W = new Array(64);
|
||||||
|
var a, b, c, d, e, f, g, h, i, j;
|
||||||
|
var T1, T2;
|
||||||
|
|
||||||
|
m[l >> 5] |= 0x80 << (24 - l % 32);
|
||||||
|
m[((l + 64 >> 9) << 4) + 15] = l;
|
||||||
|
|
||||||
|
for (var i = 0; i < m.length; i += 16) {
|
||||||
|
a = HASH[0];
|
||||||
|
b = HASH[1];
|
||||||
|
c = HASH[2];
|
||||||
|
d = HASH[3];
|
||||||
|
e = HASH[4];
|
||||||
|
f = HASH[5];
|
||||||
|
g = HASH[6];
|
||||||
|
h = HASH[7];
|
||||||
|
|
||||||
|
for (var j = 0; j < 64; j++) {
|
||||||
|
if (j < 16) W[j] = m[j + i];
|
||||||
|
else W[j] = safe_add(safe_add(safe_add(Gamma1256(W[j - 2]), W[j - 7]), Gamma0256(W[j - 15])), W[j - 16]);
|
||||||
|
|
||||||
|
T1 = safe_add(safe_add(safe_add(safe_add(h, Sigma1256(e)), Ch(e, f, g)), K[j]), W[j]);
|
||||||
|
T2 = safe_add(Sigma0256(a), Maj(a, b, c));
|
||||||
|
|
||||||
|
h = g;
|
||||||
|
g = f;
|
||||||
|
f = e;
|
||||||
|
e = safe_add(d, T1);
|
||||||
|
d = c;
|
||||||
|
c = b;
|
||||||
|
b = a;
|
||||||
|
a = safe_add(T1, T2);
|
||||||
|
}
|
||||||
|
|
||||||
|
HASH[0] = safe_add(a, HASH[0]);
|
||||||
|
HASH[1] = safe_add(b, HASH[1]);
|
||||||
|
HASH[2] = safe_add(c, HASH[2]);
|
||||||
|
HASH[3] = safe_add(d, HASH[3]);
|
||||||
|
HASH[4] = safe_add(e, HASH[4]);
|
||||||
|
HASH[5] = safe_add(f, HASH[5]);
|
||||||
|
HASH[6] = safe_add(g, HASH[6]);
|
||||||
|
HASH[7] = safe_add(h, HASH[7]);
|
||||||
|
}
|
||||||
|
return HASH;
|
||||||
|
}
|
||||||
|
|
||||||
|
function str2binb(str) {
|
||||||
|
var bin = Array();
|
||||||
|
var mask = (1 << chrsz) - 1;
|
||||||
|
for (var i = 0; i < str.length * chrsz; i += chrsz) {
|
||||||
|
bin[i >> 5] |= (str.charCodeAt(i / chrsz) & mask) << (24 - i % 32);
|
||||||
|
}
|
||||||
|
return bin;
|
||||||
|
}
|
||||||
|
|
||||||
|
function Utf8Encode(string) {
|
||||||
|
string = string.replace(/\r\n/g, '\n');
|
||||||
|
var utftext = '';
|
||||||
|
|
||||||
|
for (var n = 0; n < string.length; n++) {
|
||||||
|
|
||||||
|
var c = string.charCodeAt(n);
|
||||||
|
|
||||||
|
if (c < 128) {
|
||||||
|
utftext += String.fromCharCode(c);
|
||||||
|
} else if ((c > 127) && (c < 2048)) {
|
||||||
|
utftext += String.fromCharCode((c >> 6) | 192);
|
||||||
|
utftext += String.fromCharCode((c & 63) | 128);
|
||||||
|
} else {
|
||||||
|
utftext += String.fromCharCode((c >> 12) | 224);
|
||||||
|
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
|
||||||
|
utftext += String.fromCharCode((c & 63) | 128);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return utftext;
|
||||||
|
}
|
||||||
|
|
||||||
|
function binb2hex(binarray) {
|
||||||
|
var hex_tab = hexcase ? '0123456789ABCDEF' : '0123456789abcdef';
|
||||||
|
var str = '';
|
||||||
|
for (var i = 0; i < binarray.length * 4; i++) {
|
||||||
|
str += hex_tab.charAt((binarray[i >> 2] >> ((3 - i % 4) * 8 + 4)) & 0xF) +
|
||||||
|
hex_tab.charAt((binarray[i >> 2] >> ((3 - i % 4) * 8)) & 0xF);
|
||||||
|
}
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
|
s = Utf8Encode(this.msg);
|
||||||
|
var str = binb2hex(core_sha256(str2binb(s), s.length * chrsz));
|
||||||
|
if (ty == "hex") return str;
|
||||||
|
var hx = [];
|
||||||
|
for (var i = 0; i < str.length; i += 2) {
|
||||||
|
hx.push(parseInt(str[i] + str[i + 1], 16));
|
||||||
|
}
|
||||||
|
return new Buffer(hx);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!crypto.randomInt) {
|
||||||
|
crypto.randomInt = function(min, max) {
|
||||||
|
return Math.round(Math.random() * (max - min)) + min;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var configJSON = {};
|
||||||
|
if (fs.existsSync("config.json")) {
|
||||||
|
var configJSONf = "";
|
||||||
|
try {
|
||||||
|
configJSONf = fs.readFileSync("config.json"); //Read JSON File
|
||||||
|
} catch (ex) {
|
||||||
|
throw new Error("Cannot read JSON file.");
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
configJSON = JSON.parse(configJSONf); //Parse JSON
|
||||||
|
} catch (ex) {
|
||||||
|
throw new Error("JSON Parse error.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var users = [];
|
||||||
|
if (configJSON.users != undefined) users = configJSON.users;
|
||||||
|
|
||||||
|
function saveConfig() {
|
||||||
|
var configJSONobj = {};
|
||||||
|
if (fs.existsSync("./config.json")) configJSONobj = JSON.parse(fs.readFileSync("./config.json").toString());
|
||||||
|
configJSONobj.users = users;
|
||||||
|
var configString = JSON.stringify(configJSONobj, null, 2);
|
||||||
|
fs.writeFileSync("config.json", configString);
|
||||||
|
}
|
||||||
|
|
||||||
|
var args = process.argv;
|
||||||
|
var user = "";
|
||||||
|
var action = "change";
|
||||||
|
if (process.argv.length <= (process.argv[0].indexOf("node") > -1 || process.argv[0].indexOf("bun") > -1 ? 2 : 1)) args.push("-h");
|
||||||
|
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 user tool usage:");
|
||||||
|
console.log("node svrpasswd.js [-h] [--help] [-?] [/h] [/?] [-a|--add|-d|--delete] <username>");
|
||||||
|
console.log("-h -? /h /? --help -- Displays help");
|
||||||
|
console.log("-a --add -- Add an user");
|
||||||
|
console.log("-d --delete -- Deletes an user");
|
||||||
|
process.exit(0);
|
||||||
|
} else if (args[i] == "-a" || args[i] == "--add") {
|
||||||
|
if (action != "change") {
|
||||||
|
console.log("Multiple actions specified.");
|
||||||
|
console.log("node svrpasswd.js [-h] [--help] [-?] [/h] [/?] [-a|--add|-d|--delete] <username>");
|
||||||
|
console.log("-h -? /h /? --help -- Displays help");
|
||||||
|
console.log("-a --add -- Add an user");
|
||||||
|
console.log("-d --delete -- Deletes an user");
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
action = "add";
|
||||||
|
} else if (args[i] == "-d" || args[i] == "--delete") {
|
||||||
|
if (action != "change") {
|
||||||
|
console.log("Multiple actions specified.");
|
||||||
|
console.log("node svrpasswd.js [-h] [--help] [-?] [/h] [/?] [-a|--add|-d|--delete] <username>");
|
||||||
|
console.log("-h -? /h /? --help -- Displays help");
|
||||||
|
console.log("-a --add -- Add an user");
|
||||||
|
console.log("-d --delete -- Deletes an user");
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
action = "delete";
|
||||||
|
} else {
|
||||||
|
if (user != "") {
|
||||||
|
console.log("Multiple users specified.");
|
||||||
|
console.log("node svrpasswd.js [-h] [--help] [-?] [/h] [/?] [-a|--add|-d|--delete] <username>");
|
||||||
|
console.log("-h -? /h /? --help -- Displays help");
|
||||||
|
console.log("-a --add -- Add an user");
|
||||||
|
console.log("-d --delete -- Deletes an user");
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
user = args[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (user == "") {
|
||||||
|
console.log("No user specified.");
|
||||||
|
console.log("node svrpasswd.js [-h] [--help] [-?] [/h] [/?] [-a|--add|-d|--delete] <username>");
|
||||||
|
console.log("-h -? /h /? --help -- Displays help");
|
||||||
|
console.log("-a --add -- Add an user");
|
||||||
|
console.log("-d --delete -- Deletes an user");
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getUserIndex(username) {
|
||||||
|
var ind = -1
|
||||||
|
for (var i = 0; i < users.length; i++) {
|
||||||
|
if (users[i].name == username) {
|
||||||
|
ind = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ind;
|
||||||
|
}
|
||||||
|
|
||||||
|
function sha256(msg) {
|
||||||
|
var hash = crypto.createHash("SHA256");
|
||||||
|
hash.update(msg);
|
||||||
|
return hash.digest('hex');
|
||||||
|
}
|
||||||
|
|
||||||
|
function generateSalt() {
|
||||||
|
var token = "";
|
||||||
|
var strlist = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||||
|
for (var i = 0; i < 63; i++) {
|
||||||
|
token += strlist[crypto.randomInt(0, strlist.length)];
|
||||||
|
}
|
||||||
|
return token;
|
||||||
|
}
|
||||||
|
|
||||||
|
function password(callback) {
|
||||||
|
var rl = readline.createInterface({
|
||||||
|
input: process.stdin,
|
||||||
|
output: process.stdout,
|
||||||
|
prompt: 'Password: ',
|
||||||
|
terminal: false
|
||||||
|
});
|
||||||
|
rl.prompt();
|
||||||
|
rl.once('line', (line) => {
|
||||||
|
//rl.close();
|
||||||
|
var rl = readline.createInterface({
|
||||||
|
input: process.stdin,
|
||||||
|
output: process.stdout,
|
||||||
|
prompt: 'Confirm password: ',
|
||||||
|
terminal: false
|
||||||
|
});
|
||||||
|
rl.prompt();
|
||||||
|
rl.on('line', (line2) => {
|
||||||
|
rl.close();
|
||||||
|
if (line != line2) callback(false);
|
||||||
|
else callback(line);
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
var userindex = getUserIndex(user);
|
||||||
|
if (action == "add" && userindex != -1) {
|
||||||
|
console.log("User alerady exists.");
|
||||||
|
process.exit(1);
|
||||||
|
} else if (action != "add" && userindex == -1) {
|
||||||
|
console.log("User doesn't exist.");
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
if (action == "delete") {
|
||||||
|
users.splice(userindex, 1);
|
||||||
|
saveConfig();
|
||||||
|
console.log("User deleted successfully");
|
||||||
|
} else if (action == "add") {
|
||||||
|
password(function(password) {
|
||||||
|
if (!password) {
|
||||||
|
console.log("Passwords don't match!");
|
||||||
|
process.exit(1);
|
||||||
|
} else {
|
||||||
|
var salt = generateSalt()
|
||||||
|
users.push({
|
||||||
|
name: user,
|
||||||
|
pass: sha256(password + salt),
|
||||||
|
salt: salt
|
||||||
|
});
|
||||||
|
saveConfig();
|
||||||
|
console.log("User added successfully");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
password(function(password) {
|
||||||
|
if (!password) {
|
||||||
|
console.log("Passwords don't match!");
|
||||||
|
process.exit(1);
|
||||||
|
} else {
|
||||||
|
var salt = generateSalt()
|
||||||
|
users[userindex] = {
|
||||||
|
name: user,
|
||||||
|
pass: sha256(password + salt),
|
||||||
|
salt: salt
|
||||||
|
};
|
||||||
|
saveConfig();
|
||||||
|
console.log("Password changed successfully");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
6
testdir/.personalized/FOOT.html
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
</div>
|
||||||
|
<div class="footer">
|
||||||
|
Copyright © 2020 DorianTech S.A.
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
39
testdir/.personalized/HEAD.html
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
background-color: ivory;
|
||||||
|
font-family: Ubuntu,Arial,Helvetica,sans-serif;
|
||||||
|
}
|
||||||
|
.header {
|
||||||
|
background-color: orange;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.navbar {
|
||||||
|
background-color: black;
|
||||||
|
padding: 10px
|
||||||
|
}
|
||||||
|
.navbar a {
|
||||||
|
color: white;
|
||||||
|
text-decoration: none;
|
||||||
|
margin: 5px
|
||||||
|
}
|
||||||
|
.navbar a:hover {
|
||||||
|
color: #aaa;
|
||||||
|
}
|
||||||
|
.footer {
|
||||||
|
padding: 20px;
|
||||||
|
background-color: lightsalmon;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body><div class="header"><h1 style="margin: 0; padding: 10px;">My Website</h1></div>
|
||||||
|
<div class="navbar"><a href="/">Home</a> <a href="/licenses">Licenses</a></div>
|
||||||
|
<div style="margin: 5px;">
|
||||||
|
<h1>Personalized directory listing</h1>
|
||||||
|
<p>This is a test of personalized directory listing.</p>
|