Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
bin-version
Advanced tools
The bin-version npm package is designed to retrieve the version of a binary executable in your system. It is useful for developers who need to programmatically check and manage the versions of dependencies and tools that their applications interact with.
Get binary version
This feature allows you to fetch the version of a specified binary executable. The code sample demonstrates how to retrieve the version of 'curl' using the bin-version package.
const binVersion = require('bin-version');
(async () => {
try {
const version = await binVersion('curl');
console.log(version);
} catch (error) {
console.error('Error:', error);
}
})();
This package checks if a given command exists in the system path. Unlike bin-version, which retrieves the version of the binary, command-exists simply checks for the existence of the binary without providing version information.
find-versions is a package that extracts semver versions from a string. It can be used in conjunction with other tools to parse version numbers from command output, offering a more flexible approach compared to bin-version which directly fetches the version from the binary.
Get the version of a binary in semver format
$ npm install --save bin-version
$ curl --version
curl 7.30.0 (x86_64-apple-darwin13.0)
var binVersion = require('bin-version');
binVersion('curl', function (err, version) {
console.log(version);
//=> 7.30.0
});
See the find-versions CLI.
MIT © Sindre Sorhus
FAQs
Get the version of a binary in semver format
The npm package bin-version receives a total of 0 weekly downloads. As such, bin-version popularity was classified as not popular.
We found that bin-version demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.