403Webshell
Server IP : 178.105.222.151  /  Your IP : 216.73.216.38
Web Server : nginx/1.28.3
System : Linux MNK 7.0.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 22 16:06:43 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.5.4
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python3/dist-packages/certbot/compat/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/certbot/compat/__pycache__/misc.cpython-314.pyc
+
�K�g$��f�Rt^RIHt^RIt^RIt^RIt^RIt^RIHt^RIH	t	^RI
Ht^RIH
t
^RIHt^RIHt^R	IHt^R
IHtRt]P2!]4t]'d.R"OM.tR
RltRRltRRltRRRRRR/t RRRRRR/t!RRlt"RRlt#R#R R!llt$R# ]dRtLci;i)$zk
This compat module handles various platform specific calls that do not fall into one
particular category.
)�absolute_importN)�Optional)�Tuple)�errors)�os)�error)�shell)�GetStdHandle)�STD_OUTPUT_HANDLEFTc��V^8�dQhRR/#���returnN�)�formats"�5/usr/lib/python3/dist-packages/certbot/compat/misc.py�__annotate__r!s��`�`�T�`�c��\'g3\P!4^8Xd\P!R4hR#R#)z�
On Windows, raise if current shell does not have the administrative rights.
Do nothing on Linux.

:raises .errors.Error: If the current shell does not have administrative rights on Windows.
zAError, certbot must be run on a shell with administrative rights.N)�
POSIX_MODE�
shellwin32�
IsUserAnAdminr�Errorrrr�+raise_for_non_administrative_windows_rightsr!s0���:�*�2�2�4��9��l�l�^�_�_�:�:rc��V^8�dQhRR/#rr)rs"rrr,s��B�B��Brc��\'dR#^p\\4pV'd)VPVP	4V,4R#R# \
d\PRRR7R#i;i)zJ
On Windows, ensure that Console Virtual Terminal Sequences are enabled.

NzFailed to set console modeT)�exc_info)rr	r
�SetConsoleMode�GetConsoleMode�
pywinerror�logger�debug)�"ENABLE_VIRTUAL_TERMINAL_PROCESSING�hs  r�prepare_virtual_consoler$,sl��
�z��*0�&�B��*�+���
���Q�-�-�/�2T�T�U�
���B����1�D��A�B�s�=A�"A9�8A9c�R�V^8�dQhR\R\\,R\/#)r
�timeout�promptr)�floatr�str)rs"rrr@s%��$�$�5�$�(�3�-�$�C�$rc�f�\P!\P...V4wppV'g8\P!RPV'dV44hR44hV^,P
4# \d"\PP
4u#i;i)a
Read user input to return the first line entered, or raise after specified timeout.

:param float timeout: The timeout in seconds given to the user.
:param str prompt: The prompt message to display to the user.

:returns: The first line entered by the user.
:rtype: str

z,Timed out waiting for answer to prompt '{0}'�)�select�sys�stdinrrr�readline�OSError)r&r'�rlist�_s&&  r�readline_with_timeoutr3@s���$��m�m�S�Y�Y�K��R��A���q�!���,�,�>�E�E�PV�f�_�a�
a�\^�_�a�
a��Q�x� � �"�"���$��y�y�!�!�#�#�
$�s�3B�"B�*B�)B0�/B0�configz
C:\Certbot�workzC:\Certbot\lib�logszC:\Certbot\logz/etc/letsencryptz/var/lib/letsencryptz/var/log/letsencryptc�0�V^8�dQhR\R\/#)r
�folder_typer�r))rs"rrris��0�0�C�0�C�0rc�`�\PR8wd\V,#\V,#)z�
Return the relevant default folder for the current OS

:param str folder_type: The type of folder to retrieve (config, work or logs)

:returns: The relevant default folder.
:rtype: str

�nt)r�name�LINUX_DEFAULT_FOLDERS�WINDOWS_DEFAULT_FOLDERS)r8s&r�get_default_folderr?is%��
�w�w�$��$�[�1�1�"�;�/�/rc�0�V^8�dQhR\R\/#)r
�pathrr9)rs"rrrzs��
*�
*��
*��
*rc��\PR8wdV#\PPV4wrWP	RR4,#)z�
Replace unsupported characters in path for current OS by underscores.
:param str path: the path to normalize
:return: the normalized path
:rtype: str
r;�:r2)rr<rA�
splitdrive�replace)rA�drive�tails&  r�.underscores_for_unsupported_characters_in_pathrHzs@��
�w�w�$�����'�'�$�$�T�*�K�E��<�<��S�)�)�)rc��V^8�dQhR\R\R\\,R\\\\3,/#)r
�cmd_name�	shell_cmd�envr)r)r�dictr�int)rs"rrr�s9��%�%�S�%�S�%� (���%�:?��S�#�
�:N�%rc
�~�\PRW4\'d;\P!VR\P
\P
RRVR7pM=RRV.p\P!V\P
\P
RRVR7pVPVPreVPWe3#)a�
Run a command:
    - on Linux command will be run by the standard shell selected with
      subprocess.run(shell=True)
    - on Windows command will be run in a Powershell shell

This function returns the exit code, and does not log the result and output
of the command.

:param str cmd_name: the user facing name of the hook being run
:param str shell_cmd: shell command to execute
:param dict env: environ to pass into subprocess.run

:returns: `tuple` (`int` returncode, `str` stderr, `str` stdout)
zRunning %s command: %sTF)r�stdout�stderr�universal_newlines�checkrLzpowershell.exez-Command)rPrQrRrSrL)	r �infor�
subprocess�run�PIPErPrQ�
returncode)rJrKrL�proc�line�out�errs&&&    r�execute_command_statusr]�s���"�K�K�(�(�>��z��~�~�i�t�J�O�O�%/�_�_��$)�s�4��!�*�i�8���~�~�d�:�?�?�:�?�?�15�U��M��
�{�{�D�K�K���?�?�C�$�$r)z	/usr/sbinz/usr/local/binz/usr/local/sbin)N)%�__doc__�
__future__r�loggingr,rUr-�typingrr�certbotr�certbot.compatr�
pywintypesrr�win32com.shellrr�win32consoler	r
r�ImportError�	getLogger�__name__r �STANDARD_BINARY_DIRSrr$r3r>r=r?rHr]rrr�<module>rks����'��
��
������.�2�)�.��J�

�	�	�8�	$��NX�I�]_��`�B�($�<
�m�
��
����
� �
�"�
�"���0�"
*� %�%��g���J��s�B$�$	B0�/B0

Youez - 2016 - github.com/yon3zu
LinuXploit