lenz

Console based MAP πŸ—Ί, with lots of features packed in 😎

Usage no npm install needed!

<script type="module">
  import lenz from 'https://cdn.skypack.dev/lenz';
</script>

README

lenz πŸ€“

Console based MAP πŸ—Ί , with lots of features πŸ˜‰

More can be found here

Features

  • Given (sub-)domain name, it can look up all associated server IPv4/6 addresses, showing them in console map πŸ₯΄
  • Given IPv4/6 address, can lookup it's location & show it in console map πŸ₯³
  • Can find all active TCP/UDP socket connections & marks their respective peers in console map 🀩
  • This will be helpful in understanding which application ( using PID ) is to talking to which machine & where is that located

Note: For πŸ‘† operation, auto refresh has been enabled

  • Given torrent 🧲 link, can look up all peers associated with that infohash & show them in console map πŸ€“
  • Given any random URL, parses HTML & extracts out all static content i.e. {*.js, *.css, image/*} delivery domains & geo locate them 😎
  • Given Autonomous System Number ( ASN ), geo locates all IPv4 addresses owned by this Autonomous System ( AS ) πŸ˜‰πŸ¦Ύ

Caution: πŸ‘† operation is very computationally intensive, for large Autonomous Systems, might take some time to complete, though it keeps streaming, as soon as it finds something useful

In all these cases, generates a tabular report of all connected peers ( including self ), who were shown on console map

Now also dumps peers along with location info into JSON file, for all supported commands

Prerequisite

We need to download IP2Locationβ„’ LITE IP-COUNTRY-REGION-CITY-LATITUDE-LONGITUDE Database for using this tool.

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

Please try to stick with that to avoid unexpected behaviours.

We'll also need IP2Locationβ„’ LITE IP-ASN Database for using la command. See below.

  • Please use IPv4 version of ASN Database

And you need to have NodeJS( >=12.18.4 ).

Installation

Download & install from NPM.

npm i -g lenz

Develop

You can clone this repo in your machine & try to do installation another way.

git clone git@github.com:itzmeanjan/lenz.git
cd lenz/lenz
npm install

And install tool globally. Also make sure you've added NPM global installation path to your system PATH variable.

npm i -g .

Now you can use lenz from any where in your directory tree.

Usage

Invoke lenz from CLI, supply proper params for each of supported commands.

5p1d3r:lenz anjan$ lenz
[+]Author  : Anjan Roy < anjanroy@yandex.com >
[+]Project : https://github.com/itzmeanjan/lenz

Commands:
  lenz lm <magnet> <db>  Find peers by Torrent Infohash
  lenz ld <domain> <db>  Find location of Domain Name
  lenz lp <ip> <db>      Find location of IP Address
  lenz ls <db>           Find location of open TCP/UDP socket peer(s)

Options:
  --version  Show version number                               [boolean]
  --help     Show help                                         [boolean]

Not enough non-option arguments: got 0, need at least 1P

Please check here for more info

Contribution

If you're interested in adding more features to this CLI tool, please raise a PR.

Attribution

This non-profit open sourced software uses IP2Location LITE Database.

Thanks to @IP2Location