Skip to content

Instantly share code, notes, and snippets.

@giganteous
Last active January 29, 2018 12:34
Show Gist options
  • Save giganteous/ee41e0456b52ca5fd7297200168d979d to your computer and use it in GitHub Desktop.
Save giganteous/ee41e0456b52ca5fd7297200168d979d to your computer and use it in GitHub Desktop.
import dns.resolver
r = dns.resolver.Resolver()
r.nameservers = ['194.109.9.99']
result = r.query('servfail.sidnlabs.nl', raise_on_no_answer=False)
if result.rcode == SERVFAIL:
print("YES")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment