AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3/dist-packages/certbot/_internal/plugins/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /usr/lib/python3/dist-packages/certbot/_internal/plugins/__pycache__/selection.cpython-310.pyc
o

6��ah4�@sdZddlZddlmZddlmZddlmZddlmZddlmZddl	m
Z
dd	lmZdd
l
mZe�e�Z	d)dd
�Z	d*dd�Z	d+dd�Zdd�Zdd�Zdd�Zgd�Zdd�Zdejde
jded eeejeejffd!d"�Z d#d$�Z!d%d&�Z"d'd(�Z#dS),z=Decide which plugins to use for authentication & installation�N)�Optional)�Tuple)�
configuration)�errors)�
interfaces)�disco)�os)�util�<How would you like to authenticate and install certificates?cCst||||tjtjf�S)zPick configurator plugin.)�pick_pluginr�
Authenticator�	Installer��config�default�plugins�question�r�E/usr/lib/python3/dist-packages/certbot/_internal/plugins/selection.py�pick_configurators
�r�+How would you like to install certificates?cC�t||||tjf�S)zPick installer plugin.)rrr
rrrr�pick_installers�r�4How would you like to authenticate with the ACME CA?cCr)zPick authentication plugin.)rrrrrrr�pick_authenticator"s�rcs�t|�\}��s
dS|��fdd��}|�|�|�tjf�}t|�dkr,t�d���|rAt	|�
��d}t�d|�|�|�St�d���)	aB
    Get an unprepared interfaces.Installer object.

    :param certbot.configuration.NamespaceConfig config: Configuration
    :param certbot._internal.plugins.disco.PluginsRegistry plugins:
        All plugins registered as entry points.

    :returns: Unprepared installer plugin or None
    :rtype: Plugin or None
    Nc�
|���S�N��
check_name��p_ep��req_instrr�<lambda>9�
z*get_unprepared_installer.<locals>.<lambda>�zfFound multiple installers with the name %s, Certbot is unable to determine which one to use. Skipping.rzSelecting plugin: %sz:Could not select or initialize the requested installer %s.)
�cli_plugin_requests�filter�init�verifyrr
�lenr�PluginSelectionError�list�values�logger�debug)rr�_�
installers�instrr!r�get_unprepared_installer*s&
��
�r3c	s��dur|��fdd��}n|jrt�d��|���|�}|�|�|�|�}|��|�	�}t
|�dkrNt�d|�t
t|���|�}|durJdS|��St
|�dkrkt|���d}t�d|�|jrgdS|��St�d	�dS)
a�Pick plugin.

    :param certbot.configuration.NamespaceConfig: Configuration
    :param str default: Plugin name supplied by user or ``None``.
    :param certbot._internal.plugins.disco.PluginsRegistry plugins:
        All plugins registered as entry points.
    :param str question: Question to be presented to the user in case
        multiple candidates are found.
    :param list ifaces: Interfaces that plugins must provide.

    :returns: Initialized plugin.
    :rtype: Plugin

    Ncrrrr�rrrr#Yr$zpick_plugin.<locals>.<lambda>aMissing command line flags. For non-interactive execution, you will need to specify a plugin on the command line.  Run with '--help plugins' to see a list of options, and see https://eff.org/letsencrypt-plugins for more detail on what the plugins do and how to use them.r%zMultiple candidate plugins: %srzSingle candidate plugin: %szNo candidate plugin)r'�noninteractive_moder�MissingCommandlineFlag�visible�ifacesr(r)�prepare�	availabler*r.r/�
choose_pluginr,r-�
misconfigured)	rrrrr8�filtered�verified�prepared�	plugin_eprr4rrHs2�


rcCs`dd�|D�}	tj||dd�\}}|tjkr-||}|jr+tjd�|���dd�n|SdSq)	z�Allow the user to choose their plugin.

    :param list prepared: List of `~.PluginEntryPoint`.
    :param str question: Question to be presented to the user.

    :returns: Plugin entry point chosen by the user.
    :rtype: `~.PluginEntryPoint`

    cSs g|]}|j|jrdnd�qS)z [Misconfigured]�)�description_with_namer<)�.0r@rrr�
<listcomp>�s
��z!choose_plugin.<locals>.<listcomp>T)�force_interactivezxThe selected plugin encountered an error while parsing your server configuration and cannot be used. The error was:

{0}F)�pauseN)�display_util�menu�OKr<�notification�formatr9)r?r�opts�code�indexr@rrrr;~s
�
��r;)�webroot�manual�
standalone�dns-cloudflare�dns-cloudxns�dns-digitalocean�dns-dnsimple�dns-dnsmadeeasy�
dns-gehirn�
dns-google�
dns-linode�
dns-luadns�	dns-nsone�dns-ovh�dns-rfc2136�dns-route53�dns-sakuracloudcCsB|r|�|�jnd|_|r|�|�jnd|_t�d|j|j�dS)zFUpdate the config entries to reflect the plugins we actually selected.Nz0Plugins selected: Authenticator %s, Installer %s)�	find_init�name�
authenticator�	installerr.�info)rr�authr2rrr�record_chosen_plugins�s
�rfrr�verb�returncCs0t|�\}}d}|dkrd}|dkr0d}}ddlm}|tvr/|s/d�|tj|�}	t�|	��nd	}}|d
kr;d}n|dvrJd}|j	rJt
�d|�d}
}|dkr_||kr_t|||�}
}n|sc|rjt
||||�}|rrt|||�}
t
�d
|
|�|r�|s�td||�|r�|
s�td||�t|||
|�||
fS)a<
    Figure out which configurator we're going to use, modifies
    config.authenticator and config.installer strings to reflect that choice if
    necessary.

    :raises errors.PluginSelectionError if there was a problem

    :returns: tuple of (`Installer` or None, `Authenticator` or None)
    :rtype: tuple
    N�enhancezMWhich installer would you like to use to configure the selected enhancements?�runTr��cli_commandz�With the {0} plugin, you probably want to use the "certonly" command, eg:{1}{1}    {2} certonly --{0}{1}{1}(Alternatively, add a --installer flag. See https://eff.org/letsencrypt-plugins{1} and "--help plugins" for more information.)F�certonly)�installrizRSpecifying an authenticator doesn't make sense when running Certbot with verb "%s"z*Selected authenticator %s and installer %srcrb)r&�certbot._internal.clirl�noninstaller_pluginsrKr�lineseprr6rbr.�warningrrrr/�diagnose_configurator_problemrf)rrrg�req_authr"�installer_question�	need_inst�	need_authrl�msgrbrcrrr�choose_configurator_plugins�sL��
��rycCs6|s|S|r||krd}t�|�t|�t|����|S)z�
    Setting configurators multiple ways is okay, as long as they all agree
    :param str previously: previously identified request for the installer/authenticator
    :param str requested: the request currently being processed
    zIToo many flags setting configurators/installers/authenticators {0} -> {1})rr+rK�repr)�
previously�nowrxrrr�set_configurator�sr}cCs||j}}t||j�}t||j�}|jrt|d�}t|d�}|jr+t|d�}t|d�}|jr3t|d�}|jr;t|d�}|jrCt|d�}|j	rKt|d�}|j
rSt|d�}|jr[t|d�}|jrct|d	�}|j
rkt|d
�}|jrst|d�}|jr{t|d�}|jr�t|d
�}|jr�t|d�}|jr�t|d�}|jr�t|d�}|jr�t|d�}|jr�t|d�}|jr�t|d�}t�d||�||fS)z�
    Figure out which plugins the user requested with CLI and config options

    :returns: (requested authenticator string or None, requested installer string or None)
    :rtype: tuple
    �nginx�apacherQrOrPrRrSrTrUrVrWrXrYrZr[r\r]r^r_z+Requested authenticator %s and installer %s)�configuratorr}rcrbr~rrQrOrP�dns_cloudflare�dns_cloudxns�dns_digitalocean�dns_dnsimple�dns_dnsmadeeasy�
dns_gehirn�
dns_google�
dns_linode�
dns_luadns�	dns_nsone�dns_ovh�dns_rfc2136�dns_route53�dns_sakuracloudr.r/)rr"rtrrrr&�sZ





















r&cCs`|r||vrd�|�}nd�|||j�}n|dkr&ddlm}d�|�}nd�|�}t�|��)a>
    Raise the most helpful error message about a plugin being unavailable

    :param str cfg_type: either "installer" or "authenticator"
    :param str requested: the plugin that was requested
    :param .PluginsRegistry plugins: available plugins

    :raises error.PluginSelectionError: if there was a problem
    z8The requested {0} plugin does not appear to be installedzkThe {0} plugin is not working; there may be problems with your existing configuration.
The error was: {1!r}rcrrkz�Certbot doesn't know how to automatically configure the web server on this system. However, it can still get a certificate for you. Please run "{0} certonly" to do so. You'll need to manually configure your web server to use the resulting certificate.z/{0} could not be determined or is not installed)rK�problemrorlrr+)�cfg_type�	requestedrrxrlrrrrs1s��

rs)r
)r)r)$�__doc__�logging�typingrr�certbotrrr�certbot._internal.pluginsr�certbot.compatr�certbot.displayr	rG�	getLogger�__name__r.rrrr3rr;rprf�NamespaceConfig�PluginsRegistry�strr
rryr}r&rsrrrr�<module>sD

�
�
�6��
�
�B7

Anon7 - 2022
AnonSec Team