dnstats¶
dnstats.utils¶
-
dnstats.utils.
chunks
(array, size)¶ Source: https://chrisalbon.com/python/data_wrangling/break_list_into_chunks_of_equal_size/
-
dnstats.utils.
validate_fqdn
(fqdn: str) → bool¶ Give a string checks if its a Fully qualified domain name (FQDN).
This regex is based Django’s validator for URls.
Copyright (c) Django Software Foundation and individual contributors. All rights reserved.
- Parameters
fqdn –
- Returns
bool if input is a FQDN
-
dnstats.utils.
validate_url
(url: str) → bool¶ This regex is based Django’s validator for URls.
Copyright (c) Django Software Foundation and individual contributors. All rights reserved.
- Parameters
url –
- Returns
if the input is a url
dnstats.dnsvaildate¶
dnstats.dnsvalidate.caa¶
-
class
dnstats.dnsvalidate.caa.
CAAErrors
(value)¶ An enumeration.
-
INVALID_FLAG
= 2¶
-
INVALID_PROPERTY_STRUCTURE
= 0¶
-
INVALID_TAG
= 3¶
-
INVALID_VALUE
= 4¶
-
IODEF_INVALID_EMAIL
= 8¶
-
IODEF_INVALID_URL
= 9¶
-
IODEF_NO_SCHEME
= 7¶
-
ISSUEWILD_DOMAIN_INVALID
= 10¶
-
ISSUE_DOMAIN_INVALID
= 11¶
-
NO_CAA_RECORDS
= 1¶
-
TAG_TOO_LONG
= 12¶
-
VALUE_NOT_QUOTED
= 6¶
-
VALUE_QUOTE_ERROR
= 5¶
-
-
class
dnstats.dnsvalidate.caa.
Caa
(caa_records: list, domain: str)¶ DNS validation for CAA
-
property
errors
¶
-
property
iodef
¶
-
property
issue
¶
-
property
issuewild
¶
-
property
-
dnstats.dnsvalidate.caa.
validate
(caa_result_set: list, domain: str) → dict¶ Validate a CAA record set based on RFC 8659
- Parameters
caa_result_set – a list of CAA records as str
domain – the domain of the CAA records as str
- Returns
dict
dnstats.dnsvalidate.dmarc¶
-
class
dnstats.dnsvalidate.dmarc.
Dmarc
(dmarc_result_set)¶ ” Validates and represents a DMARC record
-
property
adkim
¶
-
property
aspf
¶
-
property
errors
¶
-
property
fo
¶
-
property
is_valid
¶
-
property
p
¶ Policy of the DMARC policy :return:
-
property
pct
¶
-
property
rua
¶
-
property
ruf
¶
-
property
sp
¶
-
property
-
class
dnstats.dnsvalidate.dmarc.
DmarcErrors
(value)¶ An enumeration.
-
INVALID_ADKIM_VALUE
= 1¶
-
INVALID_ASPF_VALUE
= 2¶
-
INVALID_DMARC_RECORD
= 0¶
-
INVALID_DMARC_RECORD_START
= 10¶
-
INVALID_FAILURE_REPORTING_VALUE
= 3¶
-
INVALID_PCT_VALUE
= 9¶
-
INVALID_POLICY
= 4¶
-
INVALID_RF_VALUE
= 7¶
-
INVALID_RI_VALUE
= 8¶
-
INVALID_SUBDOMAIN_POLICY
= 5¶
-
MULTIPLE_DMARC_RECORDS
= 6¶
-
NO_DMARC_RECORD
= 11¶
-
-
dnstats.dnsvalidate.dmarc.
validate
(dmarc_result_set: list) → dict¶
dnstats.dnsvalidate.ns¶
-
class
dnstats.dnsvalidate.ns.
Ns
(ns_records: list, ns_ip_addresses: dict, ns_server_ns_results: dict, domain: str)¶ Validate NS records for a given domain.