https://github.com/alastairruhm/ipsearch
a CLI tool searching ip location based on api of ipip.net
https://github.com/alastairruhm/ipsearch
cli tools
Last synced: 6 months ago
JSON representation
a CLI tool searching ip location based on api of ipip.net
- Host: GitHub
- URL: https://github.com/alastairruhm/ipsearch
- Owner: alastairruhm
- License: mit
- Created: 2016-11-15T05:58:15.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-06-01T08:44:18.000Z (about 8 years ago)
- Last Synced: 2024-06-20T02:10:28.627Z (about 2 years ago)
- Topics: cli, tools
- Language: Go
- Homepage:
- Size: 18.6 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/alastairruhm/ipsearch/releases)
[](https://travis-ci.org/alastairruhm/ipsearch)
[](https://coveralls.io/github/alastairruhm/ipsearch?branch=master)
[](https://goreportcard.com/report/github.com/alastairruhm/ipsearch)
[](https://opensource.org/licenses/MIT)
# ipsearch
a CLI tool searching ip location based on api of https://www.ipip.net/
## Installation
Use [`go get`](https://golang.org/cmd/go/#hdr-Download_and_install_packages_and_dependencies) to install and update:
```sh
$ go get -u github.com/alastairruhm/ipsearch
```
Or without golang installed, you can download binary from [release page](https://github.com/alastairruhm/ipsearch/releases), rename it with `ipsearch` and place it in $PATH directory.
## Usage
From the commandline, `ipsearch` provides the functions as follows.By default, it prints its output to `stdout`.
example:
```sh
# IP
$ ipsearch 8.8.8.8
8.8.8.8 GOOGLE-GOOGLE-google.com
# domain
$ ipsearch github.io
lookup host: github.io
23.235.37.133 FASTLY-FASTLY-fastly.com
23.235.33.133 FASTLY-FASTLY-fastly.com
# sub-domain
$ ipsearch api.github.com
lookup host: api.github.com
192.30.253.117 美国-弗吉尼亚州-阿什本
192.30.253.116 美国-弗吉尼亚州-阿什本
# URL
$ ipsearch https://github.com/alastairruhm/ipsearch
lookup host: github.com
192.30.253.112 美国-弗吉尼亚州-阿什本
192.30.253.113 美国-弗吉尼亚州-阿什本
```
## License
`ipsearch` is released under the [MIT License](https://opensource.org/licenses/MIT).