Server IP : 209.38.156.173 / Your IP : 216.73.216.122 [ 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 : |
o 6��a�+ � @ s� d Z ddlZddlmZ ddlmZ ddlmZ ddlmZ ddlm Z ddlm Z dd lmZ dd lm Z ddlmZ ddlmZ dd lmZ ddlmZ dd lmZ ddlmZ e�e�ZG dd� deje j�ZdS )zManual authenticator plugin� N)�Dict)� challenges)�achallenges)�errors)� interfaces)�reverter)�util)�hooks)� cli_constants)�misc)�os)�ops)�commonc s� e Zd ZdZdZdZdZdZdZdZ dZ d Z� fd d�Ze dd � �Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zd#dd�Zdd � Zd!d"� Z� ZS )$� Authenticatorz�Manual authenticator This plugin allows the user to perform the domain validation challenge(s) themselves. This either be done manually by the user or through shell scripts provided to Certbot. z2Manual configuration or run your own shell scriptsTa� Authenticate through manual configuration or custom shell scripts. When using shell scripts, an authenticator script must be provided. The environment variables available to this script depend on the type of challenge. $CERTBOT_DOMAIN will always contain the domain being authenticated. For HTTP-01 and DNS-01, $CERTBOT_VALIDATION is the validation string, and $CERTBOT_TOKEN is the filename of the resource requested when performing an HTTP-01 challenge. An additional cleanup script can also be provided and can use the additional variable $CERTBOT_AUTH_OUTPUT which contains the stdout output from the auth script. For both authenticator and cleanup script, on HTTP-01 and DNS-01 challenges, $CERTBOT_REMAINING_CHALLENGES will be equal to the number of challenges that remain after the current one, and $CERTBOT_ALL_DOMAINS contains a comma-separated list of all domains that are challenged for the current certificate.zcPlease deploy a DNS TXT record under the name: {domain}. with the following value: {validation} a� Before continuing, verify the TXT record has been deployed. Depending on the DNS provider, this may take some time, from a few seconds to multiple minutes. You can check if it has finished deploying with aid of online tools, such as the Google Admin Toolbox: https://toolbox.googleapps.com/apps/dig/#TXT/{domain}. Look for one or more bolded line(s) below the line ';ANSWER'. It should show the value(s) you've just added. zuCreate a file containing just this data: {validation} And make it available on your web server at this URL: {uri} z� (This must be set up in addition to the previous challenges; do not remove, replace, or undo the previous challenge tasks yet.) z� (This must be set up in addition to the previous challenges; do not remove, replace, or undo the previous challenge tasks yet. Note that you might be asked to create multiple distinct TXT records with the same name. This is permitted by DNS standards.) c s@ t � j|i |�� t�| j�| _| j�� i | _d| _d| _d S )NF) �super�__init__r �Reverter�config�recovery_routine�env�subsequent_dns_challenge�subsequent_any_challenge)�self�args�kwargs�� __class__� �B/usr/lib/python3/dist-packages/certbot/_internal/plugins/manual.pyr [ s zAuthenticator.__init__c C s* |ddd� |ddd� t �|dd� d S )N� auth-hookz8Path or command to execute for the authentication script)�help�cleanup-hookz1Path or command to execute for the cleanup scriptzpublic-ip-logging-okr )r �add_deprecated_argument)�cls�addr r r �add_parser_argumentsc s ��z"Authenticator.add_parser_argumentsc C s4 | j jr| �d�st�d�| �d����| �� d S )Nr zdAn authentication script must be provided with --{0} when using the manual plugin non-interactively.)r �noninteractive_mode�confr �PluginError�format�option_name�_validate_hooks�r r r r �preparek s ��zAuthenticator.preparec C sP | j jr$dD ]}| �|�}|d ur#| �|�d td� � }t�||� qd S d S )N)r r! z-hook)r �validate_hooksr'