March 2019
Beginner
490 pages
12h 40m
English
In this example, we are checking the properties of a specific domain and checking whether a domain is a suddomain or superdomain from another.
You can find the following code in the dns_domains.py file:
import dns.namedomain1= dns.name.from_text('www.dnspython.org')domain2 = dns.name.from_text('dnspython.org')print(domain2 .is_subdomain(domain1))print(domain2 .is_superdomain(domain1))
Read now
Unlock full access