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B%$gtЏ򤵍zHNuЯ-'40;_3 !01"@AQa2Pq#3BR?ʩcaen^8F<7;EA{EÖ1U/#d1an.1ě0ʾRh|RAo3m3 % 28Q yφHTo7lW>#i`qca m,B-j݋'mR1Ήt>Vps0IbIC.1Rea]H64B>o]($Bma!=?B KǾ+Ծ"nK*+[T#{EJSQs5:U\wĐf3܆&)IԆwE TlrTf6Q|Rh:[K zc֧GC%\_a84HcObiؖV7H )*ģK~Xhչ04?0 E<}3#u? |gS6ꊤ|I#Hڛ աwX97Ŀ%SLy6č|Fa 8b$sקhb9RAu7˨pČ_\*w묦F 4D~f|("mNKiS>$d7SlA/²SL|6N}S˯g]6; #. 403WebShell
403Webshell
Server IP : 45.32.152.128  /  Your IP : 216.73.216.91
Web Server : nginx/1.24.0
System : Linux stage-vultr 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : forge ( 1000)
PHP Version : 8.2.14
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/1395/root/usr/lib/python3.8/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/1395/root/usr/lib/python3.8/__pycache__/shutil.cpython-38.pyc
U

���g��@s�dZddlZddlZddlZddlZddlZddlZzddlZ[dZWne	k
r^dZYnXzddl
Z
[
dZWne	k
r�dZYnXzddlZ[dZ
Wne	k
r�dZ
YnXzddlmZWne	k
r�dZYnXzddlmZWne	k
�rdZYnXejdkZdZZejdk�r6ddlZne�rDddlZe�rNd	nd
Zeed��ohej�d�ae�oxeed
�ZdZdddddddddddddddddd d!d"d#d$d%d&d'gZGd(d�de�ZGd)d'�d'e�Z Gd*d�de�Z!Gd+d�de�Z"Gd,d-�d-e�Z#Gd.d/�d/e$�Z%Gd0d1�d1e$�Z&d2d3�Z'd4d5�Z(efd6d7�Z)d�d8d�Z*d9d:�Z+d;d<�Z,d=d>�Z-dd?�d@d�Z.dd?�dAd�Z/eedB��r�dd?�dCdD�Z0ndEdD�Z0dd?�dFd�Z1dd?�dGd�Z2dd?�dHd�Z3dId#�Z4d�dJdK�Z5dde3ddfdLd�Z6eej7dM��rdNdO�Z8dPdQ�Z9ndRdO�Z8dSdQ�Z9dTdU�Z:dVdW�Z;ej<ejej=ej>hej?k�ofej@ejAk�ofejejBkZCd�dXd�ZDeCeD_EdYdZ�ZFe3fd[d�ZGd\d]�ZHd^d_�ZId`da�ZJdbdc�ZKd�dedf�ZLd�dgdh�ZMdieLdjgdkfiZNe�r�eLdlgdmfeNdn<eMgdofeNdp<e�r
eLdqgdrfeNds<e
�r eLdtgdufeNdv<dwd�ZOd�dyd�ZPdzd�ZQd�d{d�ZRd|d�ZSd}d~�ZTd�dd �ZUd�d!�ZVd�d��ZWd�d��ZXd�d��ZYd�geYgdkfd�geXgdofd��ZZe�r�d�d�geYgdmfeZdn<e�r�d�d�geYgdrfeZds<e
�r�d�d�geYgdufeZdv<d�d��Z[d�d�d"�Z\eed���r@e�]d��e�^d�d��Z_d�e_j`_d�e_ja_d�e_jb_d�d��Zcn$e�rde�]d��e�^d�d��Z_d�d��Zcd�d�d$�Zdd�d�d&�Zed�d��ZfejgejhBdfd�d%�ZidS)�z�Utility functions for copying and archiving files and directory trees.

XXX The functions here don't copy the resource fork or other metadata on Mac.

�NTF)�getpwnam)�getgrnam�nt�posixii�sendfileZlinux�
_fcopyfilez%.COM;.EXE;.BAT;.CMD;.VBS;.JS;.WS;.MSC�copyfileobj�copyfile�copymode�copystat�copy�copy2�copytree�move�rmtree�Error�SpecialFileError�	ExecError�make_archive�get_archive_formats�register_archive_format�unregister_archive_format�get_unpack_formats�register_unpack_format�unregister_unpack_format�unpack_archive�ignore_patterns�chown�which�get_terminal_size�
SameFileErrorc@seZdZdS)rN)�__name__�
__module__�__qualname__�r$r$�/usr/lib/python3.8/shutil.pyrEsc@seZdZdZdS)r z5Raised when source and destination are the same file.N�r!r"r#�__doc__r$r$r$r%r Hsc@seZdZdZdS)rz|Raised when trying to do a kind of operation (e.g. copying) which is
    not supported on a special file (e.g. a named pipe)Nr&r$r$r$r%rKsc@seZdZdZdS)rz+Raised when a command could not be executedNr&r$r$r$r%rOsc@seZdZdZdS)�	ReadErrorz%Raised when an archive cannot be readNr&r$r$r$r%r(Rsr(c@seZdZdZdS)�
RegistryErrorzVRaised when a registry operation with the archiving
    and unpacking registries failsNr&r$r$r$r%r)Usr)c@seZdZdZdS)�_GiveupOnFastCopyzuRaised as a signal to fallback on using raw read()/write()
    file copy when fast-copy functions fail to do so.
    Nr&r$r$r$r%r*Ysr*c
