Created
August 7, 2020 13:56
-
-
Save wavvs/552926f5811ddb617ba3c4fa3ff21dca to your computer and use it in GitHub Desktop.
Get reliable resolvers for DNS recon and subdomain enumeration
This file contains hidden or 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
import requests | |
import csv | |
PUBDNS_URL = 'https://public-dns.info/nameservers.csv' | |
def fetch_valid_resolvers(): | |
r = requests.get(PUBDNS_URL) | |
d = csv.DictReader(r.content.decode().splitlines(),delimiter=',') | |
valid = [row['ip_address'] for row in d if row['reliability'] == '1.00' and ':' not in row['ip_address']] | |
for i in valid: | |
print(i) | |
if __name__ == '__main__': | |
# run dnsvalidator after | |
fetch_valid_resolvers() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment