asnlkup
bulk lookup of AS info for IP addresses using IP2Location's ASN database
Install
Option 1: Binary
Download the latest release from https://github.com/jakewarren/asnlkup/releases/latest
Option 2: From source
go get github.com/jakewarren/asnlkup
Prerequisites
This program relies upon the IP2Location IP-ASN database https://lite.ip2location.com/database/ip-asn. Download the IPV4 CSV file from this page.
I recommend placing the database file in /home/username/.cache/asnlkup/
.
Example
❯ echo "8.8.8.8" | asnlkup
IP |ASN |ISP
8.8.8.8 |15169 |Google Inc.
Usage
asnlkup
reads newline separated IP addresses from a file or STDIN.
❯ asnlkup -h
Usage: asnlkup [<flags>] [FILE]
Optional flags:
-c, --csv=false: output in CSV format
-d, --db="/home/jake/.cache/asnlkup/IP2LOCATION-LITE-ASN.CSV": db file name
-h, --help=false: display help
-j, --json=false: output in JSON format
-o, --output="": output file name
Changes
All notable changes to this project will be documented in the changelog.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
License
MIT © 2018 Jake Warren