|
Server : Apache/2.4.41 (Ubuntu) System : Linux vmi1525618.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64 User : www-data ( 33) PHP Version : 8.2.12 Disable Function : NONE Directory : /lib/python3/dist-packages/certbot/__pycache__/ |
Upload File : |
U
�]M � @ s* d Z ddlmZ ddlZddlZddlZddlZddlZddl Z ddl
Z
ddlZddl
Zddl
mZ ddlmZ ddlmZmZmZ ddlZddlm mZ ddlm mZ ddlmZ ddlmZ dd lmZ dd
lm Z ddlmZ ddlm!Z! ddl"m#Z# ddl$m!Z% dd
l&m'Z( e�)e*�Z+da,dZ-de#j.k�rLe#j/�0e#j.d �Z-e#j/�1ddd�Z2e#j/�3e#j/�1e#j4dddd��Z5e2ej6d k�s�ej6d �7e5��r�e-Z8ndZ8d�9e8�Z:dZ;dZ<dZ=e>d�Z?e>d�Z@e>d�e>d�e>d�e>d �d!�ZAd"d#� ZBG d$d%� d%eC�ZDd&d'� ZEdeE_Fd(d)� ZGd*d+� ZHd,d-� ZId�d/d0�ZJd1d2� ZKd�d4d5�ZLG d6d7� d7eC�ZMG d8d9� d9ejN�ZOd:d;d<e:�Pd=d>�d?d@�fdAdBdCdDdE�fdFdGdHdIdE�fdJdKdKdLdE�fdMdNdOdPdE�fdQdRdSdTdE�fdUdVdWdXdE�fdYdZd[d\dE�fd]d^d_d`dE�fdadbdcdddE�fdedfdgdhdE�fdidjdkdldE�fdmdndodpdE�fdqdrds�9e#j/�1eKdt�du��dvdE�fdwdxdydzdE�fgZQeReQ�ZSG d{d|� d|eC�ZTd}d~� ZUd�dd��ZVd�d�� ZWG d�d�� d�eX�ZYd�d�� ZZd�d�� Z[G d�d�� d�ej\�Z]G d�d�� d�ej\�Z^d�d�� Z_G d�d�� d�ej\�Z`d�d�� Zad�d�� ZbG d�d�� d�ej\�ZcG d�d�� d�ej\�Zdd�d�� ZedS )�z2Certbot command line argument & config processing.� )�print_functionN)�
interfaces)�
challenges)�Any�Dict�Optional)� constants)�crypto_util)�errors)�hooks)�util)�os)�discozletsencrypt-autoZCERTBOT_AUTOz.localZshareZletsencryptZoptzeff.org�certbot�venvz�
{0} [SUBCOMMAND] [options] [-d DOMAIN] [-d DOMAIN] ...
Certbot can obtain and install HTTPS/TLS/SSL certificates. By default,
it will attempt to use a webserver both for obtaining and installing the
certificate. a� The most common SUBCOMMANDS and flags are:
obtain, install, and renew certificates:
(default) run Obtain & install a certificate in your current webserver
certonly Obtain or renew a certificate, but do not install it
renew Renew all previously obtained certificates that are near expiry
enhance Add security enhancements to your existing configuration
-d DOMAINS Comma-separated list of domains to obtain a certificate for
%s
--standalone Run a standalone webserver for authentication
%s
--webroot Place files in a server's webroot folder for authentication
--manual Obtain certificates interactively, or using shell script hooks
-n Run non-interactively
--test-cert Obtain a test certificate from a staging server
--dry-run Test "renew" or "certonly" without saving any certificates to disk
manage certificates:
certificates Display information about certificates you have from Certbot
revoke Revoke a certificate (supply --cert-path or --cert-name)
delete Delete a certificate
manage your account:
register Create an ACME account
unregister Deactivate an ACME account
update_account Update an ACME account
--agree-tos Agree to the ACME server's Subscriber Agreement
-m EMAIL Email address for important account notifications
a�
More detailed help:
-h, --help [TOPIC] print this message, or detailed help on a topic;
the available TOPICS are:
all, automation, commands, paths, security, testing, or any of the
subcommands or plugins (certonly, renew, install, register, nginx,
apache, standalone, webroot, etc.)
-h all print a detailed help page including all topics
--version print the version number
)�const�nargs�type)�help�version)Zstore_const�
store_true�store_false�append_const�count)�server)�deploy_hook)�dry_run�staging)Zwebroot_path)�account�
renew_hookr Zwebroot_mapc C sF t | tj�r| f} t |tj�r$|f}| D ]}t�|t� ��|� q(dS )a� Registers config option interaction to be checked by set_by_cli.
This function can be called by during the __init__ or
add_parser_arguments methods of plugins to register interactions
between config options.
:param modified: config options that can be modified by modifiers
:type modified: iterable or str (string_types)
:param modifiers: config options that modify modified
:type modifiers: iterable or str (string_types)
N)�
isinstance�six�string_types�
VAR_MODIFIERS�
setdefault�set�update)ZmodifiedZ modifiers�var� r( �-/usr/lib/python3/dist-packages/certbot/cli.py�report_config_interaction� s
r* c @ s0 e Zd ZdZdd� Zdd� Zdd� Zdd � Zd
S )�_DefaultzAA class to use as a default to detect if a value is set by a userc C s dS )NFr( ��selfr( r( r) �__bool__� s z_Default.__bool__c C s
t |t�S �N)r r+ )r- �otherr( r( r) �__eq__� s z_Default.__eq__c C s t t�S r/ )�idr+ r, r( r( r) �__hash__� s z_Default.__hash__c C s | � � S r/ )r. r, r( r( r) �__nonzero__� s z_Default.__nonzero__N)�__name__�
__module__�__qualname__�__doc__r. r1 r3 r4 r( r( r( r) r+ � s
r+ c C s� t j}|dkrTtdk rTtj�� }tjtjg }t||dd� }t _t �
|�\|_|_t
t|| �t�s|t�d| t|| �� dS t�| g �D ](}t |�r�t�d| t�| g �� dS q�dS )z�
Return True if a particular config variable has been set by the user
(CLI or config file) including if the user explicitly set it to the
default. Returns False if the variable was assigned a default value.
NT)�detect_defaultszVar %s=%s (set by user).F)�
set_by_cli�detector�helpful_parser�
plugins_discoZPluginsRegistryZfind_all�args�verb�prepare_and_parse_args�plugin_selectionZcli_plugin_requests�
authenticator� installerr �getattrr+ �logger�debugr# �get)r'