
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
This module provides access to Mac OS X system information for access in Javascript via node.js
It provides a set of functions that allow programmatic access to information that you might find from the Mac Activity Monitor or linux command line utilities such as ps, top, df, who, dscl, and netstat.
For example, get_procs returns a list of all running processes along with relevant properties.
If you're looking for this type of stuff you should also check out the standard os module which contains similar functionality for cpus, hostname, load average, release, memory, and uptime. This module is not intended to duplicate any of that functionality.
This was specifically developed for Mac OS X, though it could be extended to work on other systems, and might work on them already. I've only tested it on Darwin 11.2.
This module relies on APIs that Apple considers unsupported, such as sysctl and its extensions, which are subject to change from release to release.
From npm:
npm install osx
From source:
node-waf configure build
npm link
Example: print out the pid and command of every running process
var osx = require('osx');
var procs = osx.procs();
for (id in procs) {
console.log(procs[id].pid + ' ' + procs[id].command);
}
procs() : array of process objects - all running processes
pid : integer - process idparent_pid : integer - parent process iduid : integer - user id of the user who owns the processusername : string - name of the user with uidcommand : string - name of the executable that started the processstarttime : number (milliseconds) - time the process startedprocArgs(pid) : array of string - get the command line arguments of the process with pid
command property of the process objects from get_procs instead in that case.mountInfo() : array of mount objects - all mounted devices
name : stringsize : number (bytes)free : number (bytes)pct_free : number (percent free)/dev/who() : array of user objects - all users logged in
name : string - usernameline : string - type of devicehost : string - hostname, if remote sessionstarttime : Date (of session start)users() : array of string - all users logged in
who but only a list of unique namesaccounts() : array of user objects - all users with accounts on this system
uid : integer - user idgid : integer - group idname : string - user namedir : string - home directoryinterfaces() : array of interface objects
name : stringfamily : string - type (e.g. IPv4, IPv6)address : string - numeric internet addressup : boolean - interface is active or notrunning : booleanloopback : booleannetworkActivity() : activity object
packetsSent : numberpacketsReceived : numberbytesSent : numberbytesReceived : numberFAQs
A Mac OS X library for NodeJS to get system information.
We found that osx 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.