msticpy/sectools/tiproviders/ti_provider_base.py
def _preprocess_dns(domain: str) -> SanitizedObservable:
    """Ensure DNS is a valid-looking domain."""
    if "." not in domain:
        return SanitizedObservable(None, "Domain is unqualified domain name")
    try:
        addr = ip_address(domain)
        del addr
        return SanitizedObservable(None, "Domain is an IP address")
    except ValueError:
        pass

    return SanitizedObservable(domain, "ok")
Ensure DNS is a valid-looking domain.
Ensure DNS is a valid-looking domain.
Ensure DNS is a valid - looking domain .
def _preprocess_dns(domain: str) -> SanitizedObservable:
    if "." not in domain:
        return SanitizedObservable(None, "Domain is unqualified domain name")
    try:
        addr = ip_address(domain)
        del addr
        return SanitizedObservable(None, "Domain is an IP address")
    except ValueError:
        pass
    return SanitizedObservable(domain, "ok")
def _preprocess_dns ( domain : str ) -> SanitizedObservable : if "." not in domain : return SanitizedObservable ( None , "Domain is unqualified domain name" ) try : addr = ip_address ( domain ) del addr return SanitizedObservable ( None , "Domain is an IP address" ) except ValueError : pass return SanitizedObservable ( domain , "ok" )
Ensure DNS is a valid-looking domain.
Ensure DNS is a valid - looking domain .
"""Ensure DNS is a valid-looking domain."""
domain
str