在 node.js 脚本的 npm 内部进行拖钓的可能性
Possibility of trolling inside npm of node.js script
我想知道为什么我的 npm 只能通过完整路径工作 /usr/bin/npm 打开 npm 的代码,然后发现里面有一首奇怪的歌词。这是里面的代码。它实际上通过完整路径工作,但我担心它只是发送节点的人
npm.commands[npm.command](npm.argv, function (err) {
// https://genius.com/Lin-manuel-miranda-your-obedient-servant-lyrics
if (
!err &&
npm.config.get('ham-it-up') &&
!npm.config.get('json') &&
!npm.config.get('parseable') &&
npm.command !== 'completion'
) {
console.error(
`\n ${
npm.config.get('unicode') ? ' ' : ''
} I Have the Honour to Be Your Obedient Servant,${
npm.config.get('unicode') ? ' ' : ''
} ~ npm ${
npm.config.get('unicode') ? ' ' : ''
}\n`
)
}
errorHandler.apply(this, arguments)
})
})
})()
我想知道为什么我的 npm 只能通过完整路径工作 /usr/bin/npm 打开 npm 的代码,然后发现里面有一首奇怪的歌词。这是里面的代码。它实际上通过完整路径工作,但我担心它只是发送节点的人
npm.commands[npm.command](npm.argv, function (err) {
// https://genius.com/Lin-manuel-miranda-your-obedient-servant-lyrics
if (
!err &&
npm.config.get('ham-it-up') &&
!npm.config.get('json') &&
!npm.config.get('parseable') &&
npm.command !== 'completion'
) {
console.error(
`\n ${
npm.config.get('unicode') ? ' ' : ''
} I Have the Honour to Be Your Obedient Servant,${
npm.config.get('unicode') ? ' ' : ''
} ~ npm ${
npm.config.get('unicode') ? ' ' : ''
}\n`
)
}
errorHandler.apply(this, arguments)
})
})
})()