• Stars
    star
    393
  • Rank 109,518 (Top 3 %)
  • Language
    JavaScript
  • License
    GNU General Publi...
  • Created almost 5 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

⚓ Parse geoinfo of IP Address without leaving your terminal

Nali CLI

Parse info of IP Address or CDN's CNAME without leaving your terminal

Author Version License

Installation

yarn global add nali-cli
# npm install nali-cli -g

Prebuilt binaries is also available under the bin directory of the GitHub Repo.

Execute nali to download qqwry.dat right after installation:

$ nali

Required IP Database qqwry.dat will begin to download automatically during first time execution.

Usage

Query a simple IP address:

$ nali 1.145.1.4

1.145.1.4 [澳大利亚 墨尔本 Telstra]

Query IP addresses:

$ nali 114.5.1.4 191.919.8.10 1.0.0.1

114.5.1.4 [印度尼西亚] 191.919.8.10 1.0.0.1 [美国 APNIC&CloudFlare 公共 DNS 服务器]

Query and parse IP addresses, CNAME from stdin:

$ dig blog.skk.moe +short | nali

104.18.101.28 [美国 CloudFlare 公司 CDN 节点]
104.18.100.28 [美国 CloudFlare 公司 CDN 节点]


$ nslookup www.gov.cn 1.0.0.1 | nali
Server:		1.0.0.1 [美国 APNIC&CloudFlare 公共 DNS 服务器]
Address:	1.0.0.1 [美国 APNIC&CloudFlare 公共 DNS 服务器]#53

Non-authoritative answer:
www.gov.cn	canonical name = www.gov.cn.bsgslb.cn. [白山云 CDN]
www.gov.cn.bsgslb.cn [白山云 CDN]	canonical name = zgovweb.v.bsgslb.cn. [白山云 CDN]
Name:	zgovweb.v.bsgslb.cn [白山云 CDN]
Address: 107.155.25.117 [香港 Zenlayer]
Name:	zgovweb.v.bsgslb.cn [白山云 CDN]
Address: 107.155.25.118 [香港 Zenlayer]
Name:	zgovweb.v.bsgslb.cn [白山云 CDN]
Address: 107.155.25.116 [香港 Zenlayer]
Name:	zgovweb.v.bsgslb.cn [白山云 CDN]
Address: 107.155.25.120 [香港 Zenlayer]
Name:	zgovweb.v.bsgslb.cn [白山云 CDN]
Address: 2001:438:fffd:98::4
Name:	zgovweb.v.bsgslb.cn [白山云 CDN]
Address: 2001:438:fffd:98::5

Use Nali CLI built-in tools:

$ nali-nslookup blog.skk.moe

Server:         1.0.0.1 [美国 APNIC&CloudFlare 公共 DNS 服务器]
Address:        1.0.0.1 [美国 APNIC&CloudFlare 公共 DNS 服务器]#53

Non-authoritative answer:
Name:   blog.skk.moe
Address: 104.18.101.28 [美国 CloudFlare 公司 CDN 节点]
Name:   blog.skk.moe
Address: 104.18.100.28 [美国 CloudFlare 公司 CDN 节点]
Name:   blog.skk.moe
Address: 2606:4700::6812:641c
Name:   blog.skk.moe
Address: 2606:4700::6812:651c


$ dig cdn.jsdelivr.net @1.0.0.1 +short

cdn.jsdelivr.net.cdn.cloudflare.net. [Cloudflare]
104.16.89.20 [美国 CloudFlare 公司 CDN 节点]
104.16.88.20 [美国 CloudFlare 公司 CDN 节点]
104.16.85.20 [美国 CloudFlare 公司 CDN 节点]
104.16.87.20 [美国 CloudFlare 公司 CDN 节点]
104.16.86.20 [美国 CloudFlare 公司 CDN 节点]

Nali CLI has built-in tools:

  • nali-dig
  • nali-nslookup
  • nali-ping
  • nali-tracepath
  • nali-traceroute

Nali required related software installed. For example, in order to use nali-dig and nali-nslookup you need to have bind (dnsutils) installed.

Update IP Database:

nali update

Interface

$ nali --help

Usage: nali <command> [options]

Options:
  -v, --version  版本信息
  -h, --help     output usage information

Commands:
  parse          解析 stdin 或参数中的 IP 信息 (默认)
  update         更新 IP 库
  help [cmd]     display help for [cmd]

Related

Author

Nali CLI © Sukka, Released under the GPL-3.0 License.
Authored and maintained by Sukka with help from contributors (list).

Personal Website · Blog · GitHub @SukkaW · Telegram Channel @SukkaChannel · Twitter @isukkaw · Keybase @sukka

More Repositories

1

Koolshare-Clash

🐱 Run Clash Tunnel on Koolshare OpenWrt
ASP
1,279
star
2

nolyfill

Speed up your package installation process, reduce your disk usage, and extend the lifespan of your precious SSD.
TypeScript
1,097
star
3

DisqusJS

💬 Render Disqus comments in Mainland China using Disqus API
TypeScript
591
star
4

Surge

由 Sukka 搜集、整理、维护的、个人自用的、仅适用于 Surge 的 Rule Snippet
JavaScript
583
star
5

hexo-theme-suka

🎨Modern, powerful and simple theme for Hexo.
CSS
580
star
6

zsh-proxy

🔩 An oh-my-zsh plugin to configure proxy
Shell
369
star
7

foxact

React Hooks/Utils done right. For Browser, SSR, and React Server Components.
TypeScript
302
star
8

OpenCore-Document-zh_Hans

[非官方/Unofficial] OpenCore Bootloader 参考手册简体中文翻译
JavaScript
238
star
9