Cs�z|��}|��}Wn*tk
r>}zt|��W5d}~XYnXzt�|||�WnTtk
r�}z6|j|_|j|_|j	t	j
t	jhkr�t|��n|d�W5d}~XYnXdS)zhCopy a regular file content or metadata by using high-performance
    fcopyfile(3) syscall (macOS).
    N)�fileno�	Exceptionr*rr�OSError�name�filename�	filename2�errno�EINVAL�ENOTSUP)�fsrc�fdst�flags�infd�outfd�errr$r$r%�_fastcopy_fcopyfile^s
r:c
CsDz|��}|��}Wn*tk
r>}zt|��W5d}~XYnXztt�|�jd�}Wntk
rnd}YnXtj	dkr�t
|d�}d}zt�||||�}Wn�tk
�r&}zj|j|_
|j|_|jtjkr�dat|��|jtjkr�|d�|dk�rt�|dtj�dk�rt|��|�W5d}~XYq�X|dk�r6�q@||7}q�dS)z�Copy data from one regular mmap-like fd to another by using
    high-performance sendfile(2) syscall.
    This should work on Linux >= 2.6.33 only.
    Ni�ili@rF)r+r,r*�max�os�fstat�st_sizer-�sys�maxsize�minrr.r/r0r1ZENOTSOCK�_USE_CP_SENDFILEZENOSPC�lseek�SEEK_CUR)r4r5r7r8r9Z	blocksize�offsetZsentr$r$r%�_fastcopy_sendfilers8


 
