Git Product home page Git Product logo

xip's Introduction

xip

Go Reference Go Report Card

xip = 查 IP, Get ip geo information.

Installation

Download from GitHub Releases and place the executable file in your PATH.

Or the go way:

$ go install github.com/chuangbo/xip/v2@latest

Download QQWRY db (defaults to ~/.config/xip/qqwry.dat)

$ xip -u
Downloading to "/Users/me/.config/xip/qqwry.dat"
332.01 KiB / 5.13 MiB [==>---------------------------------------|  59s ] 83.00 KiB/s

Usage

Query a single IP address:

$ xip 1.2.3.4
1.2.3.4 APNIC Debogon-prefix网络        澳大利亚

Query multiple IP addresses:

$ xip 1.2.3.4 8.8.8.8
1.2.3.4 APNIC Debogon-prefix网络 澳大利亚
8.8.8.8 加利福尼亚州圣克拉拉县山景市谷歌公司DNS服务器 美国

Query by domain name:

$ xip baidu.com
39.156.69.79    移动    北京市
220.181.38.148  电信IDC机房     北京市

Pipe from stdin (append first found IP info the the end of each line):

$ dig baidu.com +short | xip
220.181.38.148   电信IDC机房 北京市
39.156.69.79     移动 北京市

$ traceroute -n baidu.com | xip
traceroute to baidu.com (220.181.38.148), 30 hops max, 60 byte packets  电信IDC机房 北京市
...
 6  203.100.48.189  2.236 ms 210.48.136.205  0.857 ms 203.100.48.189  1.964 ms  **电信CN2节
点 香港
 7  59.43.247.229  22.874 ms 59.43.181.185  1.470 ms 59.43.186.121  1.670 ms    **电信CN2骨
干网 **
 8  59.43.246.209  38.864 ms 59.43.246.225  39.442 ms 59.43.250.173  39.976 ms  **电信CN2骨
干网 **
 9  59.43.188.69  43.039 ms 59.43.188.65  41.212 ms 59.43.188.73  42.410 ms     **电信CN2骨
干网 **
10  59.43.132.17  51.926 ms 59.43.132.13  44.629 ms  44.821 ms  **电信CN2骨干网 **
11  202.97.12.177  83.995 ms 202.97.42.13  41.807 ms 202.97.12.177  80.883 ms   电信骨干网 中
国
12  36.110.247.46  40.963 ms 36.110.246.154  41.153 ms 180.149.128.118  41.589 ms       电信
北京市
13  36.110.246.65  42.199 ms * 36.110.249.58  43.591 ms         电信 北京市
14  * * 220.181.182.30  48.218 ms       电信互联网数据中心 北京市
15  * * 220.181.182.30  44.302 ms       电信互联网数据中心 北京市

Documentation

Golang package github.com/chuangbo/xip/v2/pkg/qqwry implements download and query IP geo-location information facilities for the famous qqwry.dat database.

Inspired from github.com/tonywubo/qqwry, with bug fixes, unit tests and performance improvements.

Reference

  • 纯真IP 纯真网络提供的免费离线 IP 数据库
  • tonywubo/qqwry 查询纯真数据库代码在此基础,修改了一些 bug,并加上了单元测试和性能优化
  • freshcn/qqwry 下载数据库代码在此基础修改而来
  • Nali CLI nodejs 编写的功能更多的工具,xip 可以认为是 Nali 的 Golang 替代品

Author

Chuangbo Li

xip's People

Contributors

chuangbo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

socialsky-io

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.