[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.225.72.181: ~ $
U

+�aG7�@sddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlm
Z
ddlmZej�d�r�ddlmmmmZnejejZzeZWnek
r�dZYnXeZddddgZd0d	d
�Zejd1dd��Z ejd
d��Z!ejdd��Z"ejdd��Z#Gdd�de$�Z%Gdd�d�Z&ejdd��Z'dd�Z(ejdd��Z)ejdd��Z*dd d!d"d#hZ+d$d%�Z,d&d'�Z-d(d�Z.Gd)d�d�Z/e0ed*��r�ej1gZ2ngZ2Gd+d�de/�Z3e�4ej5d,d-�d.�6�D��Z7Gd/d�de
�Z8dS)2�N)�DistutilsError)�working_set�java�AbstractSandbox�DirectorySandbox�SandboxViolation�	run_setupc	CsJd}t||��}|��}W5QRX|dkr.|}t||d�}t|||�dS)z.
    Python 3 implementation of execfile.
    �rbN�exec)�open�read�compiler
)�filename�globals�locals�mode�stream�script�code�r�:/tmp/pip-install-1bd_1mtk/setuptools/setuptools/sandbox.py�	_execfile!src
csDtjdd�}|dk	r$|tjdd�<z
|VW5|tjdd�<XdS�N)�sys�argv)�repl�savedrrr�	save_argv.s
rc
cs.tjdd�}z
|VW5|tjdd�<XdSr)r�path�rrrr�	save_path9s
r ccs2tj|dd�tj}|t_z
dVW5|t_XdS)zL
    Monkey-patch tempfile.tempdir with replacement, ensuring it exists
    T)�exist_okN)�os�makedirs�tempfile�tempdir)�replacementrrrr�
override_tempBs
r'c	cs.t��}t�|�z
|VW5t�|�XdSr)r"�getcwd�chdir)�targetrrrr�pushdSs


r+c@seZdZdZedd��ZdS)�UnpickleableExceptionzP
    An exception representing another Exception that could not be pickled.
    c	CsPzt�|�t�|�fWStk
rJddlm}|�||t|���YSXdS)z�
        Always return a dumped (pickled) type and exc. If exc can't be pickled,
        wrap it in UnpickleableException first.
        r)r,N)�pickle�dumps�	Exception�setuptools.sandboxr,�dump�repr)�type�exc�clsrrrr1bs
zUnpickleableException.dumpN)�__name__�
__module__�__qualname__�__doc__�staticmethodr1rrrrr,]sr,c@s(eZdZdZdd�Zdd�Zdd�ZdS)	�ExceptionSaverz^
    A Context Manager that will save an exception, serialized, and restore it
    later.
    cCs|Srr��selfrrr�	__enter__vszExceptionSaver.__enter__cCs |sdSt�||�|_||_dS�NT)r,r1�_saved�_tb)r=r3r4�tbrrr�__exit__ys
zExceptionSaver.__exit__cCs2dt|�krdSttj|j�\}}|�|j��dS)z"restore and re-raise any exceptionr@N)�vars�mapr-�loadsr@�with_tracebackrA)r=r3r4rrr�resume�szExceptionSaver.resumeN)r6r7r8r9r>rCrHrrrrr;psr;c	#sVtj���t��}�VW5QRXtj����fdd�tjD�}t|�|��dS)z�
    Context in which imported modules are saved.

    Translates exceptions internal to the context into the equivalent exception
    outside the context.
    c3s$|]}|�kr|�d�s|VqdS)z
encodings.N��
startswith)�.0�mod_namerrr�	<genexpr>�s
�zsave_modules.<locals>.<genexpr>N)r�modules�copyr;�update�_clear_modulesrH)�	saved_excZdel_modulesrrr�save_modules�s

