Created
June 8, 2020 14:17
-
-
Save medakk/665f96b6d70adc7a25381670eb04cb72 to your computer and use it in GitHub Desktop.
Find out which list on NextDNS is responsible for blacklisting your domain
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# where-is-my-domain-blacklisted.sh | |
# Copyright 2020 medakk | |
# Released under MIT License | |
if [ -z $1 ] ; then | |
echo "Usage: $0 <domain to search for>" | |
echo "Make sure you have jq and wget installed" | |
exit 1 | |
fi | |
workdir=`mktemp -d` | |
cd $workdir | |
FEEDS=https://raw.githubusercontent.com/nextdns/metadata/master/security/threat-intelligence-feeds.json | |
wget -q -O - $FEEDS | jq -r '.sources[].url' -r > domains.txt | |
mkdir -p lists | |
for line in `cat domains.txt`; do | |
path=`echo $line | tr / _` | |
wget -q -O "lists/${path}" $line | |
done | |
cd lists | |
grep -n "$1" * | |
# Cleanup | |
rm -rf $workdir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment