From d8a3e2ac9c4cd5b7809ab3313c10044c97f72587 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Geoffrey=20=E2=80=9CFrogeye=E2=80=9D=20Preud=27homme?= Date: Mon, 9 Dec 2024 19:38:14 +0100 Subject: [PATCH] Allow selecting region for DNS resolvers --- .env.default | 1 + fetch_resources.sh | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.env.default b/.env.default index e96ff6b..ac721de 100644 --- a/.env.default +++ b/.env.default @@ -3,3 +3,4 @@ MASSDNS_HASHMAP_SIZE=1000 PROFILE=0 SINGLE_PROCESS=0 MASSDNS_BINARY=massdns +RESOLVERS_REGION=us diff --git a/fetch_resources.sh b/fetch_resources.sh index b9ab599..43d4121 100755 --- a/fetch_resources.sh +++ b/fetch_resources.sh @@ -1,5 +1,8 @@ #!/usr/bin/env bash +source .env.default +source .env + function log() { echo -e "\033[33m$@\033[0m" } @@ -28,7 +31,7 @@ dl http://data.iana.org/TLD/tlds-alpha-by-domain.txt temp/all_tld.temp.list grep -v '^#' temp/all_tld.temp.list | awk '{print tolower($0)}' > temp/all_tld.list log "Retrieving nameservers…" -dl https://public-dns.info/nameservers.txt nameservers/public-dns.cache.list +dl https://public-dns.info/nameserver/${RESOLVERS_REGION}.txt nameservers/public-dns.cache.list log "Retrieving top subdomains…" dl http://s3-us-west-1.amazonaws.com/umbrella-static/top-1m.csv.zip top-1m.csv.zip