403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.202
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python312/Lib/site-packages/pip/_internal/utils/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python312/Lib/site-packages/pip/_internal/utils/__pycache__/unpacking.cpython-312.pyc
�

T8�h�.����dZddlmZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZddl	mZddl
mZddlmZmZmZmZddlmZej,e�ZeezZ	ddlZeez
Z	ddlZeez
Zdd�Zdd�Zdd
�Z dd�Z!dd�Z"dd�Z#dd�Z$ddd�Z%dd�Z&										dd�Z'	d 							d!d�Z(y#e$rej9d	�Y�cwxYw#e$rej9d
�Y�uwxYw)"zUtilities related archives.�)�annotationsN)�Iterable)�ZipInfo)�InstallationError)�BZ2_EXTENSIONS�TAR_EXTENSIONS�
XZ_EXTENSIONS�ZIP_EXTENSIONS)�
ensure_dirzbz2 module is not availablezlzma module is not availablec�Z�tjd�}tj|�|S)zBGet the current umask which involves having to set it temporarily.r)�os�umask)�masks �?C:\Python312\Lib\site-packages\pip/_internal/utils/unpacking.py�
current_umaskr-s��
�8�8�A�;�D��H�H�T�N��K�c��|jd�jd�}d|vr=d|vr#|jd�|jd�ksd|vr|jdd�Sd|vr|jdd�S|dgS)N�/�\��)�lstrip�find�split��paths r�split_leading_dirr4sz���;�;�s��"�"�4�(�D�
�d�{�	
���$�)�)�C�.�4�9�9�T�?�:�t�4�?O��z�z�#�q�!�!�	
����z�z�$��"�"��b�z�rc�R�d}|D] }t|�\}}|sy|�|}�||k7s� yy)zyReturns true if all the paths have the same leading path name
    (i.e., everything is in one subdirectory in an archive)NFT)r)�paths�
common_prefixr�prefix�rests     r�has_leading_dirr#@sB���M���(��.������
�
"�"�M�
�}�
$���rc���tjj|�}tjj|�}tjj||g�}||k(S)zL
    Return true if the absolute path of target is within the directory
    )r
r�abspath�commonprefix)�	directory�target�
abs_directory�
abs_targetr!s     r�is_within_directoryr+OsL���G�G�O�O�I�.�M�������(�J�
�W�W�
!�
!�=�*�"=�
>�F��]�"�"rc�$�dt�zdzS)Ni��I)r�rr�!_get_default_mode_plus_executabler/Zs���M�O�#�#�e�+�+rc�@�tj|t��y)zx
    Make file present at path have execute for user/group/world
    (chmod +x) is no-op on windows per python docs
    N)r
�chmodr/rs r�2set_extracted_file_to_default_mode_plus_executabler2^s��
�H�H�T�4�6�7rc�r�|jdz	}t|xrtj|�xr|dz�S)N�r-)�
external_attr�bool�stat�S_ISREG)�info�modes  r�zip_item_is_executabler;fs6������#�D���<����d�+�<��u��=�=rc��t|�t|d�}	tj|d��}t	|j��xr|}|j
�D�]}|j}|}|rt|�d}tjj||�}tjj|�}	t||�sd}
t|
j|||���|j!d�rt|���t|	�|j|�}	t|d�5}t#j$||�ddd�|j'�t)|�s��
t+|���	|j'�y#1swY�FxYw#|j'�t)|�rt+|�wwxYw#|j'�wxYw)	a�
    Unzip the file (with path `filename`) to the destination `location`.  All
    files are written based on system defaults and umask (i.e. permissions are
    not preserved), except that regular file members with any execute
    permissions (user, group, or world) have "chmod +x" applied after being
    written. Note that for windows, any execute changes using os.chmod are
    no-ops per the python docs.
    �rbT)�
allowZip64rzQThe zip file ({}) has a file ({}) trying to install outside target directory ({}))rr�wbN)r�open�zipfile�ZipFiler#�namelist�infolist�filenamerr
r�join�dirnamer+r�format�endswith�shutil�copyfileobj�closer;r2)
rE�location�flatten�zipfp�zip�leadingr9�name�fn�dir�message�fp�destfps
             r�
