New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

iplog

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iplog - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

18

bin/ip.js
#!/usr/bin/env node
var http = require('http');
var os = require('os');
var colors = require('colors');
http.request({
host: 'ifconfig.me',
path: '/ip',
}, function (res) {
res.on('data', function (chunk) {
console.log('External IP Addr: ' + colors.yellow(chunk));
});
}).end();
var ifaces = os.networkInterfaces();

@@ -11,8 +21,4 @@

iface.forEach(function (conn) {
if (conn.family === 'IPv4') {
if (conn.internal) {
console.log('Internal IP Addr: ' + colors.green(conn.address));
} else {
console.log('External IP Addr: ' + colors.yellow(conn.address));
}
if (conn.family === 'IPv4' && !conn.internal) {
console.log('Internal IP Addr: ' + colors.green(conn.address));
}

@@ -19,0 +25,0 @@ });

{
"name": "iplog",
"version": "1.0.1",
"version": "1.0.2",
"description": "Log you internal and external IP addr",

@@ -5,0 +5,0 @@ "bin": {

@@ -11,4 +11,4 @@ #IP Log

```
Internal IP Addr: 127.0.0.1
External IP Addr: 10.252.26.78
Internal IP Addr: 10.252.26.78
External IP Addr: 63.245.221.32
```

@@ -15,0 +15,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc