Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
The dev-ip npm package is a utility that helps developers quickly find their local IP address. This can be particularly useful for setting up local development environments, testing, and debugging network-related issues.
Get Local IP Address
This feature allows you to retrieve the local IP addresses of your machine. The code sample demonstrates how to use the dev-ip package to get an array of local IP addresses and print them to the console.
const devip = require('dev-ip');
const localIPs = devip();
console.log(localIPs);
The internal-ip package provides similar functionality by allowing you to get your internal (local) IP address. It supports both IPv4 and IPv6 addresses. Compared to dev-ip, internal-ip offers more flexibility in terms of the types of IP addresses it can retrieve.
The ip package is a comprehensive library for IP address manipulation. It can be used to get local IP addresses, as well as perform various operations like subnet calculations, IP range checks, and more. While dev-ip focuses solely on retrieving local IP addresses, the ip package offers a broader range of IP-related functionalities.
The os package is a built-in Node.js module that provides operating system-related utility methods. It includes a method called os.networkInterfaces() that can be used to get network interface details, including local IP addresses. While not as straightforward as dev-ip, it offers a native way to achieve similar results without needing an external package.
Find a suitable IP host to view local websites on.
Install it globally to use on the command line:
sudo npm install -g dev-ip
then run:
dev-ip
npm install dev-ip
var devip = require('dev-ip');
devip(); // "192.168.1.76" or false if nothing found (ie, offline user)
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Run lint & tests with gulp
.
(Nothing yet)
Copyright (c) 2013 Shane Osbourne Licensed under the MIT license.
FAQs
Find a suitable IP host to view local websites on.
The npm package dev-ip receives a total of 648,087 weekly downloads. As such, dev-ip popularity was classified as popular.
We found that dev-ip 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.