403Webshell
Server IP : 35.236.43.222  /  Your IP : 216.73.216.143
Web Server : Apache
System : Linux order-form-vm-001 5.10.0-37-cloud-amd64 #1 SMP Debian 5.10.247-1 (2025-12-11) x86_64
User : deploy ( 1002)
PHP Version : 8.1.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/certbot/display/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/certbot/display/__pycache__/ops.cpython-39.pyc
a

�`/�@s�dZddlZddlZddlmZddlmZddlmZddlm	Z	ddl
mZe�e
�ZejjZd(d	d
�Zdd�Zd)d
d�Zd*dd�Zdd�Zdd�Zd+dd�Zd,dd�Zdd�Zdd�Zdd�Zd d!�Zd-d"d#�Zd$d%�Zd&d'�Z dS).z+Contains UI methods for LE user operations.�N)�errors)�
interfaces)�util)�osFTcCs�d}d}d}|r(|r"||7}d}q,d}nd}z(ttj�j|rD||n|dd�\}}Wn"tjyvd}t�|��Yn0|tjkr�|r�t�d��t�d	��t	�
|�r�|S|r�||}d}t|�}q,d
S)aJPrompt for valid email address.

    :param bool invalid: True if an invalid address was provided by the user
    :param bool optional: True if the user can use
        --register-unsafely-without-email to avoid providing an e-mail

    :returns: e-mail address
    :rtype: str

    :raises errors.Error: if the user cancels

    z-There seem to be problems with that address. zCEnter email address (used for urgent renewal and security notices)
a

If you really want to skip this, you can run the client with --register-unsafely-without-email but you will then be unable to receive notice about impending expiration or revocation of your certificates or problems with your Certbot installation that will lead to failure to renew.

FT��force_interactivezoYou should register before running non-interactively, or provide --agree-tos and --email <email_address> flags.zHAn e-mail address or --register-unsafely-without-email must be provided.z#An e-mail address must be provided.N)�z_utilr�IDisplay�inputrZMissingCommandlineFlag�display_util�OK�ErrorrZ
safe_email�bool)ZinvalidZoptionalZinvalid_prefix�msgZunsafe_suggestionZsuggest_unsafe�codeZemail�r�5/usr/lib/python3/dist-packages/certbot/display/ops.py�	get_emails:

�
�

rcCs>dd�|D�}ttj�jd|dd�\}}|tjkr:||SdS)zChoose an account.

    :param list accounts: Containing at least one
        :class:`~certbot._internal.account.Account`

    cSsg|]
}|j�qSr)Zslug)�.0Zaccrrr�
<listcomp>Q�z"choose_account.<locals>.<listcomp>zPlease choose an accountTrN)rrr	Zmenurr)Zaccounts�labelsr�indexrrr�choose_accountIs
�

rcCs0ttj�j||dd�\}}|tjkr,|r,|SgS)z�Display screen to let user pick one or multiple values from the provided
    list.

    :param list values: Values to select from

    :returns: List of selected values
    :rtype: list
    T)�tagsr)rrr	�	checklistrr)�values�questionr�itemsrrr�
choose_valuesYs	
�
rcCs\|durt�d�t�St|���}t|�}|s8td�St||�\}}|tjkrX|rX|SgS)aRDisplay screen to select domains to validate.

    :param installer: An installer object
    :type installer: :class:`certbot.interfaces.IInstaller`

    :param `str` question: Overriding default question to ask the user if asked
        to choose from domain names.

    :returns: List of selected names
    :rtype: `list` of `str`

    Nz$No installer, picking names manuallyz1No names were found in your configuration files. )	�logger�debug�_choose_names_manually�listZ
get_all_names�get_valid_domains�
_filter_namesrr)Z	installerr�domains�namesrrrr�choose_nameshs

�r(c	Cs@g}|D]2}z|�t�|��Wqtjy8YqYq0q|S)z�Helper method for choose_names that implements basic checks
     on domain names

    :param list domains: Domain names to validate
    :return: List of valid domains
    :rtype: list
    )�appendr�enforce_domain_sanityr�ConfigurationError)r&Z
valid_domains�domainrrrr$�sr$cCst|dd�d�S)z�Sort FQDNs by SLD (and if many, by their subdomains)

    :param list FQDNs: list of domain names

    :returns: Sorted list of domain names
    :rtype: list
    cSs|�d�ddd�dd�S)N�.����)�split)Zfqdnrrr�<lambda>�rz_sort_names.<locals>.<lambda>)�key)�sorted)ZFQDNsrrr�_sort_names�sr4cCsDt|�}|r|}nd}ttj�j||ddd�\}}|dd�|D�fS)aDetermine which names the user would like to select from a list.

    :param list names: domain names

    :returns: tuple of the form (`code`, `names`) where
        `code` - str display exit code
        `names` - list of names selected
    :rtype: tuple

    z1Which names would you like to activate HTTPS for?�	--domainsT)r�cli_flagrcSsg|]}t|��qSr)�str)r�srrrr�rz!_filter_names.<locals>.<listcomp>)r4rrr	r)r'Zoverride_questionZsorted_namesrrrrrr%�s
�
r%�c
Cs.ttj�j|dddd�\}}|tjk�r*i}d}zt�|�}Wn"tybg}d�t	j
�}Yn0t|�D]N\}}zt�
|�||<Wqltjy�}zt|�||<WYd}~qld}~00ql|r�d�t	j
�}|D]}|d	�t	j
|||�}q�|d
�t	j
�}|�r&ttj�j|dd�}	|	�r*t�Sn|SgS)z�Manually input names for those without an installer.

    :param str prompt_prefix: string to prepend to prompt for domains

    :returns: list of provided names
    :rtype: `list` of `str`

    zCPlease enter in your domain name(s) (comma and/or space separated) r5T)r6rr9ziInternationalized domain names are not presently supported.{0}{0}Would you like to re-enter the names?{0}Nz<One or more of the entered domain names was not valid:{0}{0}z{1}: {2}{0}z+{0}Would you like to re-enter the names?{0}r)rrr	r
rrZseparate_list_input�UnicodeEncodeError�formatr�linesep�	enumeraterr*rr+r7Zyesnor")
Z
prompt_prefixrZinput_Zinvalid_domainsZ
retry_messageZdomain_list�ir,�eZretryrrrr"�sX	
��
��
$������r"cCs"ttj�jd�t|��dd�dS)zsDisplay a box confirming the installation of HTTPS.

    :param list domains: domain names which were enabled

    z2Congratulations! You have successfully enabled {0}F��pauseN)rrr	�notificationr;�_gen_https_names�r&rrr�success_installation�s
��rEcCs&ttj�jd�t|�tj�dd�dS)z�Display a box confirming the renewal of an existing certificate.

    :param list domains: domain names which were renewed

    z�Your existing certificate has been successfully renewed, and the new certificate has been installed.{1}{1}The new certificate covers the following domains: {0}Fr@N)rrr	rBr;rCrr<rDrrr�success_renewal�s
��rFcCst�d�|��dS)z�Display a message confirming a certificate has been revoked.

    :param list cert_path: path to certificate which was revoked.

    zWCongratulations! You have successfully revoked the certificate that was located at {0}.N)rZnotifyr;)Z	cert_pathrrr�success_revocations
��rGcCslt|�dkrd�|d�St|�dkr2dj|d�St|�dkrhd�d�d	d
�|dd�D��d
|d�SdS)z�Returns a string of the https domains.

    Domains are formatted nicely with ``https://`` prepended to each.

    :param list domains: Each domain is a 'str'

    r/zhttps://{0}r�z%https://{dom[0]} and https://{dom[1]})�domz	{0}{1}{2}z, css|]}d|VqdS)z
https://%sNr)rrIrrr�	<genexpr>"rz#_gen_https_names.<locals>.<genexpr>Nr.z, and https://r9)�lenr;�joinrDrrrrCs�rCc
Ks�|dur\z||�WnFtjyZ}z,tjd||dd�td�|���WYd}~n
d}~00||fd|i|��\}}|tjkr�z||�||fWStjy�}z:tjd||dd�tj	�
tj�j
t|�dd�WYd}~q�d}~00q\||fSq\dS)	Nz>Encountered invalid default value "%s" when prompting for "%s"T)�exc_infozInvalid default "{0}"�defaultz/Validator rejected "%s" when prompting for "%s"Fr@)rr
r r!�AssertionErrorr;rr�zope�	component�
getUtilityrr	rBr7)�method�	validator�messagerN�kwargs�errorr�rawrrr�_get_validated)s.�$

�4rYcOs$ttj�tj�j|g|�Ri|��S)a
Like `~certbot.interfaces.IDisplay.input`, but with validation.

    :param callable validator: A method which will be called on the
        supplied input. If the method raises an `errors.Error`, its
        text will be displayed and the user will be re-prompted.
    :param list `*args`: Arguments to be passed to `~certbot.interfaces.IDisplay.input`.
    :param dict `**kwargs`: Arguments to be passed to `~certbot.interfaces.IDisplay.input`.
    :return: as `~certbot.interfaces.IDisplay.input`
    :rtype: tuple
    )rYrPrQrRrr	r
�rT�argsrVrrr�validated_inputDs���r\cOs$ttj�tj�j|g|�Ri|��S)a>Like `~certbot.interfaces.IDisplay.directory_select`, but with validation.

    :param callable validator: A method which will be called on the
        supplied input. If the method raises an `errors.Error`, its
        text will be displayed and the user will be re-prompted.
    :param list `*args`: Arguments to be passed to `~certbot.interfaces.IDisplay.directory_select`.
    :param dict `**kwargs`: Arguments to be passed to
        `~certbot.interfaces.IDisplay.directory_select`.
    :return: as `~certbot.interfaces.IDisplay.directory_select`
    :rtype: tuple
    )rYrPrQrRrr	Zdirectory_selectrZrrr�validated_directorySs���r])FT)N)N)N)r9)N)!�__doc__ZloggingZzope.componentrPZcertbotrrrZcertbot.compatrZcertbot.displayrZ	getLogger�__name__r rQrRrrrrr(r$r4r%r"rErFrGrCrYr\r]rrrr�<module>s0

7



6


Youez - 2016 - github.com/yon3zu
LinuXploit