# Path: dyndnsc/detector/base.py
# LOG = logging.getLogger(__name__)
# class IPDetector(Subject, DynamicCliMixin):
#     def __init__(self, *args, **kwargs):
#     def can_detect_offline(self):
#     def af(self):
#     def get_old_value(self):
#     def set_old_value(self, value):
#     def get_current_value(self, default=None):
#     def set_current_value(self, value):
#     def has_changed(self):
#     def configuration_key_prefix():
# 
# Path: dyndnsc/common/six.py
# def ipaddress(addr):
#     """Return an ipaddress.ip_address object from the given string IP."""
#     return _ipaddress.ip_address(addr)
# 
# Path: dyndnsc/common/constants.py
# REQUEST_HEADERS_DEFAULT = {
#     # dyndns2 standard requires that we set our own user agent:
#     "User-Agent": "python-dyndnsc/%s" % __version__,
# }


import logging
import re
import requests
    import json
from random import choice
from .base import IPDetector, AF_INET, AF_INET6, AF_UNSPEC
from ..common.six import ipaddress
from ..common import constants
    Returns parsable output containing the IP address.

    Note: this detection mechanism works with both ipv4 as well as ipv6
          connectivity, however it should be noted that most dns resolvers
          implement negative caching:

        Alternating a DNS hostname between A and AAAA records is less efficient
        than staying within the same RR-Type. This is due to the fact that most
        libc-implementations do both lookups when getaddrinf() is called and
        therefore negative caching occurs (e.g. caching that a record does not
        exist).

        This also means that alternating only works well if the zone's SOA
        record has a minimum TTL close to the record TTL, which in turn means
        that using alternation should only be done in a dedicated (sub)domain
        with its own SOA record and a low TTL.
    """

    configuration_key = "webcheck46"

    urls = (
        ("https://icanhazip.com/", "plain"),
        ("https://www.nsupdate.info/myip", "plain"),
        ("https://ident.me", "plain"),
    )

    def __init__(self, *args, **kwargs):
        """Initialize."""
        super(IPDetectorWebCheck46, self).__init__(*args, **kwargs)


# Path: dyndnsc/detector/base.py
# LOG = logging.getLogger(__name__)
# class IPDetector(Subject, DynamicCliMixin):
#     def __init__(self, *args, **kwargs):
#     def can_detect_offline(self):
#     def af(self):
#     def get_old_value(self):
#     def set_old_value(self, value):
#     def get_current_value(self, default=None):
#     def set_current_value(self, value):
#     def has_changed(self):
#     def configuration_key_prefix():
# 
# Path: dyndnsc/common/six.py
# def ipaddress(addr):
#     """Return an ipaddress.ip_address object from the given string IP."""
#     return _ipaddress.ip_address(addr)
# 
# Path: dyndnsc/common/constants.py
# REQUEST_HEADERS_DEFAULT = {
#     # dyndns2 standard requires that we set our own user agent:
#     "User-Agent": "python-dyndnsc/%s" % __version__,
# }


# Path: dyndnsc/detector/webcheck.py
import logging
import re
import requests
    import json
from random import choice
from .base import IPDetector, AF_INET, AF_INET6, AF_UNSPEC
from ..common.six import ipaddress
from ..common import constants

    Returns parsable output containing the IP address.

    Note: this detection mechanism works with both ipv4 as well as ipv6
          connectivity, however it should be noted that most dns resolvers
          implement negative caching:

        Alternating a DNS hostname between A and AAAA records is less efficient
        than staying within the same RR-Type. This is due to the fact that most
        libc-implementations do both lookups when getaddrinf() is called and
        therefore negative caching occurs (e.g. caching that a record does not
        exist).

        This also means that alternating only works well if the zone's SOA
        record has a minimum TTL close to the record TTL, which in turn means
        that using alternation should only be done in a dedicated (sub)domain
        with its own SOA record and a low TTL.
    """

    configuration_key = "webcheck46"

    urls = (
        ("https://icanhazip.com/", "plain"),
        ("https://www.nsupdate.info/myip", "plain"),
        ("https://ident.me", "plain"),
    )

    def __init__(self, *args, **kwargs):
        """Initialize."""
        super(IPDetectorWebCheck46, self).__init__(*args, **kwargs)


        self.opts_family = AF_UNSPEC