Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
cross-port-killer
Advanced tools
Kill the process running on a given TCP port on Windows, Linux and Mac
Kill the process running on a given TCP port on Windows, Linux and Mac
$ npm install cross-port-killer -D
import { kill, killer } from 'cross-port-killer';
kill(9090).then(pids => {
console.log(pids)
})
// you could also kill pids manually if you know them... this would save you bringing up another lib, you are welcome.
killer.killByPid(12345).then(() => console.log('done'))
killer.killByPids([12345, 54321]).then(() => console.log('done'))
This lib also comes with a CLI
.
To kill any process occupying the port 9090 you can run:
$ npx cross-port-killer 9090
or
$ npm install cross-port-killer -g
$ kill-port 9090
On Linux/Mac this library depends on lsof
in case you don't have it installed (perhaps you are using docker?) run:
$ apt-get install lsof
On Mac, It comes with the OS by default so nothing to worries.
FAQs
Kill the process running on a given TCP port on Windows, Linux and Mac
We found that cross-port-killer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.