Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lenz

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lenz - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

38

index.js

@@ -15,2 +15,3 @@ #!/usr/bin/env node

const { init, lookup } = require('./locate')
const { underline } = require('colors')

@@ -168,3 +169,5 @@ // validating user given torrent magnet link

render((map, screen) => {
dns.lookup(argv.domain, { all: true, verbatim: true }, (err, addrs) => {
// first look up ipv4 addresses for given domain name
dns.resolve4(argv.domain, (err, _addrs) => {
if (err !== undefined && err !== null) {

@@ -176,14 +179,31 @@ screen.destroy()

addrs.forEach(v => {
let resp = lookup(v.address)
if (validateLookup(resp)) {
// cached dns looked up address's location info
markers.push({ lon: resp.lon, lat: resp.lat, color: 'magenta', char: 'o' })
// adding dns looked up address's location onto map
addMarkerAndRender(resp.lon, resp.lat, 'magenta', 'o', map, screen)
// filter out invalid addresses i.e. for which we can't
// seem to find valid location entry
_addrs.map(v => lookup(v)).filter(v => validateLookup(v)).forEach(v => {
// cached dns looked up address's location info
markers.push({ lon: v.lon, lat: v.lat, color: 'magenta', char: 'o' })
// adding dns looked up address's location onto map
addMarkerAndRender(v.lon, v.lat, 'magenta', 'o', map, screen)
})
// then go for resolving ipv6 addresses, as not
// all domains may support ipv6, which is why, we're
// going to not destroy application if case of failure here, because
// it's guaranteed that domain name exists if control of execution
// has come to this point
dns.resolve6(argv.domain, (err, _addrs) => {
if (err === undefined || err === null) {
_addrs.map(v => lookup(v)).filter(v => validateLookup(v)).forEach(v => {
// cached dns looked up address's location info
markers.push({ lon: v.lon, lat: v.lat, color: 'magenta', char: 'o' })
// adding dns looked up address's location onto map
addMarkerAndRender(v.lon, v.lat, 'magenta', 'o', map, screen)
})
}
console.log('Successful look up'.green)
})
console.log('Successful look up'.green)
})
})

@@ -190,0 +210,0 @@ })

{
"name": "lenz",
"version": "1.0.0",
"version": "1.1.0",
"description": "Console based MAP 🗺",

@@ -31,3 +31,4 @@ "main": "index.js",

"domains",
"peer"
"peer",
"iplocation"
],

@@ -34,0 +35,0 @@ "author": "Anjan Roy <anjanroy@yandex.com>",

# lenz 🤓
Console based MAP 🗺
Console based MAP 🗺 , with lots of features 😉

@@ -11,3 +11,3 @@ > More can be found [here](https://github.com/itzmeanjan/lenz#motivation)

Consider using IPv6 version, cause that will also support IPv4 lookup. This specific database, I've planned to use, is codenamed **db5**.
Consider using IPv6 Binary version, cause that will also support IPv4 lookup. This specific database, I've planned to use, is codenamed **db5**.

@@ -31,2 +31,3 @@ And you need to have NodeJS( >10.X ).

cd lenz/lenz
npm install
```

@@ -63,4 +64,6 @@

Please check here for more [info](https://github.com/itzmeanjan/lenz#usage)
## contribution
If you're interested in adding more features to this CLI tool, please raise a PR.
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