Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.112
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
python3 /
dist-packages /
certbot /
plugins /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2022-03-20 10:36
__init__.py
30
B
-rw-r--r--
2018-11-07 22:14
common.py
16.9
KB
-rw-r--r--
2018-11-07 22:14
common_test.py
16.53
KB
-rw-r--r--
2018-11-07 22:14
disco.py
9.92
KB
-rw-r--r--
2018-11-07 22:14
disco_test.py
11.34
KB
-rw-r--r--
2018-11-07 22:14
dns_common.py
11.7
KB
-rw-r--r--
2018-11-07 22:14
dns_common_lexicon.py
3.96
KB
-rw-r--r--
2018-11-07 22:14
dns_common_lexicon_test.py
651
B
-rw-r--r--
2018-11-07 22:14
dns_common_test.py
8.25
KB
-rw-r--r--
2018-11-07 22:14
dns_test_common.py
1.61
KB
-rw-r--r--
2018-11-07 22:14
dns_test_common_lexicon.py
5.48
KB
-rw-r--r--
2018-11-07 22:14
enhancements.py
5.58
KB
-rw-r--r--
2018-11-07 22:14
enhancements_test.py
2.36
KB
-rw-r--r--
2018-11-07 22:14
manual.py
10.6
KB
-rw-r--r--
2018-11-07 22:14
manual_test.py
7.37
KB
-rw-r--r--
2018-11-07 22:14
null.py
1.34
KB
-rw-r--r--
2018-11-07 22:14
null_test.py
624
B
-rw-r--r--
2018-11-07 22:14
selection.py
13.55
KB
-rw-r--r--
2018-11-07 22:14
selection_test.py
7.77
KB
-rw-r--r--
2018-11-07 22:14
standalone.py
11.36
KB
-rw-r--r--
2018-11-07 22:14
standalone_test.py
9.2
KB
-rw-r--r--
2018-11-07 22:14
storage.py
4.08
KB
-rw-r--r--
2018-11-07 22:14
storage_test.py
5.37
KB
-rw-r--r--
2018-11-07 22:14
util.py
1.7
KB
-rw-r--r--
2018-11-07 22:14
util_test.py
1.61
KB
-rw-r--r--
2018-11-07 22:14
webroot.py
11.9
KB
-rw-r--r--
2018-11-07 22:14
webroot_test.py
11.95
KB
-rw-r--r--
2018-11-07 22:14
Save
Rename
"""Common code for DNS Authenticator Plugins built on Lexicon.""" import logging from requests.exceptions import HTTPError, RequestException from certbot import errors from certbot.plugins import dns_common logger = logging.getLogger(__name__) class LexiconClient(object): """ Encapsulates all communication with a DNS provider via Lexicon. """ def __init__(self): self.provider = None def add_txt_record(self, domain, record_name, record_content): """ Add a TXT record using the supplied information. :param str domain: The domain to use to look up the managed zone. :param str record_name: The record name (typically beginning with '_acme-challenge.'). :param str record_content: The record content (typically the challenge validation). :raises errors.PluginError: if an error occurs communicating with the DNS Provider API """ self._find_domain_id(domain) try: self.provider.create_record(type='TXT', name=record_name, content=record_content) except RequestException as e: logger.debug('Encountered error adding TXT record: %s', e, exc_info=True) raise errors.PluginError('Error adding TXT record: {0}'.format(e)) def del_txt_record(self, domain, record_name, record_content): """ Delete a TXT record using the supplied information. :param str domain: The domain to use to look up the managed zone. :param str record_name: The record name (typically beginning with '_acme-challenge.'). :param str record_content: The record content (typically the challenge validation). :raises errors.PluginError: if an error occurs communicating with the DNS Provider API """ try: self._find_domain_id(domain) except errors.PluginError as e: logger.debug('Encountered error finding domain_id during deletion: %s', e, exc_info=True) return try: self.provider.delete_record(type='TXT', name=record_name, content=record_content) except RequestException as e: logger.debug('Encountered error deleting TXT record: %s', e, exc_info=True) def _find_domain_id(self, domain): """ Find the domain_id for a given domain. :param str domain: The domain for which to find the domain_id. :raises errors.PluginError: if the domain_id cannot be found. """ domain_name_guesses = dns_common.base_domain_name_guesses(domain) for domain_name in domain_name_guesses: try: if hasattr(self.provider, 'options'): # For Lexicon 2.x self.provider.options['domain'] = domain_name else: # For Lexicon 3.x self.provider.domain = domain_name self.provider.authenticate() return # If `authenticate` doesn't throw an exception, we've found the right name except HTTPError as e: result = self._handle_http_error(e, domain_name) if result: raise result except Exception as e: # pylint: disable=broad-except result = self._handle_general_error(e, domain_name) if result: raise result raise errors.PluginError('Unable to determine zone identifier for {0} using zone names: {1}' .format(domain, domain_name_guesses)) def _handle_http_error(self, e, domain_name): return errors.PluginError('Error determining zone identifier for {0}: {1}.' .format(domain_name, e)) def _handle_general_error(self, e, domain_name): if not str(e).startswith('No domain found'): return errors.PluginError('Unexpected error determining zone identifier for {0}: {1}' .format(domain_name, e))