Linux v69820.1blu.de 4.15.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
Apache/2.4.58
Server IP : 195.90.215.149 & Your IP : 216.73.217.80
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
nodejs /
lodash-cli /
lib /
Delete
Unzip
Name
Size
Permission
Date
Action
const.js
3.96
KB
-rw-r--r--
2022-05-23 15:50
listing.js
5.44
KB
-rw-r--r--
2022-05-23 15:50
mapping.js
36.85
KB
-rw-r--r--
2022-05-23 15:50
minify.js
20.81
KB
-rw-r--r--
2022-05-23 15:50
postprocess.js
2.04
KB
-rw-r--r--
2022-05-23 15:50
preprocess.js
4.03
KB
-rw-r--r--
2022-05-23 15:50
util.js
3.15
KB
-rw-r--r--
2022-05-23 15:50
Save
Rename
'use strict'; var _ = require('lodash'), fs = require('fs'), path = require('path'); /** Used to indicate if running in Windows. */ var isWindows = process.platform == 'win32'; /** * The escaped path separator used for inclusion in RegExp strings. * * @memberOf util.path * @type string */ var sepEscaped = _.escapeRegExp(path.sep); /** Used to determine if a path is prefixed with a drive letter or dot-slash. */ var rePrefixed = RegExp('^(?:' + (isWindows ? '[a-zA-Z]:|' : '') + '\\.?)' + sepEscaped); /*----------------------------------------------------------------------------*/ /** * Creates a hash object. If a `properties` object is provided, its own * enumerable properties are assigned to the created object. * * @memberOf util * @param {Object} [properties] The properties to assign to the object. * @returns {Object} Returns the new hash object. */ function Hash(properties) { return _.transform(properties, function(result, value, key) { result[key] = (_.isPlainObject(value) && !(value instanceof Hash)) ? new Hash(value) : value; }, this); } Hash.prototype = Object.create(null); /** * Makes the given `dirname` directory, without throwing errors for existing * directories and making parent directories as needed. * * @memberOf util.fs * @param {string} dirname The path of the directory. * @param {number|string} [mode='0777'] The permission mode. */ function mkdirpSync(dirname, mode) { var sep = path.sep; dirname = path.normalize(dirname); // Ensure relative paths are prefixed with `./`. if (!rePrefixed.test(dirname)) { dirname = '.' + sep + dirname; } dirname.split(sep).reduce(function(currPath, segment) { currPath += sep + segment; try { currPath = fs.realpathSync(currPath); } catch (e) { fs.mkdirSync(currPath, mode); } return currPath; }); } /** * Removes files or directories and their contents recursively. * * @memberOf util.fs * @param {string} pathname The path of the file or directory. */ function rmrfSync(pathname) { var sep = path.sep; pathname = path.normalize(pathname); // Safety first! Limit to modifying lodash-cli. if (!_.startsWith(pathname, path.dirname(__dirname) + sep)) { return; } try { pathname = fs.realpathSync(pathname); } catch (e) { return; } if (!fs.statSync(pathname).isDirectory()) { fs.unlinkSync(pathname); return; } _.each(fs.readdirSync(pathname), function(identifier) { var currPath = path.join(pathname, identifier); if (fs.statSync(currPath).isDirectory()) { rmrfSync(currPath); } else { fs.unlinkSync(currPath); } }); fs.rmdirSync(pathname); } /*----------------------------------------------------------------------------*/ /** * The utility object. * * @type Object */ var util = { 'Hash': Hash, /** * The file system object. * * @memberOf util * @type Object */ 'fs': _.defaults(_.cloneDeep(fs), { 'mkdirpSync': mkdirpSync, 'rmrfSync': rmrfSync }), /** * The path object. * * @memberOf util * @type Object */ 'path': _.defaults(_.cloneDeep(path), { 'sepEscaped': sepEscaped }) }; module.exports = util;