403Webshell
Server IP : 127.0.0.1  /  Your IP : 216.73.216.109
Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10
System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64
User : SERVERWEB ( 0)
PHP Version : 8.1.10
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  C:/cygwin64/lib/python3.7/site-packages/setuptools/command/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.7/site-packages/setuptools/command/__pycache__/upload_docs.cpython-37.pyc
B

�a2�@s�dZddlmZddlmZddlmZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZddlmZddlmZd	d
�ZGdd�de�ZdS)
z|upload_docs

Implements a Distutils 'upload_docs' subcommand (upload documentation to
sites other than PyPi such as devpi).
�)�standard_b64encode)�log)�DistutilsOptionErrorN)�iter_entry_points�)�uploadcCs|�dd�S)Nzutf-8�surrogateescape)�encode)�s�r�B/usr/lib/python3.7/site-packages/setuptools/command/upload_docs.py�_encodesr
c@s�eZdZdZdZdddejfddgZejZdd	�Zd
efgZ	dd�Z
d
d�Zdd�Zdd�Z
edd��Zedd��Zdd�ZdS)�upload_docszhttps://pypi.python.org/pypi/z;Upload documentation to sites other than PyPi such as devpizrepository=�rzurl of repository [default: %s])z
show-responseNz&display full response text from server)zupload-dir=Nzdirectory to uploadcCs$|jdkr xtdd�D]}dSWdS)Nzdistutils.commands�build_sphinxT)�
upload_dirr)�selfZeprrr�
has_sphinx-s
zupload_docs.has_sphinxrcCst�|�d|_d|_dS)N)r�initialize_optionsr�
target_dir)rrrrr4s
zupload_docs.initialize_optionscCs�t�|�|jdkrV|��r8|�d�}t|j�d|_qh|�d�}tj	�
|jd�|_n|�d�|j|_d|j
kr|t�d�|�d|j�dS)	NrZhtml�buildZdocsrzpypi.python.orgz<Upload_docs command is deprecated for PyPi. Use RTD instead.zUsing upload directory %s)r�finalize_optionsrrZget_finalized_command�dictZbuilder_target_dirsr�os�path�joinZ
build_baseZensure_dirname�
repositoryr�warn�announce)rrrrrrr9s






zupload_docs.finalize_optionscCs�t�|d�}z�|�|j�x�t�|j�D]|\}}}||jkrR|sRd}t||j��xP|D]H}tj�||�}|t	|j�d��
tjj�}	tj�|	|�}
|�||
�qXWq(WWd|�
�XdS)N�wz'no files found in upload directory '%s')�zipfileZZipFileZmkpathrr�walkrrr�len�lstrip�sep�write�close)r�filename�zip_file�root�dirs�filesZtmpl�nameZfullZrelative�destrrr�create_zipfileIs
zupload_docs.create_zipfilec	Cslx|��D]}|�|�q
Wt��}|jj��}tj�	|d|�}z|�
|�|�|�Wdt�
|�XdS)Nz%s.zip)Zget_sub_commandsZrun_command�tempfileZmkdtemp�distribution�metadata�get_namerrrr.�upload_file�shutilZrmtree)rZcmd_nameZtmp_dirr,r(rrr�runYs
zupload_docs.runccs�|\}}d|}t|t�s |g}xn|D]f}t|t�rN|d|d7}|d}nt|�}|Vt|�VdV|V|r&|dd�dkr&dVq&WdS)	Nz*
Content-Disposition: form-data; name="%s"z; filename="%s"rrs

����
�
)�
isinstance�list�tupler
)�item�sep_boundary�key�values�title�valuerrr�_build_partgs




zupload_docs._build_partcCsnd}d|�d�}|d}|df}tj|j|d�}t||���}tj�|�}t�||�}	d|}
d�	|	�|
fS)	z=
        Build up the MIME payload for the POST data
        z3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254s
--�asciis--r8)r=z multipart/form-data; boundary=%s�)
r	�	functools�partialrB�map�items�	itertools�chain�
from_iterabler)�cls�data�boundaryr=Zend_boundaryZ	end_itemsZbuilderZpart_groups�partsZ
body_items�content_typerrr�_build_multipart{szupload_docs._build_multipartc
Cs>t|d��}|��}WdQRX|jj}d|��tj�|�|fd�}t|j	d|j
�}t|��d�}d|}|�
|�\}}	d|j}
|�|
tj�tj�|j�\}}}
}}}|s�|s�|r�t�|dkr�tj�|�}n"|d	kr�tj�|�}ntd
|��d}yZ|��|�d|
�|	}|�d
|�|�dtt|���|�d|�|��|� |�Wn8t!j"k
�r�}z|�t|�tj#�dSd}~XYnX|�$�}|j%dk�r�d|j%|j&f}
|�|
tj�nb|j%dk�r|�'d�}|dk�r�d|��}d|}
|�|
tj�nd|j%|j&f}
|�|
tj#�|j(�r:t)d|��d�dS)N�rbZ
doc_upload)z:actionr,�content�:rCzBasic zSubmitting documentation to %s�httpZhttpszunsupported schema �ZPOSTzContent-typezContent-lengthZ
Authorization��zServer response (%s): %si-ZLocationzhttps://pythonhosted.org/%s/zUpload successful. Visit %szUpload failed (%s): %szK---------------------------------------------------------------------------)*�open�readr0r1r2rr�basenamer
ZusernameZpasswordr�decoderQrrr�INFO�urllib�parseZurlparse�AssertionErrorrUZclientZHTTPConnectionZHTTPSConnectionZconnectZ
putrequestZ	putheader�strr"Z
endheaders�send�socket�errorZERRORZgetresponse�status�reasonZ	getheaderZ
show_response�print)rr'�frS�metarMZcredentialsZauthZbodyZct�msgZschemaZnetlocZurl�paramsZqueryZ	fragmentsZconnrP�er�locationrrrr3�s\


zupload_docs.upload_fileN)�__name__�
__module__�__qualname__ZDEFAULT_REPOSITORY�descriptionrZuser_optionsZboolean_optionsrZsub_commandsrrr.r5�staticmethodrB�classmethodrQr3rrrrrs 

r)�__doc__�base64rZ	distutilsrZdistutils.errorsrrrbr r/r4rIrEZhttp.clientrUZurllib.parser]Z
pkg_resourcesrrr
rrrrr�<module>s 

Youez - 2016 - github.com/yon3zu
LinuXploit