CasperSecurity

Current Path : /usr/share/nodejs/@npmcli/node_modules/libnpmexec/lib/
Upload File :
Current File : //usr/share/nodejs/@npmcli/node_modules/libnpmexec/lib/cache-install-dir.js

const crypto = require('crypto')

const { resolve } = require('path')

const cacheInstallDir = ({ npxCache, packages }) => {
  if (!npxCache) {
    throw new Error('Must provide a valid npxCache path')
  }

  // only packages not found in ${prefix}/node_modules
  return resolve(npxCache, getHash(packages))
}

const getHash = (packages) =>
  crypto.createHash('sha512')
    .update(packages.sort((a, b) => a.localeCompare(b, 'en')).join('\n'))
    .digest('hex')
    .slice(0, 16)

module.exports = cacheInstallDir
Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY