mirror of
https://github.com/fergalmoran/bitchmin.git
synced 2026-02-16 04:45:44 +00:00
14 lines
279 B
Python
14 lines
279 B
Python
import pydig
|
|
|
|
|
|
def validate_dns_record(host, ip, server):
|
|
resolver = pydig.Resolver(
|
|
nameservers=[
|
|
server
|
|
]
|
|
)
|
|
result = resolver.query(host, 'A')
|
|
print('Result is: {}\nSuccess: {}'.format(result, ip in result))
|
|
|
|
return ip in result
|