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.
nodejs-info
Advanced tools
Node info on package, os, process memory, timezone, versions, environment, request
Outputs information about Node.js configuration, somewhat comparably to PHP’s phpinfo()
.
Includes information about the npm package, operating system, process memory, versions of Node and Node components, the request, and the headers.
The nodeinfo()
function returns an HTML page as a string, which can be rendered through any tool:
Connect, Express, Koa, etc.
Example usage (Node)
const http = require('http');
const nodeinfo = require('nodejs-info');
const server = http.createServer((req, res) => {
res.writeHead(200, { "Content-Type": "text/html" });
res.end(nodeinfo(req));
});
server.listen(3000, () => console.log('Listening on port 3000'));
Example usage (Express)
const express = require('express');
const nodeinfo = require('nodejs-info');
const app = express();
app.get('/', (req, res) => {
res.send(nodeinfo(req));
});
app.listen(3000, () => console.log('Listening on port 3000'));
Example usage (Koa)
const Koa = require('koa');
const nodeinfo = require('nodejs-info');
const app = new Koa();
app.use(ctx => {
ctx.body = nodeinfo(ctx.req);
});
app.listen(3000, () => console.log('Listening on port 3000'));
CSS styling can be provided via the optional style
parameter.
const html = nodeinfo(req, { style: 'table { background-color: #cccccc }' });
Requires Node.js v4.0+.
FAQs
Node info on package, os, process memory, timezone, versions, environment, request
The npm package nodejs-info receives a total of 41 weekly downloads. As such, nodejs-info popularity was classified as not popular.
We found that nodejs-info 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.