ip2asn-cli-0.1.0 is not a library.
ip2asn-cli
A high-performance command-line interface for mapping IP addresses to Autonomous System (AS) information.
This tool provides two main functions:
- Lookup: Resolves one or more IP addresses, provided either as command-line arguments or via standard input. Output can be in a human-readable format or structured JSON.
- Update: Downloads the latest IP-to-ASN dataset from iptoasn.com, ensuring lookups are based on current data. The dataset is cached locally.
The CLI is designed to be fast, efficient, and suitable for interactive use or integration into automated shell scripts. It automatically handles caching and periodic updates of the dataset.
Usage
# Look up a single IP
# Look up a single IP (default command)
| | | |
# Look up multiple IPs from stdin
|
| | | |
| | | |
# Output in JSON format
|
{
}
# Download the latest dataset