Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
The 'os' npm package provides a set of operating system-related utility methods and properties. It allows you to interact with the operating system in a variety of ways, such as retrieving information about the system's architecture, CPUs, memory, and network interfaces.
System Architecture
This feature allows you to get the operating system CPU architecture. The code sample prints the architecture of the CPU, such as 'x64' or 'arm'.
const os = require('os');
console.log(os.arch());
CPU Information
This feature provides information about each logical CPU core. The code sample prints an array of objects containing details about each CPU core, such as model, speed, and times.
const os = require('os');
console.log(os.cpus());
Free Memory
This feature allows you to get the amount of free system memory in bytes. The code sample prints the amount of free memory available on the system.
const os = require('os');
console.log(os.freemem());
Network Interfaces
This feature provides information about the network interfaces. The code sample prints an object containing details about each network interface, such as IP addresses and MAC addresses.
const os = require('os');
console.log(os.networkInterfaces());
Uptime
This feature allows you to get the system uptime in seconds. The code sample prints the number of seconds the system has been running.
const os = require('os');
console.log(os.uptime());
The 'systeminformation' package provides detailed system and hardware information and statistics. It offers more comprehensive data compared to 'os', including information about the battery, graphics, and processes. It is more feature-rich and suitable for applications requiring extensive system details.
The 'node-os-utils' package offers a set of utilities to get system information and perform system operations. It provides functionalities similar to 'os', such as CPU, memory, and disk usage statistics, but also includes additional features like process management and network speed tests.
The 'si' package is a lightweight alternative to 'systeminformation' and provides essential system information. It is less comprehensive than 'systeminformation' but offers a simpler API for retrieving basic system details like CPU, memory, and disk usage.
This is a Node.js Core Module
Really, there's no need, just require/import it :)
FAQs
NodeJS Core Module Extended
The npm package os receives a total of 522,566 weekly downloads. As such, os popularity was classified as popular.
We found that os 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.