�rScCst|�D]}tj|=qdSr)�listrrN)Zmodule_namesrLrrrrQ�srQc	cs$t��}z
|VW5t�|�XdSr)�
pkg_resources�__getstate__�__setstate__rrrr�save_pkg_resources_state�s
rXccs�tj�|d�}t��xt��ft��Tt�t��<t|��(t	|��t
d�dVW5QRXW5QRXW5QRXW5QRXW5QRXW5QRXdS)N�temp�
setuptools)r"r�joinrXrSr �hide_setuptoolsrr'r+�
__import__)�	setup_dir�temp_dirrrr�
setup_context�s

r`rZ�	distutilsrUZCython�_distutils_hackcCs|�dd�d}|tkS)aH
    >>> _needs_hiding('setuptools')
    True
    >>> _needs_hiding('pkg_resources')
    True
    >>> _needs_hiding('setuptools_plugin')
    False
    >>> _needs_hiding('setuptools.__init__')
    True
    >>> _needs_hiding('distutils')
    True
    >>> _needs_hiding('os')
    False
    >>> _needs_hiding('Cython')
    True
    �.�r)�split�_MODULES_TO_HIDE)rL�base_modulerrr�
_needs_hiding�srhcCs6tj�dd�}|dk	r|��tttj�}t|�dS)a%
    Remove references to setuptools' modules from sys.modules to allow the
    invocation to import the most appropriate setuptools. This technique is
    necessary to avoid issues such as #315 where setuptools upgrading itself
    would fail to find a function declared in the metadata.
    rbN)rrN�getZremove_shim�filterrhrQ)rbrNrrrr\�s
r\cCs�tj�tj�|��}t|���zl|gt|�tjdd�<tj�d|�t	�
�t	j�dd��t
|��t|dd�}t||�W5QRXWn4tk
r�}z|jr�|jdr��W5d}~XYnXW5QRXdS)z8Run a distutils setup script, sandboxed in its directoryNrcSs|��Sr)�activate)�distrrr�<lambda>��zrun_setup.<locals>.<lambda>�__main__)�__file__r6)r"r�abspath�dirnamer`rTrr�insertr�__init__�	callbacks�appendr�dictr�
SystemExit�args)Zsetup_scriptryr^�ns�vrrrr�s

c@seZdZdZdZdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dD]Zee
e�rDe
e�e�e<qDd$dd�Zerzede�Zede�ZdD]Zee
e�r�ee�e�e<q�dd�ZdD]Zee
e�r�ee�e�e<q�dd�ZdD]Zee
e�r�ee�e�e<q�dd�Zdd�Zd d!�Zd"d#�ZdS)%rzDWrap 'os' module and 'open()' builtin for virtualizing setup scriptsFcs�fdd�tt�D��_dS)Ncs$g|]}|�d�st�|�r|�qS)�_)rJ�hasattr)rK�namer<rr�
<listcomp>s

�z,AbstractSandbox.__init__.<locals>.<listcomp>)�dir�_os�_attrsr<rr<rrt
s
�zAbstractSandbox.__init__cCs"|jD]}tt|t||��qdSr)r��setattrr"�getattr)r=�sourcer~rrr�_copys
zAbstractSandbox._copycCs(|�|�tr|jt_|jt_d|_dSr?)r��_file�builtins�file�_openr�_activer<rrrr>s

