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.6/site-packages/setuptools/command/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.6/site-packages/setuptools/command/__pycache__/upload_docs.cpython-36.pyc
3

��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|jdd�S)Nzutf-8�surrogateescape)�encode)�s�r�!/usr/lib/python3.6/upload_docs.py�_encodesr
c@s�eZdZdZdZdddejfddgZejZdd�Zd
efgZ	dd�Z
dd�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]�
show-responseN�&display full response text from server�upload-dir=�directory to uploadcCs$|jdkr xtdd�D]}dSWdS)Nzdistutils.commands�build_sphinxT)�
upload_dirr)�selfZeprrr�
has_sphinx-s
zupload_docs.has_sphinxrcCstj|�d|_d|_dS)N)r�initialize_optionsr�
target_dir)rrrrr4s
zupload_docs.initialize_optionscCs�tj|�|jdkrV|j�r8|jd�}t|j�d|_qh|jd�}tj	j
|jd�|_n|jd�|j|_d|j
kr|tjd�|jd|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�tj|d�}z�|j|j�x�tj|j�D]~\}}}||jkrT|rTd}t||j��xP|D]H}tjj||�}|t	|j�d�j
tjj�}	tjj|	|�}
|j||
�qZWq(WWd|j
�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_zipfilecCslx|j�D]}|j|�q
Wtj�}|jjj�}tjj	|d|�}z|j
|�|j|�Wdtj
|�XdS)Nz%s.zip)Zget_sub_commandsZrun_command�tempfileZmkdtemp�distribution�metadata�get_namerrrr2�upload_file�shutilZrmtree)rZcmd_nameZtmp_dirr0r,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|jd�}|d}|df}tj|j|d�}t||j��}tjj|�}tj||�}	d|}
dj	|	�|
fS)	z=
        Build up the MIME payload for the POST data
        z3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254s
--�asciis--r;)rAz multipart/form-data; boundary=%s�)
r	�	functools�partialrF�map�items�	itertools�chain�
from_iterabler)�cls�data�boundaryrAZend_boundaryZ	end_itemsZbuilderZpart_groups�partsZ
body_items�content_typerrr�_build_multipart{szupload_docs._build_multipartcCsJt|d��}|j�}WdQRX|jj}d|j�tjj|�|fd�}t|j	d|j
�}t|�jd�}d|}|j
|�\}}	d|j}
|j|
tj�tjj|j�\}}}
}}}|r�|r�|s�t�|dkr�tjj|�}n"|d	kr�tjj|�}ntd
|��d}yZ|j�|jd|
�|	}|jd
|�|jdtt|���|jd|�|j�|j |�Wn6t!j"k
�r�}z|jt|�tj#�dSd}~XnX|j$�}|j%dk�r�d|j%|j&f}
|j|
tj�nb|j%dk�r|j'd�}|dk�r�d|j�}d|}
|j|
tj�nd|j%|j&f}
|j|
tj#�|j(�rFt)dd|j�dd�dS)N�rbZ
doc_upload)z:actionr0�content�:rGzBasic 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): %s�-�K)*�open�readr4r5r6rr�basenamer
ZusernameZpasswordr�decoderUr r"r�INFO�urllib�parseZurlparse�AssertionErrorrYZclientZHTTPConnectionZHTTPSConnectionZconnectZ
putrequestZ	putheader�strr&Z
endheaders�send�socket�errorZERRORZgetresponse�status�reasonZ	getheaderZ
show_response�print)rr+�frW�metarQZcredentialsZauthZbodyZct�msgZschemaZnetlocZurl�paramsZqueryZ	fragmentsZconnrT�er�locationrrrr7�s\


zupload_docs.upload_file)rNr)rNr)�__name__�
__module__�__qualname__ZDEFAULT_REPOSITORY�descriptionrZuser_optionsZboolean_optionsrZsub_commandsrrr2r9�staticmethodrF�classmethodrUr7rrrrrs"

r)�__doc__�base64rZ	distutilsrZdistutils.errorsrrrhr$r3r8rMrIZhttp.clientrYZurllib.parsercZ
pkg_resourcesrrr
rrrrr�<module>s 

Youez - 2016 - github.com/yon3zu
LinuXploit