rFc
Csn|j}|j}tt|���L}||�}|s*q`q||krV|d|��}|�|�W5QRXq||�qW5QRXdS)z�readinto()/memoryview() based variant of copyfileobj().
    *fsrc* must support readinto() method and both files must be
    open in binary mode.
    N)�readinto�write�
memoryview�	bytearray)r4r5�lengthZ
fsrc_readinto�
fdst_writeZmv�nZsmvr$r$r%�_copyfileobj_readinto�srNcCs0|st}|j}|j}||�}|s"q,||�qdS)z=copy data from file-like object fsrc to file-like object fdstN)�COPY_BUFSIZE�readrH)r4r5rKZ	fsrc_readrLZbufr$r$r%r�scCs�t|tj�rJttjd�rJztj�|��t�|��WStk
rHYdSXttjd�r~ztj�||�WStk
r|YdSXtj�	tj�
|��tj�	tj�
|��kS)N�samestatF�samefile)�
isinstancer<�DirEntry�hasattr�pathrQ�statr-rR�normcase�abspath��src�dstr$r$r%�	_samefile�s�r]cCst|tj�r|��St�|�S�N)rSr<rTrW��fnr$r$r%�_stat�sracCs t|tj�r|��Stj�|�Sr^)rSr<rT�
is_symlinkrV�islinkr_r$r$r%�_islink�srd��follow_symlinksc	Cs�t�d||�t||�r(td�||���d}t||g�D]j\}}zt|�}Wntk
r`Yq8Xt�	|j
�r�t|tj
�r�|jn|}td|��tr8|dkr8|j}q8|s�t|�r�t�t�|�|��n
t|d����}t|d���}t�r,z,t||tj�|WW5QR�W5QR�Stk
�r(YnXn�t�rtz(t||�|WW5QR�W5QR�Stk
�rpYnXn>t�r�|dk�r�t||t|t��|W5QR�W5QR�St ||�W5QRXW5QRX|S)z�Copy data from src to dst in the most efficient way possible.

    If follow_symlinks is not set and src is a symbolic link, a new
    symlink will be created instead of copying the file it points to.

    zshutil.copyfilez{!r} and {!r} are the same filerz`%s` is a named pipe�rb�wb)!r?�auditr]r �format�	enumeraterar-rW�S_ISFIFO�st_moderSr<rTrVr�_WINDOWSr>rd�symlink�readlink�open�_HAS_FCOPYFILEr:rZ_COPYFILE_DATAr*rBrFrNrArOr)	r[r\rf�	file_size�ir`�str4r5r$r$r%r	�sD

cCspt�d||�|sFt|�rFtj�|�rFttd�r@tjtj}}qRdSnt	tj
}}||�}||t�|j
��dS)z�Copy mode bits from src to dst.

    If follow_symlinks is not set, symlinks aren't followed if and only
    if both `src` and `dst` are symlinks.  If `lchmod` isn't available
    (e.g. Linux) this method does nothing.

    zshutil.copymode�lchmodN)r?rirdr<rVrcrU�lstatrvra�chmodrW�S_IMODErm)r[r\rfZ	stat_funcZ
chmod_funcrur$r$r%r
!s
�	listxattrcCs�ztj||d�}Wn@tk
rR}z"|jtjtjtjfkr<�WY�dSd}~XYnX|D]j}z&tj|||d�}tj||||d�WqXtk
r�}z |jtj	tjtjtjfkr��W5d}~XYqXXqXdS)z�Copy extended filesystem attributes from `src` to `dst`.

        Overwrite existing attributes.

        If `follow_symlinks` is false, symlinks won't be followed.

        reN)
r<rzr-r1r3ZENODATAr2�getxattr�setxattrZEPERM)r[r\rf�names�er.�valuer$r$r%�
_copyxattr7s	�r�cOsdSr^r$)�args�kwargsr$r$r%r�Osc	
s`t�d||�ddd�dd��|p6t|�o4tj�|�}|rJ�fdd�}n�fdd�}t|tj�rp|j|d	�}n|d
�||d	�}t�	|j
�}|d�||j|jf|d�t
|||d	�z|d�|||d	�Wntk
r�YnXt|d
��r\z|d�||j|d	�WnVtk
�rZ}z6dD]*}tt|��r|jtt|�k�r�qJ�q�W5d}~XYnXdS)a�Copy file metadata

    Copy the permission bits, last access time, last modification time, and
    flags from `src` to `dst`. On Linux, copystat() also copies the "extended
    attributes" where possible. The file contents, owner, and group are
    unaffected. `src` and `dst` are path-like objects or path names given as
    strings.

    If the optional flag `follow_symlinks` is not set, symlinks aren't
    followed if and only if both `src` and `dst` are symlinks.
    zshutil.copystatN)�nsrfcWsdSr^r$)r�rfr�r$r$r%�_nop`szcopystat.<locals>._nopcstt|��Sr^)�getattrr<�r.�r�r$r%�lookupgszcopystat.<locals>.lookupcstt|��}|tjkr|S�Sr^)r�r<�supports_follow_symlinks)r.r`r�r$r%r�ls
rerW�utimerx�st_flagsZchflags)Z
EOPNOTSUPPr3)r?rirdr<rVrcrSrTrWryrm�st_atime_ns�st_mtime_nsr��NotImplementedErrorrUr�r-r1r�)	r[r\rfZfollowr�ru�mode�whyr9r$r�r%rRs4�
cCsBtj�|�r"tj�|tj�|��}t|||d�t|||d�|S)a3Copy data and mode bits ("cp src dst"). Return the file's destination.

    The destination may be a directory.

    If follow_symlinks is false, symlinks won't be followed. This
    resembles GNU's "cp -P src dst".

    If source and destination are the same file, a SameFileError will be
    raised.

    re)r<rV�isdir�join�basenamer	r
�r[r\rfr$r$r%r�s
cCsBtj�|�r"tj�|tj�|��}t|||d�t|||d�|S)a0Copy data and metadata. Return the file's destination.

    Metadata is copied with copystat(). Please see the copystat function
    for more information.

    The destination may be a directory.

    If follow_symlinks is false, symlinks won't be followed. This
    resembles GNU's "cp -P src dst".
    re)r<rVr�r�r�r	rr�r$r$r%r
�s
cs�fdd�}|S)z�Function that can be used as copytree() ignore parameter.

    Patterns is a sequence of glob-style patterns
    that are used to exclude filescs(g}�D]}|�t�||��qt|�Sr^)�extend�fnmatch�filter�set)rVr}�
