404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.147.54.52: ~ $
3

9��f��@s�dZddlZddlZddlZddlZddlZddlZddlmZddl	m
Z
ddddd	d
dgZGdd	�d	e�Zd
d�Z
e
dfdd�Ze
fdd�Ze
fdd�Ze
fdd�ZeeefZdS)z/Utilities for extracting common archive formats�N)�DistutilsError)�ensure_directory�unpack_archive�unpack_zipfile�unpack_tarfile�default_filter�UnrecognizedFormat�extraction_drivers�unpack_directoryc@seZdZdZdS)rz#Couldn't recognize the archive typeN)�__name__�
__module__�__qualname__�__doc__�rr�"/usr/lib/python3.6/archive_util.pyrscCs|S)z@The default progress/filter callback; returns True for all filesr)�src�dstrrrrscCsNxH|ptD]0}y||||�Wntk
r4w
Yq
XdSq
Wtd|��dS)a�Unpack `filename` to `extract_dir`, or raise ``UnrecognizedFormat``

    `progress_filter` is a function taking two arguments: a source path
    internal to the archive ('/'-separated), and a filesystem path where it
    will be extracted.  The callback must return the desired extract path
    (which may be the same as the one passed in), or else ``None`` to skip
    that file or directory.  The callback can thus be used to report on the
    progress of the extraction, as well as to filter the items extracted or
    alter their extraction paths.

    `drivers`, if supplied, must be a non-empty sequence of functions with the
    same signature as this function (minus the `drivers` argument), that raise
    ``UnrecognizedFormat`` if they do not support extracting the designated
    archive type.  The `drivers` are tried in sequence until one is found that
    does not raise an error, or until all are exhausted (in which case
    ``UnrecognizedFormat`` is raised).  If you do not supply a sequence of
    drivers, the module's ``extraction_drivers`` constant will be used, which
    means that ``unpack_zipfile`` and ``unpack_tarfile`` will be tried, in that
    order.
    Nz!Not a recognized archive type: %s)r	r)�filename�extract_dir�progress_filterZdriversZdriverrrrrscCs�tjj|�std|��|d|fi}x�tj|�D]�\}}}||\}}x4|D],}	||	dtjj||	�f|tjj||	�<qLWx\|D]T}
tjj||
�}|||
|�}|s�q�t|�tjj||
�}
tj|
|�tj	|
|�q�Wq0WdS)z�"Unpack" a directory, using the same interface as for archives

    Raises ``UnrecognizedFormat`` if `filename` is not a directory
    z%s is not a directory��/N)
�os�path�isdirr�walk�joinr�shutilZcopyfileZcopystat)rrr�paths�base�dirs�filesrr�d�f�targetrrrr
?s 
,
c
Cs�tj|�std|f��tj|���}x�|j�D]�}|j}|jd�s.d|jd�krRq.tj	j
|f|jd���}|||�}|szq.|jd�r�t|�n4t|�|j
|j�}t|d��}|j|�WdQRX|jd?}	|	r.tj||	�q.WWdQRXdS)z�Unpack zip `filename` to `extract_dir`

    Raises ``UnrecognizedFormat`` if `filename` is not a zipfile (as determined
    by ``zipfile.is_zipfile()``).  See ``unpack_archive()`` for an explanation
    of the `progress_filter` argument.
    z%s is not a zip filerz..�wbN�)�zipfileZ
is_zipfilerZZipFileZinfolistr�
startswith�splitrrr�endswithr�read�open�writeZ
external_attr�chmod)
rrr�z�info�namer$�datar#Zunix_attributesrrrrZs(




c
Cshytj|�}Wn$tjk
r2td|f��YnXtj|���dd�|_�x
|D�]}|j}|jd�oxd|j	d�krTt
jj|f|j	d���}xV|dk	r�|j
�s�|j�r�|j}|j�r�tj|j�}tj||�}tj|�}|j|�}q�W|dk	rT|j��s|j�rT|||�}	|	rT|	jt
j��r,|	dd	�}	y|j||	�WqTtjk
�rTYqTXqTWdSQRXdS)
z�Unpack tar/tar.gz/tar.bz2 `filename` to `extract_dir`

    Raises ``UnrecognizedFormat`` if `filename` is not a tarfile (as determined
    by ``tarfile.open()``).  See ``unpack_archive()`` for an explanation
    of the `progress_filter` argument.
    z/%s is not a compressed or uncompressed tar filecWsdS)Nr)�argsrrr�<lambda>�sz unpack_tarfile.<locals>.<lambda>rz..N�T���)�tarfiler,ZTarErrorr�
