Linux newlinux5.pouyasazan.org 3.10.0-962.3.2.lve1.5.60.el7.x86_64 #1 SMP Fri Jul 23 07:07:00 EDT 2021 x86_64
LiteSpeed
Server IP : 88.99.66.243 & Your IP : 216.73.216.178
Domains :
Cant Read [ /etc/named.conf ]
User : wdbbsgxf
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
lib /
python2.7 /
site-packages /
certbot /
_internal /
Delete
Unzip
Name
Size
Permission
Date
Action
cli
[ DIR ]
drwxr-xr-x
2022-02-05 00:54
display
[ DIR ]
drwxr-xr-x
2022-02-05 00:54
plugins
[ DIR ]
drwxr-xr-x
2022-02-05 00:54
__init__.py
184
B
-rw-r--r--
2021-01-05 21:07
__init__.pyc
349
B
-rw-r--r--
2021-10-08 10:38
__init__.pyo
349
B
-rw-r--r--
2021-10-08 10:38
account.py
14.5
KB
-rw-r--r--
2021-01-05 21:07
account.pyc
14.89
KB
-rw-r--r--
2021-10-08 10:38
account.pyo
14.89
KB
-rw-r--r--
2021-10-08 10:38
auth_handler.py
18.38
KB
-rw-r--r--
2021-01-05 21:07
auth_handler.pyc
17.21
KB
-rw-r--r--
2021-10-08 10:38
auth_handler.pyo
17.1
KB
-rw-r--r--
2021-10-08 10:38
cert_manager.py
15.59
KB
-rw-r--r--
2021-01-05 21:07
cert_manager.pyc
16.42
KB
-rw-r--r--
2021-10-08 10:38
cert_manager.pyo
16.42
KB
-rw-r--r--
2021-10-08 10:38
client.py
30.2
KB
-rw-r--r--
2021-01-05 21:07
client.pyc
26.95
KB
-rw-r--r--
2021-10-08 10:38
client.pyo
26.95
KB
-rw-r--r--
2021-10-08 10:38
configuration.py
5.75
KB
-rw-r--r--
2021-01-05 21:07
configuration.pyc
7.77
KB
-rw-r--r--
2021-10-08 10:38
configuration.pyo
7.77
KB
-rw-r--r--
2021-10-08 10:38
constants.py
6.37
KB
-rw-r--r--
2021-01-05 21:07
constants.pyc
5.02
KB
-rw-r--r--
2021-10-08 10:38
constants.pyo
5.02
KB
-rw-r--r--
2021-10-08 10:38
eff.py
4.56
KB
-rw-r--r--
2021-01-05 21:07
eff.pyc
5.2
KB
-rw-r--r--
2021-10-08 10:38
eff.pyo
5.2
KB
-rw-r--r--
2021-10-08 10:38
error_handler.py
7.05
KB
-rw-r--r--
2021-01-05 21:07
error_handler.pyc
6.59
KB
-rw-r--r--
2021-10-08 10:38
error_handler.pyo
6.59
KB
-rw-r--r--
2021-10-08 10:38
hooks.py
7.88
KB
-rw-r--r--
2021-01-05 21:07
hooks.pyc
9.28
KB
-rw-r--r--
2021-10-08 10:38
hooks.pyo
9.28
KB
-rw-r--r--
2021-10-08 10:38
lock.py
9.94
KB
-rw-r--r--
2021-01-05 21:07
lock.pyc
9.92
KB
-rw-r--r--
2021-10-08 10:38
lock.pyo
9.92
KB
-rw-r--r--
2021-10-08 10:38
log.py
13.43
KB
-rw-r--r--
2021-01-05 21:07
log.pyc
13.56
KB
-rw-r--r--
2021-10-08 10:38
log.pyo
13.45
KB
-rw-r--r--
2021-10-08 10:38
main.py
50.33
KB
-rw-r--r--
2021-01-05 21:07
main.pyc
43.83
KB
-rw-r--r--
2021-10-08 10:38
main.pyo
43.61
KB
-rw-r--r--
2021-10-08 10:38
renewal.py
22.29
KB
-rw-r--r--
2021-01-05 21:07
renewal.pyc
17.4
KB
-rw-r--r--
2021-10-08 10:38
renewal.pyo
17.4
KB
-rw-r--r--
2021-10-08 10:38
reporter.py
3.48
KB
-rw-r--r--
2021-01-05 21:07
reporter.pyc
3.75
KB
-rw-r--r--
2021-10-08 10:38
reporter.pyo
3.68
KB
-rw-r--r--
2021-10-08 10:38
snap_config.py
3.38
KB
-rw-r--r--
2021-01-05 21:07
snap_config.pyc
4.73
KB
-rw-r--r--
2021-10-08 10:38
snap_config.pyo
4.73
KB
-rw-r--r--
2021-10-08 10:38
storage.py
45.96
KB
-rw-r--r--
2021-01-05 21:07
storage.pyc
42.26
KB
-rw-r--r--
2021-10-08 10:38
storage.pyo
42.26
KB
-rw-r--r--
2021-10-08 10:38
updater.py
3.87
KB
-rw-r--r--
2021-01-05 21:07
updater.pyc
4.35
KB
-rw-r--r--
2021-10-08 10:38
updater.pyo
4.35
KB
-rw-r--r--
2021-10-08 10:38
Save
Rename
"""Module configuring Certbot in a snap environment""" import logging import socket from requests import Session from requests.adapters import HTTPAdapter from requests.exceptions import HTTPError from requests.exceptions import RequestException from acme.magic_typing import List from certbot.compat import os from certbot.errors import Error try: from urllib3.connection import HTTPConnection from urllib3.connectionpool import HTTPConnectionPool except ImportError: # Stub imports for oldest requirements, that will never be used in snaps. HTTPConnection = object HTTPConnectionPool = object _ARCH_TRIPLET_MAP = { 'arm64': 'aarch64-linux-gnu', 'armhf': 'arm-linux-gnueabihf', 'i386': 'i386-linux-gnu', 'ppc64el': 'powerpc64le-linux-gnu', 'powerpc': 'powerpc-linux-gnu', 'amd64': 'x86_64-linux-gnu', 's390x': 's390x-linux-gnu', } LOGGER = logging.getLogger(__name__) def prepare_env(cli_args): # type: (List[str]) -> List[str] """ Prepare runtime environment for a certbot execution in snap. :param list cli_args: List of command line arguments :return: Update list of command line arguments :rtype: list """ snap_arch = os.environ.get('SNAP_ARCH') if snap_arch not in _ARCH_TRIPLET_MAP: raise Error('Unrecognized value of SNAP_ARCH: {0}'.format(snap_arch)) os.environ['CERTBOT_AUGEAS_PATH'] = '{0}/usr/lib/{1}/libaugeas.so.0'.format( os.environ.get('SNAP'), _ARCH_TRIPLET_MAP[snap_arch]) with Session() as session: session.mount('http://snapd/', _SnapdAdapter()) try: response = session.get('http://snapd/v2/connections?snap=certbot&interface=content') response.raise_for_status() except RequestException as e: if isinstance(e, HTTPError) and e.response.status_code == 404: LOGGER.error('An error occurred while fetching Certbot snap plugins: ' 'your version of snapd is outdated.') LOGGER.error('Please run "sudo snap install core; sudo snap refresh core" ' 'in your terminal and try again.') else: LOGGER.error('An error occurred while fetching Certbot snap plugins: ' 'make sure the snapd service is running.') raise e data = response.json() connections = ['/snap/{0}/current/lib/python3.8/site-packages/'.format(item['slot']['snap']) for item in data.get('result', {}).get('established', []) if item.get('plug', {}).get('plug') == 'plugin' and item.get('plug-attrs', {}).get('content') == 'certbot-1'] os.environ['CERTBOT_PLUGIN_PATH'] = ':'.join(connections) cli_args.append('--preconfigured-renewal') return cli_args class _SnapdConnection(HTTPConnection): def __init__(self): super(_SnapdConnection, self).__init__("localhost") self.sock = None def connect(self): self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) self.sock.connect("/run/snapd.socket") class _SnapdConnectionPool(HTTPConnectionPool): def __init__(self): super(_SnapdConnectionPool, self).__init__("localhost") def _new_conn(self): return _SnapdConnection() class _SnapdAdapter(HTTPAdapter): def get_connection(self, url, proxies=None): return _SnapdConnectionPool()