cloudflare-workers-async-google-analytics

☁️ The Cloudflare Workers implementation of an async Google Analytics
JavaScript
205
star
10

ClashEditor

📐 An editor for writing Clash config
HTML
192
star
11

cloudflare-block-bad-bot-ruleset

🚦 Block malicious crawlers with Cloudflare Firewall Rules
175
star
12

hexo-theme-doku

📜 Doku, a Hexo theme designed for writing documents.
HTML
145
star
13

rollup-plugin-swc

Use SWC with Rollup to transform / minify ESNext and TypeScript code.
TypeScript
139
star
14

zsh-osx-autoproxy

An oh-my-zsh plugin that configures proxy environment variables based on macOS's system preferences automatically
Shell
87
star
15

dotfiles

🔧 My development environment and config
Shell
82
star
16

Lenovo-Y9000X-Hackintosh

Lenovo LEGION Y9000X 2020 (Lenovo LEGION S740-15IRH) Hackintosh
ASL
71
star
17

ThinkPad-E480-Hackintosh

macOS Catalina & Big Sur on ThinkPad E480 (Hackintosh)
ASL
62
star
18

dashflare

An unofficial Cloudflare dashboard built on top of Cloudflare API.
TypeScript
55
star
19

bring-github-old-feed-back

Throw away the GitHub's useless "For You" feed and replace with the old good "Following" feed
TypeScript
53
star
20

forgetti-loader

A webpack/rspack loader and a Next.js plugin that brings an auto-memoization compiler to solves your hook spaghetti. Powered by forgetti which is inspired by React Forget.
TypeScript
52
star
21

CheckSSL

🔒Check your site's SSL status using curl & bash
Shell
41
star
22

vercel-dns-console

An unofficial implementation of Vercel DNS Dashboard
TypeScript
37
star
23

Friends

♥️ Friends of @SukkaW
JavaScript
33
star
24

react-compiler-webpack

The webpack/rspack loader for React Compiler
TypeScript
22
star
25

style9-webpack

The another Webpack Plugin for Atomic CSS-in-JS implementation style9
TypeScript
19
star
26

eslint-config-sukka

ESLint configuration of Sukka
TypeScript
17
star
27

stylex-webpack

The another webpack/Next.js Plugin for Facebook StyleX
TypeScript
17
star
28

markdown.css

📝 The simple CSS to replicate the GitHub Markdown style (Sukka Ver.)
CSS
14
star
29

disqusjs-proxy-example

Using Now as Disqus API Proxy
13
star
30

theme-doku-docs

📜 The documents & demo of hexo-theme-doku
13
star
31

CheckLatency

🌏 (WIP) A tool that check your latency to cloud provider every regions
JavaScript
13
star
32

memdisk

A library and a CLI to create RAM disk on macOS and Linux.
TypeScript
13
star
33

recipage

📃 Reci(pe)page: Turn a markdown file into one simple page
JavaScript
12
star
34

pure-svg-countdown

HTML
12
star
35

xbits

Convert bytes to a human readable string
TypeScript
12
star
36

SukkaW

My GitHub Profile
11
star
37

Cloudflare-WAF-to-AbuseIPDB

JavaScript
10
star
38

hexo-lute

A markdown renderer for Hexo based on Lute
JavaScript
8
star
39

consolas-powerline

Consolas Nerd Font (Consolas 7.0)
Python
8
star
40

busuanzi

The mirror of busuanzi js
8
star
41

hv-monsterdb-userscript

M-M-M-MONSTER DATABASE!
TypeScript
7
star
42

fast-cidr-tools

cidr-tools but up to 20x faster
TypeScript
7
star
43

eslint-config-sukka-archive

JavaScript
7
star
44

openconnect-snell

Allow Surge to connect to OpenConnect using Docker + Snell Server V4
Shell
6
star
45

suka.css

✨The most useless css framework.
CSS
6
star
46

telegram-reply-image-to-messsage-bot

TypeScript
6
star
47

kv4cf

A Modified version of cloudflare/kv-asset-handler, with Non-ASCII URL supported.
JavaScript
6
star
48

hentaiverse-monster-database

M-M-M-MONSTER DATABASE SERVER!
TypeScript
5
star
49

hentaiverse-util-api-userscript

A userscript provided API for other HentaiVerse userscripts
TypeScript
5
star
50

monsterbation-linter

TypeScript
5
star
51

bundled-open-cli

Open stuff like URLs, files, executables, with installation size reduced by 78%. Cross-platform.
TypeScript
5
star
52

bili-mcdn

HTML
4
star
53

Koolshare-OpenWrt-API-Documents

The API documents (unofficial) for Koolshare OpenWrt httpdb
4
star
54

tor-exit-page

An alternative "This is a Tor Exit Router" page
HTML
4
star
55

rcpy

Lightweight, fast, simple and flexible file copy utility for Node.js
TypeScript
4
star
56

teacup.js

🍵 Cache javascript & css files in localStorage
JavaScript
3
star
57

zsh-gitcd

🔩 An oh-my-zsh plugin for git clone && cd
Shell
3
star
58

nodelistparser

Surge / Mihomo (Clash.Meta) nodelist / proxy provider parser and generator
TypeScript
2
star
59

sponsors

TypeScript
2
star
60

Hackintosh-Kext-Builder

Shell
1
star
61

BadgeKit

🚩 Get every badge you need for your README
JavaScript
1
star
62

hexo-renderer-pejs

EJS(based on PEJS) renderer for Hexo
JavaScript
1
star
63

untyped-javascript-serialization-benchmark

TypeScript
1
star
64

cidr-tools-wasm

TypeScript
1
star