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

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.9/site-packages/setuptools/command/__pycache__/upload_docs.cpython-39.pyc
a

��e��@s�dZddlmZddlmZddlmZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
ZddlZddlmZddlmZd	d
lmZdd�ZGd
d�de�ZdS)z|upload_docs

Implements a Distutils 'upload_docs' subcommand (upload documentation to
sites other than PyPi such as devpi).
�)�standard_b64encode)�log)�DistutilsOptionErrorN�)�metadata)�SetuptoolsDeprecationWarning�)�uploadcCs|�dd�S)Nzutf-8�surrogateescape)�encode)�s�r
�B/usr/lib/python3.9/site-packages/setuptools/command/upload_docs.py�_encodesrc@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 uploadcCst|jduotjddd��S)Nzdistutils.commands�build_sphinx)�group�name)�bool�
upload_dirrZentry_points��selfr
r
r�
has_sphinx/s
�zupload_docs.has_sphinxrcCst�|�d|_d|_dS)N)r	�initialize_optionsr�
target_dirrr
r
rr7s
zupload_docs.initialize_optionscCs�t�d�t�|�|jdur`|��rB|�d�}t|j�d|_	qr|�d�}t
j�|j
d�|_	n|�d�|j|_	|�d|j	�dS)NzWUpload_docs command is deprecated. Use Read the Docs (https://readthedocs.org) instead.rZhtml�buildZdocsrzUsing upload directory %s)r�warnr	�finalize_optionsrrZget_finalized_command�dictZbuilder_target_dirsr�os�path�joinZ
build_baseZensure_dirname�announce)rrrr
r
rr<s�




zupload_docs.finalize_optionscCs�t�|d�}z�|�|j�t�|j�D]x\}}}||jkrP|sPd}t||j��|D]H}tj�||�}|t	|j�d��
tjj�}	tj�|	|�}
|�||
�qTq&W|�
�n
|�
�0dS)N�wz'no files found in upload directory '%s')�zipfile�ZipFileZmkpathrr �walkrr!r"�len�lstrip�sep�write�close)r�filename�zip_file�root�dirs�filesZtmplrZfull�relative�destr
r
r�create_zipfileNszupload_docs.create_zipfilec	Cs�tjdddd�|��D]}|�|�qt��}|jj��}t	j
�|d|�}z"|�|�|�
|�Wt�|�nt�|�0dS)NzDeprecated commanda
            upload_docs is deprecated and will be removed in a future version.
            Instead, use tools like devpi and Read the Docs; or lower level tools like
            httpie and curl to interact directly with your hosting service API.
            )i��	�)Zdue_datez%s.zip)r�emitZget_sub_commandsZrun_command�tempfileZmkdtemp�distributionr�get_namer r!r"r4�upload_file�shutil�rmtree)rZcmd_nameZtmp_dirrr.r
r
r�run^s�
zupload_docs.runccs�|\}}d|}t|t�s |g}|D]f}t|t�rL|d|d7}|d}nt|�}|Vt|�VdV|V|r$|dd�dkr$dVq$dS)	Nz*
Content-Disposition: form-data; name="%s"z; filename="%s"rrs

����
�
)�
isinstance�list�tupler)�item�sep_boundary�key�values�title�valuer
r
r�_build_partvs



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--rA)rFz multipart/form-data; boundary=%s�)
r�	functools�partialrK�map�items�	itertools�chain�
from_iterabler")�cls�data�boundaryrFZend_boundaryZ	end_itemsZbuilderZpart_groups�partsZ
body_items�content_typer
r
r�_build_multipart�s��zupload_docs._build_multipartc
CsTt|d��}|��}Wd�n1s(0Y|jj}d|��tj�|�|fd�}t|j	d|j
�}t|��d�}d|}|�
|�\}}	d|j}
|�|
tj�tj�|j�\}}}
}}}|s�|s�|r�J�|dkr�tj�|�}n"|d	kr�tj�|�}ntd
|��d}zZ|��|�d|
�|	}|�d
|�|�dtt|���|�d|�|��|� |�Wn:t!�y�}z |�t|�tj"�WYd}~dSd}~00|�#�}|j$dk�r�d|j$|j%f}
|�|
tj�nb|j$dk�r|�&d�}|du�rd|��}d|}
|�|
tj�nd|j$|j%f}
|�|
tj"�|j'�rPt(d|��d�dS)N�rbZ
doc_upload)z:actionr�content�:rLzBasic zSubmitting documentation to %s�http�httpszunsupported schema �ZPOSTzContent-typezContent-lengthZ
Authorization��zServer response (%s): %si-ZLocationzhttps://pythonhosted.org/%s/zUpload successful. Visit %szUpload failed (%s): %szK---------------------------------------------------------------------------))�open�readr9rr:r r!�basenamer�username�passwordr�decoderZZ
repositoryr#r�INFO�urllib�parse�urlparser^ZclientZHTTPConnectionZHTTPSConnection�AssertionErrorZconnectZ
putrequestZ	putheader�strr(Z
endheaders�send�OSErrorZERRORZgetresponse�status�reasonZ	getheaderZ
show_response�print)rr-�fr\�metarVZcredentialsZauth�bodyZct�msgZschema�netloc�url�params�queryZ	fragmentsZconnrY�er�locationr
r
rr;�sb&�
�

zupload_docs.upload_fileN)�__name__�
__module__�__qualname__ZDEFAULT_REPOSITORY�descriptionr	Zuser_optionsZboolean_optionsrZsub_commandsrrr4r>�staticmethodrK�classmethodrZr;r
r
r
rrs*��	


r)�__doc__�base64r�	distutilsrZdistutils.errorsrr r%r8r<rRrNZhttp.clientr^�urllib.parseriZ
_importlibr�warningsrr	rrr
r
r
r�<module>s 

Youez - 2016 - github.com/yon3zu
LinuXploit