ignored_names�pattern��patternsr$r%�_ignore_patterns�sz)ignore_patterns.<locals>._ignore_patternsr$)r�r�r$r�r%r�scCs>|dk	r$|t�|�dd�|D��}nt�}tj||d�g}	|tkpJ|tk}
|D�]~}|j|krbqPtj�||j�}tj�||j�}
|
r�|n|}z�|�	�}|r�tjdkr�|j
dd�}|jt
jkr�d}|�r8t�
|�}|r�t�||
�t||
|d�nBtj�|��s|�rWqP|���r,t||
||||d�n
|||
�n*|���rXt||
||||d�n
|||
�WqPtk
�r�}z|	�|jd�W5d}~XYqPtk
�r�}z|	�||
t|�f�W5d}~XYqPXqPzt||�WnJtk
�r*}z*t|d	d�dk�r|	�||t|�f�W5d}~XYnX|	�r:t|	��|S)
NcSsg|]
}|j�qSr$r�)�.0�xr$r$r%�
<listcomp>�sz_copytree.<locals>.<listcomp>)�exist_okrFre)�
dirs_exist_okrZwinerror)r<�fspathr��makedirsr
rr.rVr�rbrW�st_reparse_tag�IO_REPARSE_TAG_MOUNT_POINTrpror�exists�is_dirrrr�r�r-�append�strr�)�entriesr[r\�symlinks�ignore�
copy_function�ignore_dangling_symlinksr�r��errorsZuse_srcentryZsrcentryZsrcnameZdstnameZsrcobjrbrw�linktor9r�r$r$r%�	_copytree�s`




�
� (&r�c	
CsDt�d||�t�|��}t|�}W5QRXt||||||||d�S)aeRecursively copy a directory tree and return the destination directory.

    dirs_exist_ok dictates whether to raise an exception in case dst or any
    missing parent directory already exists.

    If exception(s) occur, an Error is raised with a list of reasons.

    If the optional symlinks flag is true, symbolic links in the
    source tree result in symbolic links in the destination tree; if
    it is false, the contents of the files pointed to by symbolic
    links are copied. If the file pointed by the symlink doesn't
    exist, an exception will be added in the list of errors raised in
    an Error exception at the end of the copy process.

    You can set the optional ignore_dangling_symlinks flag to true if you
    want to silence this exception. Notice that this has no effect on
    platforms that don't support os.symlink.

    The optional ignore argument is a callable. If given, it
    is called with the `src` parameter, which is the directory
    being visited by copytree(), and `names` which is the list of
    `src` contents, as returned by os.listdir():

        callable(src, names) -> ignored_names

    Since copytree() is called recursively, the callable will be
    called once for each directory that is copied. It returns a
    list of names relative to the `src` directory that should
    not be copied.

    The optional copy_function argument is a callable that will be used
    to copy each file. It will be called with the source path and the
    destination path as arguments. By default, copy2() is used, but any
    function that supports the same signature (like copy()) can be used.

    zshutil.copytree)r�r[r\r�r�r�r�r�)r?rir<�scandir�listr�)	r[r\r�r�r�r�r�Zitrr�r$r$r%rs&
��st_file_attributescCsPz4|jdd�}t�|j�o2|jtj@o0|jtjkWStk
rJYdSXdS�NFre)rW�S_ISDIRrmr��FILE_ATTRIBUTE_REPARSE_POINTr�r�r-)�entryrur$r$r%�
_rmtree_isdir6s
�r�cCsLz0t�|�}t�|j�p.|jtj@o.|jtjkWSt	k
rFYdSXdS)NF)
r<rwrW�S_ISLNKrmr�r�r�r�r-)rVrur$r$r%�_rmtree_islink?s

�r�cCs*z|jdd�WStk
r$YdSXdSr�)r�r-)r�r$r$r%r�HscCstj�|�Sr^)r<rVrc)rVr$r$r%r�Nsc	Cs&z"t�|��}t|�}W5QRXWn*tk
rL|tj|t���g}YnX|D]�}|j}t|�r�z|��rvtd��Wn,tk
r�|tjj	|t���YqRYnXt
||�qRzt�|�WqRtk
r�|tj|t���YqRXqRzt�|�Wn(tk
�r |tj|t���YnXdS)N�%Cannot call rmtree on a symbolic link)
r<r�r�r-r?�exc_inforVr�rbrc�_rmtree_unsafe�unlink�rmdir)rV�onerror�
scandir_itr�r��fullnamer$r$r%r�Rs0

r�c
Cs.z"t�|��}t|�}W5QRXWn@tk
rb}z"||_|tj|t���WY�dSd}~XYnX|D�]�}tj�||j	�}z|j
dd�}Wntk
r�d}YnNX|r�z|jdd�}	t�|	j
�}Wn*tk
r�|tj|t���YqhYnX|�r�ztj|j	tj|d�}
Wn(tk
�r:|tj|t���Yn�Xz�tj�|	t�|
���r�t|
||�ztj|j	|d�Wn(tk
�r�|tj|t���YnXn8ztd��Wn*tk
�r�|tjj|t���YnXW5t�|
�Xqhztj|j	|d�Wqhtk
�r&|tj|t���YqhXqhdS)NFre)�dir_fdr�)r<r�r�r-r/r?r�rVr�r.r�rWr�rmrwrq�O_RDONLY�closerQr=�_rmtree_safe_fdr�rcr�)�topfdrVr�r�r�r9r�r�r��orig_st�dirfdr$r$r%r�qsR


r�c	Cs�t�d|�|rdd�}n|dkr*dd�}t�r`t|t�rDt�|�}zt�|�}Wn(tk
rz|tj|t�	��YdSXzt�
|tj�}Wn(tk
r�|tj
|t�	��YdSXz�tj
�|t�|���rt|||�zt�|�Wn(tk
�r|tj|t�	��YnXn8ztd��Wn*tk
�rL|tj
j|t�	��YnXW5t�|�XnNzt|��rttd��Wn,tk
�r�|tj
j|t�	��YdSXt||�SdS)a�Recursively delete a directory tree.

    If ignore_errors is set, errors are ignored; otherwise, if onerror
    is set, it is called to handle the error with arguments (func,
    path, exc_info) where func is platform and implementation dependent;
    path is the argument to that function that caused it to fail; and
    exc_info is a tuple returned by sys.exc_info().  If ignore_errors
    is false and onerror is None, an exception is raised.

    z
shutil.rmtreecWsdSr^r$�r�r$r$r%r��szrmtree.<locals>.onerrorNcWs�dSr^r$r�r$r$r%r��sr�)r?ri�_use_fd_functionsrS�bytesr<�fsdecoderwr,r�rqr�r�rVrQr=r�r�r-rcr�r�)rV�
ignore_errorsr�r��fdr$r$r%r�sJ



