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.2.1 to 1.3.0

resources.js

40

index.js

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

const { init, lookup } = require('./locate')
const { getHTML, extractCSSResources, extractScriptResources, extractDomainNamesFromURLs, mergetTwoSets } = require('./resources')

@@ -346,2 +347,41 @@ // validating user given torrent magnet link

})
.command('lr <url> <db> [dump]', 'Locate static content delivery domain(s) used by URL',
{
url: { describe: 'inspect for finding static content delivery domain(s)', type: 'string' },
db: { describe: 'path to ip2location-db5.bin', type: 'string' },
dump: { describe: 'path to sink-file.json', type: 'string', default: 'dump.json' }
}, argv => {
checkDB5Existance(argv.db)
init(argv.db)
render((map, screen) => {
getHTML(argv.url).then(v => {
mergetTwoSets(extractDomainNamesFromURLs(extractCSSResources(v)),
extractDomainNamesFromURLs(extractScriptResources(v))).forEach(v => {
domainToIP(v).then(v => {
v.map(v => lookup(v)).filter(validateLookup).forEach(v => {
// cached remote machine IP
markers.push({ ...v, color: 'magenta', char: 'o' })
// adding remote machine's location into map
addMarkerAndRender(v.lon, v.lat, 'magenta', 'o', map, screen)
})
}).catch(e => {
// doing nothing as of now
})
})
console.log('Successful look up'.green)
}).catch(_ => {
screen.destroy()
console.log('[!]URL lookup failed'.red)
process.exit(1)
})
})
})
.demandCommand().help().wrap(72).argv

3

package.json
{
"name": "lenz",
"version": "1.2.1",
"version": "1.3.0",
"description": "Console based MAP πŸ—Ί, with lots of features packed in 😎",

@@ -45,2 +45,3 @@ "main": "index.js",

"blessed-contrib": "^4.8.20",
"cheerio": "^1.0.0-rc.3",
"colors": "^1.4.0",

@@ -47,0 +48,0 @@ "ip2location-nodejs": "^8.3.0",

@@ -13,2 +13,3 @@ # lenz πŸ€“

- Given torrent 🧲 link, can look up all peers associated with that infohash & show them in console map
- Given one URL, parses HTML & extracts out all static content i.e. {`js`, `css`} delivery domains & geo locate them

@@ -15,0 +16,0 @@ _In all these cases, generates a tabular report of all connected peers _( including self )_, who were shown on console map_

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