403Webshell
Server IP : 217.160.0.212  /  Your IP : 216.73.216.141
Web Server : Apache
System : Linux www 6.18.51-i1-ampere #1196 SMP Fri Sep 11 20:43:55 CEST 2026 aarch64
User : sws1073854427 ( 1073854427)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/share/nodejs/spawn-wrap/lib/mungers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/nodejs/spawn-wrap/lib/mungers/npm.js
'use strict';

const path = require("path")
const {debug} = require("../debug")
const whichOrUndefined = require("../which-or-undefined")

/**
 * Intercepts npm spawned processes.
 *
 * @param workingDir {string} Absolute system-dependent path to the directory containing the shim files.
 * @param options {import("../munge").InternalSpawnOptions} Original internal spawn options.
 * @return {import("../munge").InternalSpawnOptions} Updated internal spawn options.
 */
function mungeNpm(workingDir, options) {
  debug('munge npm')
  // XXX weird effects of replacing a specific npm with a global one
  const npmPath = whichOrUndefined('npm')

  if (npmPath === undefined) {
    return {...options};
  }

  const newArgs = [...options.args]

  newArgs[0] = npmPath
  const file = path.join(workingDir, 'node')
  newArgs.unshift(file)

  return {...options, file, args: newArgs}
}

module.exports = mungeNpm

Youez - 2016 - github.com/yon3zu
LinuXploit