403Webshell
Server IP : 54.37.205.81  /  Your IP : 216.73.216.76
Web Server : nginx/1.22.1
System : Linux vps-249481fa 6.1.0-50-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.176-1 (2026-07-02) x86_64
User : debian ( 1000)
PHP Version : 8.2.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/certbot/plugins/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/certbot/plugins/__pycache__/util.cpython-311.pyc
�

E��c���dZddlZddlmZddlmZddlmZddlm	Z	ej
e��Zde
dee
fd	�Zd
e
defd�ZdS)zPlugin utilities.�N)�List)�util)�os)�STANDARD_BINARY_DIRS�path�returnc���tj�|��}g}|rF|�|��tj�|��\}}||dkrn|�F|S)a�Retrieves all possible path prefixes of a path, in descending order
    of length. For instance:

      * (Linux) `/a/b/c` returns `['/a/b/c', '/a/b', '/a', '/']`
      * (Windows) `C:\a\b\c` returns `['C:\a\b\c', 'C:\a\b', 'C:\a', 'C:']`

    :param str path: the path to break into prefixes

    :returns: all possible path prefixes of given path in descending order
    :rtype: `list` of `str`
    ���)rr�normpath�append�split)r�prefix�prefixes�_s    �6/usr/lib/python3/dist-packages/certbot/plugins/util.py�get_prefixesrsr���W�
�
�d�
#�
#�F��H�
����������G�M�M�&�)�)�	����X�b�\�!�!�����O��cmdc���tjd}g}tD]-}||vr'|tj|zz
}|�|���.t|��rHt�d|tj�|����|tjd<tj
|��rdSt|��rdnd}t�d|||��dS)z�Attempt to perform PATH surgery to find cmd

    Mitigates https://github.com/certbot/certbot/issues/1833

    :param str cmd: the command that is being searched for in the PATH

    :returns: True if the operation succeeded, False otherwise
    �PATHz6Can't find %s, attempting PATH mitigation by adding %sTz	 expanded�z*Failed to find executable %s in%s PATH: %sF)r�environr�pathsepr�any�logger�debug�joinr�
exe_exists)rr�added�d�expandeds     r�path_surgeryr"#s����:�f��D��E�
!�����D�=�=��B�J��N�"�D��L�L��O�O�O��
�5�z�z�"����M��"�*�/�/�%�0�0�	2�	2�	2�!��
�6����s�����t�!�%�j�j�0�{�{�b�H�
�L�L�=�s��4�!�!�!��5r)�__doc__�logging�typingr�certbotr�certbot.compatr�certbot.compat.miscr�	getLogger�__name__r�strr�boolr"�rr�<module>r.s���������������������������4�4�4�4�4�4�	��	�8�	$�	$���s��t�C�y�����.�c��d������r

Youez - 2016 - github.com/yon3zu
LinuXploit