I am trying to do a reverse lookup in python,
what I did was, give input as www.fastly.com
test = dns.resolver.resolve('www.fastly.com.','CNAME', raise_on_no_answer=False)
print (test.rrset)
which gives output as,
www.fastly.com. 3600 IN CNAME prod.www-fastly-com.map.fastly.net.
What I want to do is, give input as prod.www-fastly-com.map.fastly.net
and get www.fastly.com
Please help me , how can I do this, I search other similar questions here, but did'nt get a definite answer.
Thank you and Stay Safe.