# README
geopipe
A tool to take domains from stdin
and output them to stdout
if have they at least one IP address inside the specified country.
Requirements
You will need a GeoLite2
database file. This database is free and can be downloaded here. License agreements of MaxMind apply. Parse the path to this file via the -f
option or with the environment variable MMDB
.
Usage
Usage: cat domains.txt | geopipe [OPTIONS]
Options:
-c Two letter country code of the country to pipe thru (default: US)
-f Path to the 'GeoLite2-Country.mmdb' file (default: ./GeoLite2-Country.mmdb)
-r Comma-separated list of DNS resolvers to use (default: 9.9.9.9,1.1.1.1,8.8.8.8)
-t Number of threads to spawn (default: 1)
-s Do not print errors
-h Prints this text
Installation
go install github.com/rtfmkiesel/geopipe/cli/geopipe@latest
Build from source
git clone https://github.com/rtfmkiesel/geopipe
cd geopipe
# to build binary in the current directory
go build -ldflags="-s -w" "cli/geopipe"
# to build & install binary into GOPATH/bin
go install "cli/geopipe"
Kudos
- cydave for contributing
- oschwald for the maxminddb-golang module