Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikubill/nali-go
给IP加上地理信息的命令行小工具
https://github.com/mikubill/nali-go
cli nali qqwry zxinc
Last synced: about 1 month ago
JSON representation
给IP加上地理信息的命令行小工具
- Host: GitHub
- URL: https://github.com/mikubill/nali-go
- Owner: Mikubill
- License: gpl-3.0
- Created: 2020-01-18T03:07:19.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-07-17T11:00:20.000Z (over 2 years ago)
- Last Synced: 2024-06-19T00:30:51.896Z (7 months ago)
- Topics: cli, nali, qqwry, zxinc
- Language: Go
- Homepage:
- Size: 516 KB
- Stars: 29
- Watchers: 5
- Forks: 14
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Nali Go
给IP加上地理信息的命令行小工具
本项目支持IPv4(纯真IP数据库)和IPv6(ZX公网IPv6库)。
## 下载/运行 说明
Go语言程序, 可直接在[发布页](https://github.com/Mikubill/nali-go/releases)下载使用。
Query simple IP address:
```bash
➜ nali-go 2.3.6.7 1.1.2.52.3.6.7 [法国 Orange]
1.1.2.5 [福建省 电信]➜ nali-go 2001:da8:2:1::2
2001:da8:2:1::2 [中国北京市 教育网(CERNET2N)骨干网-清华大学-郑州大学]
```Query IP addresses from `stdin`:
```bash
➜ dig github.io +short | nali-go185.199.110.153 [美国 GitHub+Fastly节点]
185.199.111.153 [美国 GitHub+Fastly节点]
185.199.109.153 [美国 GitHub+Fastly节点]
185.199.108.153 [美国 GitHub+Fastly节点]
```Use Nali CLI built-in tools shortcut:
```bash
➜ nali-go nslookup ip.sbServer: 1.0.0.1 [美国 APNIC&CloudFlare 公共 DNS 服务器]
Address: 1.0.0.1 [美国 APNIC&CloudFlare 公共 DNS 服务器]#53Non-authoritative answer:
Name: ip.sb
Address: 119.9.95.61 [香港 Rackspace Hosting公司]
```Update IP Database:
```bash
➜ nali-go update
```Delete IP Database:
```bash
➜ nali-go delete
```Check Version:
```bash
➜ nali-go versionNaLi-Go
Source: https://github.com/Mikubill/nali-go
Git Commit Hash: 61e7869a02dc88c28093fac5a5aa35c06ef18333
```## 编译 说明
安装 Go
```bash
wget https://dl.google.com/go/go1.13.6.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.13.6.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin:`pwd`/go/bin/
```然后设置一下GOPROXY:
```bash
export GOPROXY=https://goproxy.cn
```clone本项目,然后编译即可。
```bash
go get -u github.com/Mikubill/nali-go
go install github.com/Mikubill/nali-go
```## Related
- [Sukka - NaLi-CLI](https://github.com/sukkaw/nali-cli)
- [CZ88 QQIP 数据库](http://www.cz88.net/fox/ipdat.shtml) 纯真网络提供的免费离线 IP 数据库
- [QQWry Mirror](https://qqwry.mirror.noc.one) Just a mirror of qqwry ipdb