MCPcopy
hub / github.com/zabbix/community-templates / domain_exists

Function domain_exists

Unsorted/template_domainmonitor/6.2/files/dm.py:133–142  ·  view source on GitHub ↗

Tries to find out if domain exists leveraging different DNS checks

(domain_name)

Source from the content-addressed store, hash-verified

131 return False
132
133def domain_exists(domain_name):
134 """
135 Tries to find out if domain exists leveraging different DNS checks
136 """
137 if domain_a_record_exists(domain_name):
138 return True
139 if domain_mx_record_exists(domain_name):
140 return True
141 else:
142 return False
143
144def get_domain_file(dm_args):
145 """downloads json file with domain defintions

Callers 2

check_dmarc_presentFunction · 0.85
mainFunction · 0.85

Calls 2

domain_a_record_existsFunction · 0.85
domain_mx_record_existsFunction · 0.85

Tested by

no test coverage detected