cCs&tjjtjjpd}tj�|�|��S)N�)r<rV�sep�altsepr��rstrip)rVr�r$r$r%�	_basename�sr�c	CsTt�d||�|}tj�|�rbt||�r8t�||�dStj�|t|��}tj�	|�rbt
d|��zt�||�Wn�tk
�rNtj�|�r�t�
|�}t�||�t�|�n�tj�|��r6t||�r�t
d||f��t|��st�|tj��st�|��rtjdk�rtd||f��t|||dd�t|�n|||�t�|�YnX|S)	a+Recursively move a file or directory to another location. This is
    similar to the Unix "mv" command. Return the file or directory's
    destination.

    If the destination is a directory or a symlink to a directory, the source
    is moved inside the directory. The destination path must not already
    exist.

    If the destination already exists but is not a directory, it may be
    overwritten depending on os.rename() semantics.

    If the destination is on our current filesystem, then rename() is used.
    Otherwise, src is copied to the destination and then removed. Symlinks are
    recreated under the new name if os.rename() fails because of cross
    filesystem renames.

    The optional `copy_function` argument is a callable that will be used
    to copy the source or it will be delegated to `copytree`.
    By default, copy2() is used, but any function that supports the same
    signature (like copy()) can be used.

    A lot more could be done here...  A look at a mv.c shows a lot of
    the issues this implementation glosses over.

    zshutil.moveNz$Destination path '%s' already existsz.Cannot move a directory '%s' into itself '%s'.�darwinzKCannot move the non-empty directory '%s': Lacking write permission to '%s'.T)r�r�)r?rir<rVr�r]�renamer�r�r�rr-rcrpror��
_destinsrc�
_is_immutable�access�W_OK�listdir�platform�PermissionErrorrr)r[r\r�Zreal_dstr�r$r$r%r�sL


�
�����

cCsVtj�|�}tj�|�}|�tjj�s2|tjj7}|�tjj�sL|tjj7}|�|�Sr^)r<rVrY�endswithr��
startswithrZr$r$r%r�/sr�cCs(t|�}tjtjg}t|d�o&|j|kS)Nr�)rarW�UF_IMMUTABLE�SF_IMMUTABLErUr�)r[ruZimmutable_statesr$r$r%r�8sr�cCsNtdks|dkrdSzt|�}Wntk
r8d}YnX|dk	rJ|dSdS)z"Returns a gid, given a group name.N�)r�KeyError�r.�resultr$r$r%�_get_gid=s
r�cCsNtdks|dkrdSzt|�}Wntk
r8d}YnX|dk	rJ|dSdS)z"Returns an uid, given a user name.Nr�)rr�r�r$r$r%�_get_uidIs
r��gzipcs |dkrd}nDtr |dkr d}n2tr2|dkr2d}n trD|dkrDd}ntd�|���d	dl}	|rfd
|nd}
|d|
}tj�|�}|r�tj�	|�s�|dk	r�|�
d|�|s�t�|�|dk	r�|�
d
�t���t
�������fdd�}
|�s|	�|d|�}z|j||
d�W5|��X|S)a�Create a (possibly compressed) tar file from all the files under
    'base_dir'.

    'compress' must be "gzip" (the default), "bzip2", "xz", or None.

    'owner' and 'group' can be used to define an owner and a group for the
    archive that is being built. If not provided, the current owner and group
    will be used.

    The output tar file will be named 'base_name' +  ".tar", possibly plus
    the appropriate compression extension (".gz", ".bz2", or ".xz").

    Returns the output filename.
    Nr�r�Zgz�bzip2�bz2�xzzCbad value for 'compress', or compression format not supported : {0}r�.�.tar�creating %szCreating tar archivecs,�dk	r�|_�|_�dk	r(�|_�|_|Sr^)�gidZgname�uid�uname)Ztarinfo�r��group�ownerr�r$r%�_set_uid_gid�sz#_make_tarball.<locals>._set_uid_gidzw|%s)r�)�_ZLIB_SUPPORTED�_BZ2_SUPPORTED�_LZMA_SUPPORTED�
ValueErrorrj�tarfiler<rV�dirnamer��infor�r�r�rqr��add)�	base_name�base_dir�compress�verbose�dry_runr�r��loggerZtar_compressionr�Zcompress_extZarchive_name�archive_dirr��tarr$r�r%�
_make_tarballUs>�

	
rc	Csnddl}|d}tj�|�}|rNtj�|�sN|dk	r@|�d|�|sNt�|�|dk	rd|�d||�|�sj|j|d|jd���}tj�	|�}	|	tj
kr�|�|	|	�|dk	r�|�d|	�t�|�D]�\}
}}t
|�D]:}
tj�	tj�|
|
��}	|�|	|	�|dk	r�|�d|	�q�|D]L}
tj�	tj�|
|
��}	tj�|	��r|�|	|	�|dk	�r|�d|	��qq�W5QRX|S)	z�Create a zip file from all the files under 'base_dir'.

    The output zip file will be named 'base_name' + ".zip".  Returns the
    name of the output zip file.
    rN�.zipr�z#creating '%s' and adding '%s' to it�w)Zcompressionzadding '%s')�zipfiler<rVr�r�r�r��ZipFileZZIP_DEFLATED�normpath�curdirrH�walk�sortedr��isfile)rrrrrrZzip_filenamerZzfrV�dirpathZdirnames�	filenamesr.r$r$r%�
_make_zipfile�sH
��

rr)rNzuncompressed tar file)rr�zgzip'ed tar-fileZgztarzZIP file�zip)rr�zbzip2'ed tar-fileZbztar)rr�zxz'ed tar-fileZxztarcCsdd�t��D�}|��|S)z�Returns a list of supported formats for archiving and unarchiving.

    Each element of the returned sequence is a tuple (name, description)
    cSsg|]\}}||df�qS)r�r$)r�r.�registryr$r$r%r��sz'get_archive_formats.<locals>.<listcomp>)�_ARCHIVE_FORMATS�items�sort�Zformatsr$r$r%r�s
�r�cCst|dkrg}t|�s td|��t|ttf�s6td��|D]&}t|ttf�rXt|�dkr:td��q:|||ft|<dS)auRegisters an archive format.

    name is the name of the format. function is the callable that will be
    used to create archives. If provided, extra_args is a sequence of
    (name, value) tuples that will be passed as arguments to the callable.
    description can be provided to describe the format, and will be returned
    by the get_archive_formats() function.
    NzThe %s object is not callablez!extra_args needs to be a sequencer�z+extra_args elements are : (arg_name, value))�callable�	TypeErrorrS�tupler��lenr)r.�function�
extra_args�descriptionZelementr$r$r%r�s	
cCs
t|=dSr^)rr�r$r$r%r�sc	
Cst�d||||�t��}	|dk	rP|dk	r6|�d|�tj�|�}|sPt�|�|dkr^tj}||d�}
zt	|}Wn"t
k
r�td|�d�YnX|d}|dD]\}
}||
|
<q�|dkr�||
d	<||
d
<z|||f|
�}W5|dk	�r|dk	�r|�d|	�t�|	�X|S)aCreate an archive file (eg. zip or tar).

    'base_name' is the name of the file to create, minus any format-specific
    extension; 'format' is the archive format: one of "zip", "tar", "gztar",
    "bztar", or "xztar".  Or any other registered format.

    'root_dir' is a directory that will be the root directory of the
    archive; ie. we typically chdir into 'root_dir' before creating the
    archive.  'base_dir' is the directory where we start archiving from;
    ie. 'base_dir' will be the common prefix of all files and
    directories in the archive.  'root_dir' and 'base_dir' both default
    to the current directory.  Returns the name of the archive file.

    'owner' and 'group' are used when creating a tar archive. By default,
    uses the current owner and group.
    zshutil.make_archiveNzchanging into '%s')rrzunknown archive format '%s'r�rr�r�zchanging back to '%s')r?rir<�getcwd�debugrVrY�chdirrrr�r�)rrjZroot_dirrrrr�r�rZsave_cwdr��format_info�func�arg�valr/r$r$r%r�s8