zAbstractSandbox.__enter__cCs$d|_trtt_tt_|�t�dS�NF)r�r�r�r�r�rr�r�)r=�exc_type�	exc_value�	tracebackrrrrCs
zAbstractSandbox.__exit__c
Cs"|�|�W5QR�SQRXdS)zRun 'func' under os sandboxingNr)r=�funcrrr�run"szAbstractSandbox.runcstt�����fdd�}|S)Ncs2|jr |j�||f|�|�\}}�||f|�|�Sr)r��_remap_pair)r=�src�dstry�kw�r~�originalrr�wrap*sz3AbstractSandbox._mk_dual_path_wrapper.<locals>.wrap�r�r��r~r�rr�r�_mk_dual_path_wrapper's
z%AbstractSandbox._mk_dual_path_wrapper)�rename�link�symlinkNcs �ptt�����fdd�}|S)Ncs*|jr|j�|f|�|�}�|f|�|�Sr)r��_remap_input�r=rryr�r�rrr�8sz5AbstractSandbox._mk_single_path_wrapper.<locals>.wrapr�)r~r�r�rr�r�_mk_single_path_wrapper5sz'AbstractSandbox._mk_single_path_wrapperr�r)�stat�listdirr)r�chmod�chown�mkdir�remove�unlink�rmdir�utime�lchown�chroot�lstatZ	startfile�mkfifo�mknod�pathconf�accesscstt�����fdd�}|S)NcsB|jr2|j�|f|�|�}|���|f|�|��S�|f|�|�Sr)r�r��
_remap_outputr�r�rrr�Msz4AbstractSandbox._mk_single_with_return.<locals>.wrapr�r�rr�r�_mk_single_with_returnJs
z&AbstractSandbox._mk_single_with_return)�readlink�tempnamcstt�����fdd�}|S)Ncs �||�}|jr|��|�S|Sr)r�r�)r=ryr��retvalr�rrr�\s
z'AbstractSandbox._mk_query.<locals>.wrapr�r�rr�r�	_mk_queryYs
zAbstractSandbox._mk_query)r(�tmpnamcCs|S)z=Called to remap or validate any path, whether input or outputr)r=rrrr�_validate_pathhszAbstractSandbox._validate_pathcOs
|�|�S�zCalled for path inputs�r��r=�	operationrryr�rrrr�lszAbstractSandbox._remap_inputcCs
|�|�S)zCalled for path outputsr�)r=r�rrrrr�pszAbstractSandbox._remap_outputcOs0|j|d|f|�|�|j|d|f|�|�fS)�?Called for path pairs like rename, link, and symlink operationsz-fromz-to)r��r=r�r�r�ryr�rrrr�ts�zAbstractSandbox._remap_pair)N)r6r7r8r9r�rtr�r>rCr�r�r~r}r�rr�r�r�r�r�r�r�r�r�rrrrrs<








�devnullc@s�eZdZdZe�dddddddd	d
ddd
dg
�ZdgZefdd�Z	dd�Z
erXd'dd�Zd(dd�Zdd�Z
dd�Zdd�Zdd �Zd!d"�Zd)d$d%�Zd&S)*rz<Restrict operations to a single subdirectory - pseudo-chrootrr�r�r�r�r�r�r�r�r�r�r�r�z.*lib2to3.*\.pickle$cCsFtj�tj�|��|_tj�|jd�|_dd�|D�|_t�	|�dS)N�cSs g|]}tj�tj�|���qSr)r"r�normcase�realpath)rKrrrrr�s�z-DirectorySandbox.__init__.<locals>.<listcomp>)
r"rr�r��_sandboxr[�_prefix�_exceptionsrrt)r=Zsandbox�
exceptionsrrrrt�s�zDirectorySandbox.__init__cOsddlm}||||��dS)Nr)r)r0r)r=r�ryr�rrrr�
_violation�szDirectorySandbox._violation�rcOs:|dkr(|�|�s(|jd||f|�|�t||f|�|�S)N�r��rtr	ZrU�Ur�)�_okr�r��r=rrryr�rrrr��szDirectorySandbox._filecOs:|dkr(|�|�s(|jd||f|�|�t||f|�|�S)Nr�r)r�r�r�r�rrrr��szDirectorySandbox._opencCs|�d�dS)Nr�)r�r<rrrr��szDirectorySandbox.tmpnamcCsR|j}z>d|_tj�tj�|��}|�|�p@||jkp@|�|j�W�S||_XdSr�)	r�r"rr�r��	_exemptedr�rJr�)r=r�activer�rrrr��s
�
�zDirectorySandbox._okcs<�fdd�|jD�}�fdd�|jD�}t�||�}t|�S)Nc3s|]}��|�VqdSrrI)rK�	exception��filepathrrrM�s�z-DirectorySandbox._exempted.<locals>.<genexpr>c3s|]}t�|��VqdSr)�re�match)rK�patternr�rrrM�s�)r��_exception_patterns�	itertools�chain�any)r=r�Z
start_matchesZpattern_matches�
candidatesrr�rr��s
�
�zDirectorySandbox._exemptedcOs4||jkr0|�|�s0|j|tj�|�f|�|�|Sr�)�	write_opsr�r�r"rr�r�rrrr��szDirectorySandbox._remap_inputcOs2|�|�r|�|�s*|j|||f|�|�||fS)r�)r�r�r�rrrr��szDirectorySandbox._remap_pair�cOs@|t@r*|�|�s*|jd|||f|�|�tj|||f|�|�S)zCalled for low-level os.open()zos.open)�WRITE_FLAGSr�r�r�r)r=r��flagsrryr�rrrr�szDirectorySandbox.openN)r�)r�)r�)r6r7r8r9rw�fromkeysr�r��_EXCEPTIONSrtr�r�r�r�r�r�r�r�rrrrrr�s:��	


