iplookupdb

command module
v0.0.0-...-c6834be Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

README

iplookupdb

iplookupdb utilizes the MaxMind GeoIP and GeoLite databases to look up IP addresses. To use this tool, you must first create an account and download the necessary database from MaxMind. See GeoLite2 Free Geolocation Data .

Usage:

iplookupdb [flags] [ip address ...]

The flags are:

-db string
	Path to the GeoLite2 City database (default "GeoLite2-City.mmdb")
-delimiter string
	Delimiter for the CSV output. (default ",")
-in string
	Input file path. If not specified, reads from standard input.
-lang string
	Language for GeoIP lookup results. (default "en")
-out string
	Output file path. If not specified, writes to standard output.

You can specify IP addresses directly via the command line. Use the -in flag to read from a file. If no IP addresses are provided on the command line and the -in flag is not used, the program reads from stdin.

The output is a comma-separated list of the IP address, city, subdivision (e.g., state for US-based addresses), and country. To change the separator, use the -delimiter flag. By default, the output is sent to stdout unless the -out flag is specified.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL