Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
network
Advanced tools
Readme
$ npm install network
Returns your public IP address, as reported by DynDNS.org or other services.
var network = require('network');
network.get_public_ip(function(err, ip) {
console.log(err || ip); // should return your public IP address
})
$ network public_ip
Returns the IP address assigned to your first active network inteface.
network.get_private_ip(function(err, ip) {
console.log(err || ip); // err may be 'No active network interface found'.
})
$ network private_ip
Returns the IP of the gateway that your active network interface is linked to.
network.get_gateway_ip(function(err, ip) {
console.log(err || ip); // err may be 'No active network interface found.'
})
$ network gateway_ip
Returns the IP, MAC address and interface type for the active network interface. On OS X and Linux you also get the IP of its assigned gateway.
network.get_active_interface(function(err, obj) {
/* obj should be:
{ name: 'eth0',
ip_address: '10.0.1.3',
mac_address: '56:e5:f9:e4:38:1d',
type: 'Wired',
netmask: '255.255.255.0',
gateway_ip: '10.0.1.1' }
*/
})
$ network active_interface
Returns list of network interfaces, including MAC addresses and the such, just as in the example above.
network.get_interfaces_list(function(err, list) {
/* list should be:
[{
name: 'eth0',
ip_address: '10.0.1.3',
mac_address: '56:e5:f9:e4:38:1d',
type: 'Wired',
netmask: '255.255.255.0',
gateway_ip: '10.0.1.1'
},
{ ... }, { ... }]
*/
})
$ network interfaces_list
Written by Tomás Pollak. Copyright (c) Fork, Ltd.
MIT.
FAQs
Cross platform network utilities for Node.js (gateway_ip, MAC address, etc)
The npm package network receives a total of 3,083 weekly downloads. As such, network popularity was classified as popular.
We found that network 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.