cCsg|]}tt|d��qS)rr�)rK�arrrr�srz4O_WRONLY O_RDWR O_APPEND O_CREAT O_TRUNC O_TEMPORARYc@s&eZdZdZe�d���Zdd�ZdS)rzEA setup script attempted to modify the filesystem outside the sandboxa
        SandboxViolation: {cmd}{args!r} {kwargs}

        The package setup script has attempted to modify files on your system
        that are not within the EasyInstall build area, and has been aborted.

        This package cannot be safely installed by EasyInstall, and may not
        support alternate installation locations even if you run its setup
        script by hand.  Please inform the package's author and the EasyInstall
        maintainers to find out if a fix or workaround is available.
        cCs|j\}}}|jjft��Sr)ry�tmpl�formatr)r=�cmdry�kwargsrrr�__str__�szSandboxViolation.__str__N)	r6r7r8r9�textwrap�dedent�lstripr�r�rrrrr�s)N)N)9r"rr$�operator�	functoolsr�r��
contextlibr-r�r�rU�distutils.errorsrr�platformrJZ$org.python.modules.posix.PosixModule�pythonrN�posixZPosixModuler�r~r�r��	NameErrorrr��__all__r�contextmanagerrr r'r+r/r,r;rSrQrXr`rfrhr\rrr}r�r�r�reduce�or_rer�rrrrr�<module>s� 
�





	


�	w
V��

Filemanager

Name Type Size Permission Actions
__init__.cpython-38.pyc File 8.42 KB 0644
_deprecation_warning.cpython-38.pyc File 520 B 0644
_imp.cpython-38.pyc File 2.01 KB 0644
archive_util.cpython-38.pyc File 5.59 KB 0644
build_meta.cpython-38.pyc File 8.74 KB 0644
config.cpython-38.pyc File 19.42 KB 0644
dep_util.cpython-38.pyc File 827 B 0644
depends.cpython-38.pyc File 5.08 KB 0644
dist.cpython-38.pyc File 35.36 KB 0644
errors.cpython-38.pyc File 820 B 0644
extension.cpython-38.pyc File 1.87 KB 0644
glob.cpython-38.pyc File 3.59 KB 0644
installer.cpython-38.pyc File 2.69 KB 0644
launch.cpython-38.pyc File 851 B 0644
lib2to3_ex.cpython-38.pyc File 2.6 KB 0644
monkey.cpython-38.pyc File 4.48 KB 0644
msvc.cpython-38.pyc File 41.73 KB 0644
namespaces.cpython-38.pyc File 3.47 KB 0644
package_index.cpython-38.pyc File 31.74 KB 0644
py34compat.cpython-38.pyc File 454 B 0644
sandbox.cpython-38.pyc File 15.05 KB 0644
unicode_utils.cpython-38.pyc File 1.06 KB 0644
version.cpython-38.pyc File 296 B 0644
wheel.cpython-38.pyc File 7.03 KB 0644
windows_support.cpython-38.pyc File 993 B 0644