Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.47
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
nodejs /
webpack /
lib /
util /
[ HOME SHELL ]
Name
Size
Permission
Action
LazyBucketSortedSet.js
5.58
KB
-rw-r--r--
Queue.js
940
B
-rw-r--r--
Semaphore.js
1007
B
-rw-r--r--
SetHelpers.js
1.34
KB
-rw-r--r--
SortableSet.js
3.16
KB
-rw-r--r--
StackedSetMap.js
2.79
KB
-rw-r--r--
TrackingSet.js
537
B
-rw-r--r--
cachedMerge.js
1.07
KB
-rw-r--r--
cleverMerge.js
2.12
KB
-rw-r--r--
createHash.js
3.31
KB
-rw-r--r--
deterministicGrouping.js
7
KB
-rw-r--r--
identifier.js
3.45
KB
-rw-r--r--
objectToMap.js
405
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : identifier.js
"use strict"; const path = require("path"); /** * @param {string} context context for relative path * @param {string} relativePath path * @returns {string} absolute path */ const requestToAbsolute = (context, relativePath) => { if (relativePath.startsWith("./") || relativePath.startsWith("../")) return path.join(context, relativePath); return relativePath; }; /** * @typedef {Object} MakeRelativePathsCache * @property {Map<string, Map<string, string>>=} relativePaths */ /** * * @param {string} maybeAbsolutePath path to check * @returns {boolean} returns true if path is "Absolute Path"-like */ const looksLikeAbsolutePath = maybeAbsolutePath => { if (/^\/.*\/$/.test(maybeAbsolutePath)) { // this 'path' is actually a regexp generated by dynamic requires. // Don't treat it as an absolute path. return false; } return /^(?:[a-z]:\\|\/)/i.test(maybeAbsolutePath); }; /** * * @param {string} p path to normalize * @returns {string} normalized version of path */ const normalizePathSeparator = p => p.replace(/\\/g, "/"); /** * * @param {string} context context for relative path * @param {string} identifier identifier for path * @returns {string} a converted relative path */ const _makePathsRelative = (context, identifier) => { return identifier .split(/([|! ])/) .map(str => looksLikeAbsolutePath(str) ? normalizePathSeparator(path.relative(context, str)) : str ) .join(""); }; /** * * @param {string} context context used to create relative path * @param {string} identifier identifier used to create relative path * @param {MakeRelativePathsCache=} cache the cache object being set * @returns {string} the returned relative path */ exports.makePathsRelative = (context, identifier, cache) => { if (!cache) return _makePathsRelative(context, identifier); const relativePaths = cache.relativePaths || (cache.relativePaths = new Map()); let cachedResult; let contextCache = relativePaths.get(context); if (contextCache === undefined) { relativePaths.set(context, (contextCache = new Map())); } else { cachedResult = contextCache.get(identifier); } if (cachedResult !== undefined) { return cachedResult; } else { const relativePath = _makePathsRelative(context, identifier); contextCache.set(identifier, relativePath); return relativePath; } }; /** * @param {string} context absolute context path * @param {string} request any request string may containing absolute paths, query string, etc. * @returns {string} a new request string avoiding absolute paths when possible */ exports.contextify = (context, request) => { return request .split("!") .map(r => { const splitPath = r.split("?", 2); if (/^[a-zA-Z]:\\/.test(splitPath[0])) { splitPath[0] = path.win32.relative(context, splitPath[0]); if (!/^[a-zA-Z]:\\/.test(splitPath[0])) { splitPath[0] = splitPath[0].replace(/\\/g, "/"); } } if (/^\//.test(splitPath[0])) { splitPath[0] = path.posix.relative(context, splitPath[0]); } if (!/^(\.\.\/|\/|[a-zA-Z]:\\)/.test(splitPath[0])) { splitPath[0] = "./" + splitPath[0]; } return splitPath.join("?"); }) .join("!"); }; /** * @param {string} context absolute context path * @param {string} request any request string * @returns {string} a new request string using absolute paths when possible */ const _absolutify = (context, request) => { return request .split("!") .map(r => requestToAbsolute(context, r)) .join("!"); }; exports.absolutify = _absolutify;
Close