unzip_filerXmsp���x����4� �E� ��o�o�e��5��!�#�,�,�.�1�=�g���L�L�N�D��=�=�D��B��&�t�,�Q�/�������h��+�B��'�'�/�/�"�%�C�&�x��4�4��(����x��X�(N�O�O��{�{�;�'��2���3���X�X�d�^��O��b�$��6��*�*�2�v�6�(��H�H�J�-�d�3�J�2�N�7#�:	���
�(����H�H�J�-�d�3�J�2�N�4��	���
�sB�DG�"F�.F
�F�
G�*G�
F	�F�)F?�?G�Gc������t���j�jd�s�j�jd�rd}n��j�jt�rd}n`�j�jt�rd}n:�j�jd�rd}nt
j
d��d	}tj�|d
��}	t|j�D�cgc]}|j��c}�}	tj�t��|rj|j�D]W}t|j�\}}||_|j�s�3t|j �\}}	||k(s�Q|	|_�Yd����fd�}
|j#�|
�
�|j)�ycc}w#t$$rt'��||�Y�/wxYw#|j)�wxYw)a�
    Untar the file (with path `filename`) to the destination `location`.
    All files are written based on system defaults and umask (i.e. permissions
    are not preserved), except that regular file members with any execute
    permissions (user, group, or world) have "chmod +x" applied on top of the
    default.  Note that for windows, any execute changes using os.chmod are
    no-ops per the python docs.
    z.gzz.tgzzr:gzzr:bz2zr:xzz.tar�rz-Cannot determine compression type for file %szr:*zutf-8)�encodingc�|��|j}		�|��}|j�r|dzr	�|_|Sd|_|S#tj$r0tjdddvrtj
|��}n�Y�iwxYw#tj$r"}d}t|j�|���d}~wwxYw)N�>�r]�	��r]�
��r]��z%Invalid member in the tar file {}: {}r-)
r:�tarfile�LinkOutsideDestinationError�sys�version_info�
tar_filter�TarErrorrrH�isfile)	�memberr�	orig_mode�excrU�data_filter�default_mode_plus_executablerErMs	     ����r�
pip_filterzuntar_file.<locals>.pip_filter�s����"�K�K�	��"�!,�V�X�!>��2�=�=�?�y�5�'8�">�F�K��
�#'�F�K��
��A#�>�>�
"��+�+�B�Q�/�4��&-�%7�%7���%I�F�!�#�
"���'�'�	�E�G�,����$������		�s0�	A�AB�B�B�B�B;�B6�6B;)�filterN)rn�tarfile.TarInfor�str�returnru)r�lowerrIrr	�logger�warningrgr@r#�
getmembersrRrqr/r�islnk�linkname�
extractall�AttributeError�_untar_without_filterrL)
rErMr:�tarrnrQ�	name_lead�	name_rest�lnk_lead�lnk_restrsrqrrs
``         @@r�
untar_filer��s�����x���~�~�� � ��'�8�>�>�+;�+D�+D�V�+L���	���	�	"�	"�>�	2���	���	�	"�	"�=�	1���	���	�	"�	"�6�	*������;��	
���
�,�,�x���
8�C�C�!�S�^�^�=M�"N�=M�6�6�;�;�=M�"N�O��
:	8�!�-�-�K�,M�+N�(��"�n�n�.�F�+<�V�[�[�+I�(�I�y�"+�F�K��|�|�~�->�v���-O�*��(�#�y�0�.6�F�O�
/�%
�%
�N
�N�N�8�J�N�7�	�	�	���E#O���	D�!�(�H�c�7�C�	D��v	�	�	��sO�0G7�G�G7�"G�2AG7�G7�%G7�G7�G4�1G7�3G4�4G7�7H	c���|j�D�]P}|j}|rt|�d}tjj||�}t
||�sd}t|j|||���|j�rt|���|j�r	|j||���	|j!|�}	ttjj'|��|	�J�t)|d�5}
t+j,|	|
�ddd�|	j/�|j1||�|j2dzs��Ft5|���Sy#t$r-}tjd||j|�Yd}~���d}~wwxYw#t"t$f$r-}tjd||j|�Yd}~���d}~wwxYw#1swY��xYw)z/Fallback for Python without tarfile.data_filterrzQThe tar file ({}) has a file ({}) trying to install outside target directory ({})z/In the tar file %s the member %s is invalid: %sNr?r-)r{rRrr
rrFr+rrH�isdirr�issym�_extract_member�	Exceptionryrz�extractfile�KeyErrorrrGr@rJrKrL�utimer:r2)rErMr�rQrnrSrrUrprVrWs           rr�r��s����.�.�"��
�[�[���"�2�&�q�)�B��w�w�|�|�H�b�)��"�8�T�2�0�
�$�G�N�N�8�T�8�$L�M�M��<�<�>��t��
�\�\�^�
��#�#�F�D�1�
��_�_�V�,��
�r�w�w���t�,�-��>�!�>��d�D�!�V��"�"�2�v�.�"��H�H�J��I�I�f�d�#��{�{�U�"�B�4�H�a#�� �	
����E���K�K��	���	
���n�-�	
����E���K�K��	���	
��"�!�s<�(E&�<F�G�&	F�/"F�F�G�."G�G�G'	c���tjj|�}|dk(s8|j�j	t
�st
j|�rt|||j	d���y|dk(sFtj|�s1|j�j	ttztz�r
t||�ytj!d|||�t#d|����)Nzapplication/zipz.whl)rNzapplication/x-gzipzZCannot unpack file %s (downloaded from %s, content-type: %s); cannot detect archive formatz#Cannot determine archive format of )r
r�realpathrxrIr
rA�
is_zipfilerXrg�
is_tarfilerrr	r�ry�criticalr)rErM�content_types   r�unpack_filer�5s���
�w�w����)�H��)�)��>�>��$�$�^�4����h�'��8�X�8�3D�3D�V�3L�/L�M��,�,����h�'��>�>��$�$�^�n�%D�}�%T�U��8�X�&�	���
+����	
� �"E�h�Z� P�Q�Qr)rw�int)rrvrwz	list[str])rz
Iterable[str]rwr6)r'rvr(rvrwr6)rrvrw�None)r9rrwr6)T)rErvrMrvrNr6rwr�)rErvrMrvrwr�)
rErvrMrvr�ztarfile.TarFilerQr6rwr�)N)rErvrMrvr�z
str | Nonerwr�))�__doc__�
__future__r�loggingr
rJr7rirgrA�collections.abcrr�pip._internal.exceptionsr�pip._internal.utils.filetypesrrr	r
�pip._internal.utils.miscr�	getLogger�__name__ry�SUPPORTED_EXTENSIONS�bz2�ImportError�debug�lzmarrr#r+r/r2r;rXr�r�r�r.rr�<module>r�sV��!�"��	�
��
���$��6���0�	��	�	�8�	$��&��6��0���N�*��1���M�)��
�	��#�,�8�>�+�\]�@7I��7I��7I�
�7I��	7I�

�7I�z $�R��R��R��R�
�	R��i�0�
�L�L�.�/�0���1�
�L�L�/�0�1�s$�!	B5�+	C�5C�
C�C*�)C*

Youez - 2016 - github.com/yon3zu
LinuXploit