https://github.com/maxmind/geoip2-csv-converter
GeoIP2 CSV Format Converter
https://github.com/maxmind/geoip2-csv-converter
Last synced: about 1 year ago
JSON representation
GeoIP2 CSV Format Converter
- Host: GitHub
- URL: https://github.com/maxmind/geoip2-csv-converter
- Owner: maxmind
- License: apache-2.0
- Created: 2014-12-09T17:48:58.000Z (over 11 years ago)
- Default Branch: main
- Last Pushed: 2025-04-10T18:12:25.000Z (about 1 year ago)
- Last Synced: 2025-04-12T19:50:02.614Z (about 1 year ago)
- Language: Go
- Homepage:
- Size: 268 KB
- Stars: 205
- Watchers: 32
- Forks: 48
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
GeoIP2 CSV Format Converter
---------------------------
This is a simple utility for converting the MaxMind GeoIP2 and GeoLite2 CSVs
to different formats for representing IP addresses such as IP ranges or
integer ranges.
Compiled binaries for Linux/x86_64, Windows, and macOS (darwin) can be
downloaded from the GitHub releases page.
Usage
=====
Required:
* -block-file=[FILENAME] - The name of the block CSV file to use as input.
* -output-file=[FILENAME] - The file name to the output CSV
In addition, at least one of these is required:
* -include-cidr - Include the network in CIDR format
* -include-range - Include the IP range of the network in string format
* -include-integer-range - Include the IP range of the network in integer format
* -include-hex-range - Include the IP range of the network in hexadecimal format
Output
======
### CIDR (-include-cidr)
This will include the network in CIDR notation in the `network` column as it
is in the original CSV.
### Range (-include-range)
This adds `network_start_ip` and `network_last_ip` columns. These
are string representations of the first and last IP address in the network.
### Integer Range (-include-integer-range)
This adds `network_start_integer` and `network_last_integer` columns. These
are integer representations of the first and last IP address in the network.
### Hex Range (-include-hex-range)
This adds `network_start_hex` and `network_last_hex` columns. These
are hexadecimal representations of the first and last IP address in the network.
Copyright and License
=====================
This software is Copyright (c) 2014 - 2024 by MaxMind, Inc.
This is free software, licensed under the Apache License, Version 2.0.