Skip to content

Commit

Permalink
Use fixed dns for whitelist
Browse files Browse the repository at this point in the history
  • Loading branch information
willnode committed Dec 9, 2024
1 parent 00b1e94 commit 046cbf4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/whitelist/resolve.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@ HOST_ADDRESSES=""
for RECORD_TYPE in A AAAA; do
while read -r p; do
if [[ $p != "#"* ]]; then
if [[ -v TERMINFO ]]; then
if [[ -v TERM ]]; then
printf '\r%s Fetching NS %s of %s' "$(tput el)" $RECORD_TYPE $p
fi
FFI=$(dig +short $RECORD_TYPE $(echo "$p" | xargs) | grep -v '\.$')
FFI=$(dig +short $RECORD_TYPE $p @1.1.1.1 | grep -v '\.$')
if [ -z "$FFI" ]; then
echo "No records found for $p, exiting."
exit 1
fi
while read -r q; do
if [[ $q != "" ]]; then
HOST_ADDRESSES+="$q $p"$'\n'
Expand Down

0 comments on commit 046cbf4

Please sign in to comment.