cCsdd�t��D�}|��|S)z�Returns a list of supported formats for unpacking.

    Each element of the returned sequence is a tuple
    (name, extensions, description)
    cSs"g|]\}}||d|df�qS)r�r$)r�r.r�r$r$r%r�3sz&get_unpack_formats.<locals>.<listcomp>)�_UNPACK_FORMATSrrrr$r$r%r-s
�c	Csji}t��D]\}}|dD]}|||<qq|D]$}||kr0d}t||||f��q0t|�sftd��dS)z+Checks what gets registered as an unpacker.rz!%s is already registered for "%s"z*The registered function must be a callableN)r+rr)rr)	�
extensionsrr Zexisting_extensionsr.r��ext�	extension�msgr$r$r%�_check_unpack_options8s�
r0cCs,|dkrg}t|||�||||ft|<dS)aMRegisters an unpack format.

    `name` is the name of the format. `extensions` is a list of extensions
    corresponding to the format.

    `function` is the callable that will be
    used to unpack archives. The callable will receive archives to unpack.
    If it's unable to handle an archive, it needs to raise a ReadError
    exception.

    If provided, `extra_args` is a sequence of
    (name, value) tuples that will be passed as arguments to the callable.
    description can be provided to describe the format, and will be returned
    by the get_unpack_formats() function.
    N)r0r+)r.r,rr r!r$r$r%rJscCs
t|=dS)z*Removes the pack format from the registry.N)r+r�r$r$r%r`scCs&tj�|�}tj�|�s"t�|�dS)z1Ensure that the parent directory of `path` existsN)r<rVr�r�r�)rVr�r$r$r%�_ensure_directorydsr1c		Cs�ddl}|�|�std|��|�|�}z�|��D]�}|j}|�d�s2d|krPq2tj	j
|f|�d���}|snq2t|�|�
d�s2|�|j�}t|d�}z|�|�W5|��~Xq2W5|��XdS)z+Unpack zip `filename` to `extract_dir`
    rNz%s is not a zip file�/z..rh)rZ
is_zipfiler(rr�Zinfolistr/r�r<rVr��splitr1r�rPrqrH)	r/�extract_dirrrr�r.�target�data�fr$r$r%�_unpack_zipfilejs*




r8cCsXddl}z|�|�}Wn"|jk
r8td|��YnXz|�|�W5|��XdS)zAUnpack tar/tar.gz/tar.bz2/tar.xz `filename` to `extract_dir`
    rNz/%s is not a compressed or uncompressed tar file)r�rqZTarErrorr(r�Z
extractall)r/r4r�Ztarobjr$r$r%�_unpack_tarfile�s�
r9r�r	)rrz.tar.gzz.tgzz.tar.bz2z.tbz2z.tar.xzz.txzcCs:t��D],\}}|dD]}|�|�r|SqqdS)Nr)r+rr�)r/r.r�r.r$r$r%�_find_unpack_format�s

r:cCs�t�d|||�|dkr t��}t�|�}t�|�}|dk	r�zt|}Wn$tk
rltd�|��d�YnX|d}|||ft	|d��nHt
|�}|dkr�td�|���t|d}t	t|d�}|||f|�dS)a
Unpack an archive.

    `filename` is the name of the archive.

    `extract_dir` is the name of the target directory, where the archive
    is unpacked. If not provided, the current working directory is used.

    `format` is the archive format: one of "zip", "tar", "gztar", "bztar",
    or "xztar".  Or any other registered format.  If not provided,
    unpack_archive will use the filename extension and see if an unpacker
    was registered for that extension.

    In case none is found, a ValueError is raised.
    zshutil.unpack_archiveNzUnknown unpack format '{0}'r"r�zUnknown archive format '{0}')r?rir<r#r�r+r�r�rj�dictr:r()r/r4rjr&r'r�r$r$r%r�s$

�statvfs�
disk_usageZusageztotal used freezTotal space in byteszUsed space in byteszFree space in bytescCs@t�|�}|j|j}|j|j}|j|j|j}t|||�S)z�Return disk usage statistics about the given path.

        Returned value is a named tuple with attributes 'total', 'used' and
        'free', which are the amount of total, used and free space, in bytes.
        )r<r<�f_bavail�f_frsize�f_blocks�f_bfree�_ntuple_diskusage)rVru�free�total�usedr$r$r%r=�s

cCs"t�|�\}}||}t|||�S)z�Return disk usage statistics about the given path.

        Returned values is a named tuple with attributes 'total', 'used' and
        'free', which are the amount of total, used and free space, in bytes.
        )rZ
_getdiskusagerB)rVrDrCrEr$r$r%r=�scCs�t�d|||�|dkr(|dkr(td��|}|}|dkr>d}n(t|t�rft|�}|dkrftd�|���|dkrtd}n(t|t�s�t	|�}|dkr�td�|���t
�|||�dS)z�Change owner user and group of the given path.

    user and group can be the uid/gid or the user/group names, and in that case,
    they are converted to their respective uid/gid.
    zshutil.chownNzuser and/or group must be set���zno such user: {!r}zno such group: {!r})r?rir�rSr�r��LookupErrorrj�intr�r<r)rV�userr�Z_userZ_groupr$r$r%rs$

��P�c
Cs�zttjd�}Wnttfk
r.d}YnXzttjd�}Wnttfk
r^d}YnX|dksp|dkr�zt�tj���}Wn$t	tt
fk
r�t�|�}YnX|dkr�|j}|dkr�|j
}t�||f�S)aGet the size of the terminal window.

    For each of the two dimensions, the environment variable, COLUMNS
    and LINES respectively, is checked. If the variable is defined and
    the value is a positive integer, it is used.

    When COLUMNS or LINES is not defined, which is the common case,
    the terminal connected to sys.__stdout__ is queried
    by invoking os.get_terminal_size.

    If the terminal size cannot be successfully queried, either because
    the system doesn't support querying, or because we are not
    connected to a terminal, the value given in fallback parameter
    is used. Fallback defaults to (80, 24) which is the default
    size used by many terminal emulators.

    The value returned is a named tuple of type os.terminal_size.
    ZCOLUMNSrZLINES)rHr<�environr�r�rr?�
__stdout__r+�AttributeErrorr-�
terminal_size�columns�lines)ZfallbackrQrR�sizer$r$r%r s$

cCs&tj�|�o$t�||�o$tj�|�Sr^)r<rVr�r�r�)r`r�r$r$r%�
_access_checkQs�rTc
	s�tj���rt�|�r�SdSt�t�}|dkrttj�dd�}|dkrtzt�d�}Wnt	t