contextlib�closing�chownr1r(r)rrrZislnkZissymZlinkname�	posixpath�dirname�normpathZ
_getmember�isfilerr*�sepZ_extract_memberZExtractError)
rrrZtarobj�memberr1Z
prelim_dstZlinkpathrZ	final_dstrrrrs8



)rr'r7rrr;r8Zdistutils.errorsrZ
pkg_resourcesr�__all__rrrr
rrr	rrrr�<module>s$
"%.

Filemanager

Name Type Size Permission Actions
__init__.cpython-36.opt-1.pyc File 6.07 KB 0644
__init__.cpython-36.pyc File 6.07 KB 0644
archive_util.cpython-36.opt-1.pyc File 4.95 KB 0644
archive_util.cpython-36.pyc File 4.95 KB 0644
build_meta.cpython-36.opt-1.pyc File 5.62 KB 0644
build_meta.cpython-36.pyc File 5.7 KB 0644
config.cpython-36.opt-1.pyc File 14.64 KB 0644
config.cpython-36.pyc File 14.64 KB 0644
dep_util.cpython-36.opt-1.pyc File 786 B 0644
dep_util.cpython-36.pyc File 786 B 0644
depends.cpython-36.opt-1.pyc File 5.09 KB 0644
depends.cpython-36.pyc File 5.09 KB 0644
dist.cpython-36.opt-1.pyc File 35.9 KB 0644
dist.cpython-36.pyc File 35.94 KB 0644
extension.cpython-36.opt-1.pyc File 1.86 KB 0644
extension.cpython-36.pyc File 1.86 KB 0644
glibc.cpython-36.opt-1.pyc File 1.44 KB 0644
glibc.cpython-36.pyc File 1.44 KB 0644
glob.cpython-36.opt-1.pyc File 3.63 KB 0644
glob.cpython-36.pyc File 3.69 KB 0644
launch.cpython-36.opt-1.pyc File 785 B 0644
launch.cpython-36.pyc File 785 B 0644
lib2to3_ex.cpython-36.opt-1.pyc File 2.31 KB 0644
lib2to3_ex.cpython-36.pyc File 2.31 KB 0644
monkey.cpython-36.opt-1.pyc File 4.5 KB 0644
monkey.cpython-36.pyc File 4.5 KB 0644
msvc.cpython-36.opt-1.pyc File 33.66 KB 0644
msvc.cpython-36.pyc File 33.66 KB 0644
namespaces.cpython-36.opt-1.pyc File 3.52 KB 0644
namespaces.cpython-36.pyc File 3.52 KB 0644
package_index.cpython-36.opt-1.pyc File 31.41 KB 0644
package_index.cpython-36.pyc File 31.41 KB 0644
pep425tags.cpython-36.opt-1.pyc File 7.1 KB 0644
pep425tags.cpython-36.pyc File 7.1 KB 0644
py27compat.cpython-36.opt-1.pyc File 742 B 0644
py27compat.cpython-36.pyc File 742 B 0644
py31compat.cpython-36.opt-1.pyc File 1.45 KB 0644
py31compat.cpython-36.pyc File 1.45 KB 0644
py33compat.cpython-36.opt-1.pyc File 1.3 KB 0644
py33compat.cpython-36.pyc File 1.3 KB 0644
py36compat.cpython-36.opt-1.pyc File 2.09 KB 0644
py36compat.cpython-36.pyc File 2.09 KB 0644
sandbox.cpython-36.opt-1.pyc File 15.29 KB 0644
sandbox.cpython-36.pyc File 15.29 KB 0644
site-patch.cpython-36.opt-1.pyc File 1.4 KB 0644
site-patch.cpython-36.pyc File 1.4 KB 0644
ssl_support.cpython-36.opt-1.pyc File 6.56 KB 0644
ssl_support.cpython-36.pyc File 6.56 KB 0644
unicode_utils.cpython-36.opt-1.pyc File 1.07 KB 0644
unicode_utils.cpython-36.pyc File 1.07 KB 0644
version.cpython-36.opt-1.pyc File 259 B 0644
version.cpython-36.pyc File 259 B 0644
wheel.cpython-36.opt-1.pyc File 6.01 KB 0644
wheel.cpython-36.pyc File 6.04 KB 0644
windows_support.cpython-36.opt-1.pyc File 942 B 0644
windows_support.cpython-36.pyc File 942 B 0644