Gangmax Blog

nali-cli: Parse Geo Info of IP Address without Leaving Terminal

I know this tool from Sukka’s blog here. With this tool, we can search IP geo info with local data(downloaded when first running).

1
2
3
4
5
6
7
8
9
10
11
12
# 1. Install
> npm i nali-cli -g
# 2. When runing for the first time, it downloads the IP database.
> nali
没有找到 IP 数据库!开始下载...
正在下载 [====================] 100% 剩余时间 0.0s
下载完成! IP 库版本: 2020 年 1 月 15 日
# 3. Run
> nali 11.4.5.14
11.4.5.14 [美国 俄亥俄州哥伦布市 DoD 网络信息中心]
> nali 114.514.191.9 114.5.1.4
114.514.191.8 114.5.1.4 [印度尼西亚]

Besides the “nali” command line tool, the “nali-cli” utility also has the following features:

  1. nali-dig

  2. nali-nslookup

  3. nali-ping

  4. nali-tracepath

  5. nali-traceroute

Note that, the 5 commands are just wrappers of bind(dnsutils). So make sure you have the original package installed before running them.

“nali-cli” is written in “Node.js”. The source code can be found here which is worth reading.

Comments