fk
rrtj}YnX|s|dS|r�t�|�}|�
t�tj��}nt�|�}|�
tj�}tjdk�rTtj}|r�t�|�}||kr�|�d|�t�d�p�t}dd�|�
tj�D�}|�r d	d�|D�}t�fd
d�|D���r@�g}n�fdd�|D�}n�g}t�}|D]X}	tj�|	�}
|
|k�rd|�|
�|D],}tj�|	|�}t||��r�|S�q��qddS)
a3Given a command, mode, and a PATH string, return the path which
    conforms to the given mode on the PATH, or None if there is no such
    file.

    `mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result
    of os.environ.get("PATH"), or can be overridden with a custom search
    path.

    N�PATH�CS_PATHZwin32rZPATHEXTcSsg|]}|r|�qSr$r$�r�r-r$r$r%r��szwhich.<locals>.<listcomp>cSsg|]}t�|��qSr$)r<�fsencoderWr$r$r%r��sc3s |]}����|���VqdSr^)�lowerr�rW��cmdr$r%�	<genexpr>�szwhich.<locals>.<genexpr>csg|]}�|�qSr$r$rWrZr$r%r��s)r<rVr�rTrSr�rM�get�confstrrOr��defpathrXr3�pathsepr�r?r�r�insert�getenv�_WIN_DEFAULT_PATHEXT�anyr�rXr�r�)
r[r�rVZ	use_bytesrZpathext_sourceZpathext�files�seen�dirZnormdirZthefiler.r$rZr%rVsV







)r)F)FN)r�rrNNN)rrN)Nr�)NNrrNNN)Nr�)NN)NN)rJ)jr'r<r?rWr��collectionsr1�zlibr��ImportErrorr�r�Zlzmar��pwdrZgrprr.rnrrrOrUr�r�rBrrrc�__all__r-rr rrr(r,r)r*r:rFrNrr]rardr	r
r�rrr
rr�r�stat_resultr�r�r�r�rqr�r��supports_dir_fdr��supports_fdr�r�rZavoids_symlink_attacksr�rr�r�r�r�rrrrrrrrr0rrr1r8r9r+r:rr��
namedtuplerBrDrErCr=rrrT�F_OK�X_OKrr$r$r$r%�<module>st






�
@

7B
�
A�
.	
	4�
�
�
>?	�
A
-
����

�
8�
"�
�
�
�
*



 
1

Youez - 2016 - github.com/yon3zu
LinuXploit