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 :  /lib/python3/dist-packages/certbot/display/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


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

Current File : /lib/python3/dist-packages/certbot/display/__pycache__/util.cpython-310.pyc
o

6��a�%�@sjdZddlZddlmZddlmZddlmZddlmZddlmZddlm	Z	ddl
Z
dd	lmZdd
lm
Z
ddlmZddlmZdd
lmZddlmZddlmZejZ	ejZ	dZdZ	dZ	deddfdd�Z		d6dedededededdfdd�Z		d7ded e	eeeeeffd!eed"eededeeeffd#d$�Z		d7ded!eed"eededeeeff
d%d&�Z 	(		d8ded)ed*ed!eed"eededefd+d,�Z!			d7ded-eed!eed"eededeeeeffd.d/�Z"		d7ded!eed"eededeeeff
d0d1�Z#d2d3�Z$Gd4d5�d5�Z%eee%ej&e'��ej&e'<dS)9a$Certbot display.

This module (`certbot.display.util`) or its companion `certbot.display.ops`
should be used whenever:

- Displaying status information to the user on the terminal
- Collecting information from the user via prompts

Other messages can use the `logging` module. See `log.py`.

�N)�
ModuleType)�cast)�List)�Optional)�Tuple)�Union)�FileDisplay)�NoninteractiveDisplay)�
SIDE_FRAME)�input_with_timeout)�separate_list_input)�summarize_domain_list)�obj�H�help�esc�msg�returncCst��j|dddd�dS)zMDisplay a basic status message.

    :param str msg: message to display

    F)�pause�decorate�wrapN�r�get_display�notification)r�r�6/usr/lib/python3/dist-packages/certbot/display/util.py�notify5srTF�messagerr�force_interactivercCst��j|||||d�dS)a�Displays a notification and waits for user acceptance.

    :param str message: Message to display
    :param bool pause: Whether or not the program should pause for the
        user's confirmation
    :param bool wrap: Whether or not the application should wrap text
    :param bool force_interactive: True if it's safe to prompt the user
        because it won't cause any workflow regressions
    :param bool decorate: Whether to surround the message with a
        decorated frame

    )rrrrNr)rrrrrrrrr>s
�r�choices�default�cli_flagcC�t��j|||||d�S)a	Display a menu.

    .. todo:: This doesn't enable the help label/button (I wasn't sold on
        any interface I came up with for this). It would be a nice feature.

    :param str message: title of menu
    :param choices: Menu lines, len must be > 0
    :type choices: list of tuples (tag, item) or
        list of descriptions (tags will be enumerated)
    :param default: default value to return (if one exists)
    :param str cli_flag: option used to set this value with the CLI
    :param bool force_interactive: True if it's safe to prompt the user
        because it won't cause any workflow regressions

    :returns: tuple of (`code`, `index`) where
        `code` - str display exit code
        `index` - int index of the user's selection

    :rtype: tuple

    �r r!r)rr�menu)rrr r!rrrrr$Ps�r$cC�t��j||||d�S)a�Accept input from the user.

    :param str message: message to display to the user
    :param default: default value to return (if one exists)
    :param str cli_flag: option used to set this value with the CLI
    :param bool force_interactive: True if it's safe to prompt the user
        because it won't cause any workflow regressions

    :returns: tuple of (`code`, `input`) where
        `code` - str display exit code
        `input` - str of the user's input
    :rtype: tuple

    r#)rr�input�rr r!rrrr�
input_textls�r(�Yes�No�	yes_label�no_labelcCst��j||||||d�S)anQuery the user with a yes/no question.

    Yes and No label must begin with different letters, and must contain at
    least one letter each.

    :param str message: question for the user
    :param str yes_label: Label of the "Yes" parameter
    :param str no_label: Label of the "No" parameter
    :param default: default value to return (if one exists)
    :param str cli_flag: option used to set this value with the CLI
    :param bool force_interactive: True if it's safe to prompt the user
        because it won't cause any workflow regressions

    :returns: True for "Yes", False for "No"
    :rtype: bool

    )r+r,r r!r)rr�yesno)rr+r,r r!rrrrr-�s�r-�tagscCr")aDisplay a checklist.

    :param str message: Message to display to user
    :param list tags: `str` tags to select, len(tags) > 0
    :param default: default value to return (if one exists)
    :param str cli_flag: option used to set this value with the CLI
    :param bool force_interactive: True if it's safe to prompt the user
        because it won't cause any workflow regressions

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

    r#)rr�	checklist)rr.r r!rrrrr/�s�r/cCr%)a�Display a directory selection screen.

    :param str message: prompt to give the user
    :param default: default value to return (if one exists)
    :param str cli_flag: option used to set this value with the CLI
    :param bool force_interactive: True if it's safe to prompt the user
        because it won't cause any workflow regressions

    :returns: tuple of the form (`code`, `string`) where
        `code` - display exit code
        `string` - input entered by the user

    r#)rr�directory_selectr'rrrr0�s�r0cCs8d�|�}|r|d�|�7}|dus|sJ|��dSdS)a0Verify that provided arguments is a valid display call.

    :param str prompt: prompt for the user
    :param default: default answer to prompt
    :param str cli_flag: command line option for setting an answer
        to this question
    :param bool force_interactive: if interactivity is forced

    z)Invalid display call for this prompt:
{0}z7
You can set an answer to this prompt with the {0} flagN)�format)�promptr r!rrrrr�assert_valid_call�s

�r3c@s8eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�ZdS)
�_DisplayUtilDeprecationModulez�
    Internal class delegating to a module, and displaying warnings when attributes
    related to deprecated attributes in the certbot.display.util module.
    cCs||jd<dS�N�_module)�__dict__)�self�modulerrr�__init__�sz&_DisplayUtilDeprecationModule.__init__cCs*|dvrtjd�|�tdd�t|j|�S)N)	rr	r
rrr
�WIDTH�HELP�ESCzT{0} attribute in certbot.display.util module is deprecated and will be removed soon.�)�
stacklevel)�warnings�warnr1�DeprecationWarning�getattrr6�r8�attrrrr�__getattr__�s�z)_DisplayUtilDeprecationModule.__getattr__cCst|j||�dS�N)�setattrr6)r8rE�valuerrr�__setattr__�sz)_DisplayUtilDeprecationModule.__setattr__cCst|j|�dSrG)�delattrr6rDrrr�__delattr__��z)_DisplayUtilDeprecationModule.__delattr__cCsdgt|j�Sr5)�dirr6)r8rrr�__dir__�rMz%_DisplayUtilDeprecationModule.__dir__N)	�__name__�
__module__�__qualname__�__doc__r:rFrJrLrOrrrrr4�sr4)TTFT)NNF)r)r*NNF)(rS�sys�typesr�typingrrrrrr@�certbot._internal.display.objrr	r
�certbot._internal.display.utilrrr
�certbot._internal.displayr�OK�CANCELr;r<r=�strr�boolr�intr$r(r-r/r0r3r4�modulesrPrrrr�<module>s�	���
� ����

���

�����
����
���

�

Anon7 - 2022
AnonSec Team