403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /lib64/python3.9/site-packages/mercurial/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib64/python3.9/site-packages/mercurial/__pycache__/url.cpython-39.pyc
a

�+�bZ�@s�ddlmZddlZddlZddlZddlmZddlmZm	Z	m
ZmZm
Z
mZmZmZddlmZmZejZejZejZejZd.dd�ZGd	d
�d
e�ZGdd�dej�Zd
d�Ze�ed�ZGdd�dej�Z
dd�Z dd�Z!Gdd�dej"�Z#Gdd�dej�Z$Gdd�de#�Z%e�rDGdd�dej�Z&Gdd�dej'ej(�Z(Gd d!�d!ej)�Z)Gd"d#�d#ej*�Z*Gd$d%�d%ej+�Z,gZ-d/d(d)�Z.d0d*d+�Z/d,d-�Z0dS)1�)�absolute_importN�)�_)�encoding�error�httpconnection�	keepalive�pycompat�sslutil�urllibcompat�util)�
stringutil�urlutilcCs8|�dd�}|�dd�}|�dd�}|r4|�dd�}|S)	a1Replace special characters "&", "<" and ">" to HTML-safe sequences.
    If the optional flag quote is true, the quotation mark character (")
    is also translated.

    This is the same as cgi.escape in Python, but always operates on
    bytes, whereas cgi.escape in Python 3 only works on unicodes.
    �&s&amp;�<s&lt;�>s&gt;�"s&quot;)�replace)�s�quote�r�3/usr/lib64/python3.9/site-packages/mercurial/url.py�escape&src@s4eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�passwordmgrcCs||_||_dS�N)�ui�passwddb)�selfrrrrr�__init__7szpasswordmgr.__init__cCs|j�||||�Sr)r�add_password)r�realmZuri�user�passwdrrrr;szpasswordmgr.add_passwordc
Cs�t|td�tf�sJ�t|t�s$J�|j�||�}|\}}t�|�t�|�}}|rx|rx|�||�t�|�t�|�fS|r�|s�t	�
|j||�}|r�|\}}|�d�|�d�}}|j�
d|�|r�|�s�t�t�|��}	d|	_|j���s
t�td�t�t|	����|j�td�t�t|	���|j�td�t�|��|�r^|j�td�|�n|jjtd�dd	�}|�s�|j��}|du�r�d
S|j�||||�|�||�t�|�t�|�fS)Nsusernamespassword�#using auth.%s.* for authentication
s"http authorization required for %ss#http authorization required for %s
s
realm: %s
s	user: %s
suser:)�default)NN)�
isinstance�type�strr�find_user_passwordr	�bytesurl�_writedebug�strurl�httpconnectionmod�readauthforurir�get�debugr�url�query�interactiverZAbortr�hidepassword�bytes�write�promptZgetpassr)
rr �authuri�authinfor!r"�res�group�auth�urrrr(>sN
����

zpasswordmgr.find_user_passwordcCs0td�}|j�|||r"dt|�p$df�dS)N� http auth: user %s, password %s
�*�not set)rrr/�len)rr!r"�msgrrrr*oszpasswordmgr._writedebugcCs|j�d|�Sr)rr()rr7rrr�find_stored_passwordssz passwordmgr.find_stored_passwordN)�__name__�
__module__�__qualname__rrr(r*rBrrrrr6s
1rc@seZdZdd�Zdd�ZdS)�proxyhandlercCs|�dd�ptj�d�}|r�|�d�s<|�d�s<d|d}t�|�}|jsh|�dd�|_|�dd�|_d	d
g}|�	dd�|�
dd
�D��|�	dd�tj�dd��d�D��|�dd�r�g|_
n||_
t|�}||d�}|�dt�t|���ni}tj�||�||_dS)Ns
http_proxyshostshttp:shttps:shttp://�/suserspasswds	localhosts	127.0.0.1cSsg|]}|���qSr)�lower��.0�prrr�
<listcomp>��z)proxyhandler.__init__.<locals>.<listcomp>snocSs g|]}|��r|�����qSr)�striprHrIrrrrL�s�sno_proxyrM�,salways)�http�httpssproxying through %s
)�configr�environr.�
startswithrr0r!r"�extendZ
configlist�splitZ
configbool�no_listr'r/r3r4�urlreqrFrr)rrZproxyurl�proxyrWZproxiesrrrrxsB���
���
�zproxyhandler.__init__cCs�t�t�|���d�d}|jD]V}||kr2dS|�d�rT|�|dd��rTdS|�d�r |�|dd��r dSq tj	�
||||�S)N�:rs*.��.r)r	r)rZgethostrVrWrT�endswithrXrF�
proxy_open)r�reqrY�type_�host�errrr^�s
zproxyhandler.proxy_openN)rCrDrErr^rrrrrFws0rFcs�fdd�}|S)Ncs@t|tj�r2|�d�t�|�D]}�||�q n
�||�dS�Nr)r%r,Zhttpsendfile�seekrZ
filechunkiter)r�data�chunk��orgsendrr�	_sendfile�s

z _gen_sendfile.<locals>._sendfiler)rhrirrgr�
_gen_sendfile�s
rjshttpshandlerc@seZdZeejj�ZdS)rN)rCrDrErjr�HTTPConnection�sendrrrrr�srcCs�|j}|r(|dd�dvr"d|}d}nt�|�}d}|sH|t�|�kr�t�t�|��}|sf|jdkr�d�	|j
|jpvdg�|_|j
��|_
|j
�|jj�dSd|_d|_
dS)	N�)zhttp://zhttps:/zhttps://TFshttpsrZs443)�_tunnel_hostrZgetselector�
getfullurlrr0r	r)�scheme�joinra�port�realhostport�headers�copy�update�parent�
addheaders)Zhandler�hr_Ztunnel_hostZ
new_tunnelr<rrr�_generic_start_transaction�s 
rzcs��fdd��jD�}��d�j�t�|�D]}��d|�q.��d�i}tjs`�j|d<�j�jfd�j	i|�����
�\}}}|tjkr�q�t
t�fdd	�d
��qz|dkr�t
t�jjd��n���t�d||��f��dS)
Ncs2i|]*}|���d�rt�|�t��j|��qS)zproxy-)rHrTr	Zbytestrrt)rJ�x�rrr�
<dictcomp>�s�z(_generic_proxytunnel.<locals>.<dictcomp>sCONNECT %s HTTP/1.0
s%s: %s
s
sstrict�methodcs�j����Sr)�fp�readlinerNr)r9rr�<lambda>�rMz&_generic_proxytunnel.<locals>.<lambda>rM��zTunnel connection failed: %d %s)rtrlrsr	Z	iteritemsZispy3�strict�response_class�sock�_methodZ_read_status�httplibZCONTINUE�list�iterrr��close�socketrrN)rZproxyheaders�header�kwargs�version�status�reasonr)r9rr�_generic_proxytunnel�s*
�


�r�c@seZdZdd�Zdd�ZdS)�httphandlercCs|�t|�Sr)�do_openr�rr_rrr�	http_open
szhttphandler.http_opencCst|||�tj�|||�Sr)rzr�HTTPHandler�_start_transaction�rryr_rrrr�
szhttphandler._start_transactionN)rCrDrEr�r�rrrrr�	sr�c@s&eZdZdd�Zejdkr"dd�ZdS)�logginghttpconnectioncOs$tjj|g|�Ri|��||_dSr)rrkr�_create_connection)rZ
createconn�argsr�rrrrszlogginghttpconnection.__init__)r[rmrmcCs.|�|j|jf|j|j�|_|jr*|��dSr)r�rarr�timeoutZsource_addressr�rnZ_tunnelr|rrr�connects
�zlogginghttpconnection.connectN)rCrDrEr�sys�version_infor�rrrrr�s
r�cs2eZdZdZd	�fdd�	Zdd�Zdd�Z�ZS)
�logginghttphandlerz"HTTP handler that logs socket I/O.Ncs(tt|�j|d�||_||_||_dS�N�r�)�superr�r�_logfh�_logname�
_observeropts)rZlogfh�nameZobserveroptsr���	__class__rrr%szlogginghttphandler.__init__cCs|�|j|�Sr)r��_makeconnectionr�rrrr�/szlogginghttphandler.http_opencs"�fdd�}t|g|�Ri|��S)Ncs,tj|i|��}tj�j|�jfi�j��Sr)r��create_connectionrZmakeloggingsocketr�r�r�)r�r�r�r|rr�createconnection3s
��z<logginghttphandler._makeconnection.<locals>.createconnection)r�)rr�r�r�rr|rr�2sz"logginghttphandler._makeconnection)N)rCrDrE�__doc__rr�r��
__classcell__rrr�rr�"s
r�c@s@eZdZejZejZe	ej
�Ze�ej
�Zddd�Zdd�ZdS)�httpsconnectionNcOs.tjj|||g|�Ri|��||_||_dSr)rrkr�key_file�	cert_file)rrarrr�r�r�r�rrrrEs	zhttpsconnection.__init__cCsht�|j|jf�|_|j}|jr:t|�|j�dd�d}tj	|j|j
|j|j|d�|_t�
|j�dS)NrZrr)rZserverhostname)r�r�rarrr�rsr��rsplitr
Z
wrapsocketr�r�rZvalidatesocket)rrarrrr�Rs�zhttpsconnection.connect)NNN)rCrDrErZHTTPResponser�r�Z
HTTPS_PORTZdefault_portrjZsafesendrlZwrapgetresponserkZgetresponserr�rrrrr�>s
�

r�c@s0eZdZd
dd�Zdd�Zdd�Zddd	�ZdS)�httpshandlerNcCs8tjj||d�tj�|�||_t|j|jj�|_dSr�)	r�KeepAliveHandlerrrXr�rr�httppasswordmgrdb�pwmgr)rrr�rrrrcszhttpshandler.__init__cCst|||�tj�|||�Sr)rzrr�r�r�rrrr�iszhttpshandler._start_transactioncCsbt�|�}|j�|�\}}t�|j||�}|rN|\}}||_|j�d|�nd|_|�	|j
|�S)Nr#)rror�rBr,r-rr;r/r�r�)rr_r0r!�passwordr9r:r;rrr�
https_openms
zhttpshandler.https_opencOs�d}d}t|�dkr|d}t|�dkr0|d}|dd�}|jrjd|jvrjd|jvrj|jd}|jd}t||||g|�Ri|��}|j|_|S)Nrrr[skeyscert)r@r;r�r)rrarrr�r�ZkeyfileZcertfileZconnrrrr�{s&

���zhttpshandler._makeconnection)N)N)rCrDrErr�r�r�rrrrr�bs
r�c@s$eZdZdd�Zdd�Zdd�ZdS)�httpdigestauthhandlercOs$tjj|g|�Ri|��d|_dSr)rXr�r�retried_req�rr�r�rrrr�szhttpdigestauthhandler.__init__cCsdSrrr|rrr�reset_retry_count�sz'httpdigestauthhandler.reset_retry_countcCs*||jur||_d|_tj�|||||�Src)r��retriedrXr��http_error_auth_reqed�r�auth_headerrar_rtrrrr��s

�z+httpdigestauthhandler.http_error_auth_reqedN)rCrDrErr�r�rrrrr��sr�c@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�httpbasicauthhandlercOs*d|_tjj|g|�Ri|��d|_dSr)r;rXr�rr�r�rrrr�szhttpbasicauthhandler.__init__cCs|jr|�|j|j�|Sr�r;�add_unredirected_headerr��rZrequestrrr�http_request�sz!httpbasicauthhandler.http_requestcCs|jr|�|j|j�|Srr�r�rrr�
https_request�sz"httpbasicauthhandler.https_requestcCsdSrrr|rrrr��sz&httpbasicauthhandler.reset_retry_countcCs*||jur||_d|_tj�|||||�Src)r�r�rXr�r�r�rrrr��s

�z*httpbasicauthhandler.http_error_auth_reqedcCs�|j�|t�|��\}}|dur�dt�|�t�|�f}dt�t�|��	��}|�
|jd�|krfdS||_|�
|j|�|j�|�SdSdS)Ns%s:%szBasic %s)r"r(rror	r)r+�base64Z	b64encoderNZ
get_headerr�r;r�rw�open)rrar_r r!Zpw�rawr;rrr�retry_http_basic_auth�s
�z*httpbasicauthhandler.retry_http_basic_authN)	rCrDrErr�r�r�r�r�rrrrr��s	r�c@s$eZdZdd�Zdd�Zdd�ZdS)�
cookiehandlerc
Cs�d|_|�dd�}|sdSt�|�}z$tj�t�|��}|��||_WnDtjj	y�}z(|�
td�|t�
|�f�WYd}~n
d}~00dS)Nsauths
cookiefiles?(error loading cookie file %s: %s; continuing without cookies)
)�	cookiejarrRrZ
expandpathZ	cookielibZMozillaCookieJarr	�fsdecode�loadZ	LoadError�warnrr
Zforcebytestr)rrZ
cookiefiler�rbrrrr�s&
�
���zcookiehandler.__init__cCs|jr|j�|�|Sr�r�Zadd_cookie_headerr�rrrr��szcookiehandler.http_requestcCs|jr|j�|�|Srr�r�rrrr��szcookiehandler.https_requestN)rCrDrErr�r�rrrrr��sr��sTcs~��tdd�}g}|r2|�t|||p&i|d��n&|�t|d��trX|�t�|d��|�t���t��j	��|dur�|\}	}
}}��
|
d�\}
}||
ks�|r���|	|
||���d||r�dt
|�p�df�|�t��t��f�|���fd	d
�tD��|�t���tj|�}d|_d|_d|_|�sVdt��}dt�|�fg|_ndt�|�fg|_|�rz|j�d
�|S)a@
    construct an opener suitable for urllib2
    authinfo will be added to the password manager

    The opener can be configured to log socket events if the various
    ``logging*`` arguments are specified.

    ``loggingfh`` denotes a file object to log events to.
    ``loggingname`` denotes the name of the to print when logging.
    ``loggingopts`` is a dict of keyword arguments to pass to the constructed
    ``util.socketobserver`` instance.

    ``sendaccept`` allows controlling whether the ``Accept`` request header
    is sent. The header is sent by default.
    shttpstimeoutr�Nrr=r>r?csg|]}|����qSrr)rJry�ZpassmgrrrrrL9rMzopener.<locals>.<listcomp>s"mercurial/proto-1.0 (Mercurial %s)z
User-agent)ZAcceptzapplication/mercurial-0.1)Z
configwith�float�appendr�r��	has_httpsr�rFrr�rBrr/r@rUr�r��handlerfuncsr�rXZbuildopenerZ
requestscountZsentbytescountZreceivedbytescountrr�r	Zsysstrrx)rr8Z	useragentZ	loggingfhZloggingnameZloggingopts�
sendacceptr��handlersr Zurisr!r"Z	saveduserZ	savedpass�openerZagentrr�rr�sN��	���
r�cCstt�|�}|jr*|j��|_|��\}}n.t�t�|��}dt�	t
�t�|���}d}t
|||d��t�|�|�S)Nsfile://)r�)rr0rprHr8r�normpath�abspathr	r)rXZpathname2urlr�r�r�r+)rZurl_rer�r<r8�pathrrrr�as
�
�r�cs&|j�G�fdd�d|j�}||_dS)z�Wrap a response object with common error handlers.

    This ensures that any I/O from any consumer raises the appropriate
    error and messaging.
    cseZdZd�fdd�	ZdS)z!wrapresponse.<locals>.readerproxyNc
s�z
�|�WStjyv}zR|jrHt|j�}|j|}td�||f}ntd�}tj|td�d��WYd}~nHd}~0tjy�}z&tjtd�|td�d��WYd}~n
d}~00dS)NsBHTTP request error (incomplete response; expected %d bytes got %d)s(HTTP request error (incomplete response)svthis may be an intermittent network failure; if the error persists, consider contacting the network or server operator)�hintsHTTP request error (%s))	r�ZIncompleteReadZexpectedr@�partialrrZPeerTransportErrorZ
HTTPException)r�sizerbZgot�totalrA�Zorigreadrr�readzs2


����
��z&wrapresponse.<locals>.readerproxy.read)N)rCrDrEr�rr�rr�readerproxyysr�N)r�r�)Zrespr�rr�r�wrapresponseqs"r�)N)NNNr�NT)NT)1Z
__future__rr�r�r�Zi18nr�rrrr,rr	r
rrZutilsr
rr�ZstringioZurlerrrXr�objectrrFrjZsafehasattrr�rkrzr�r�r�r�r�r�r�r�r�r�Zbasehandlerr�r�r�r�r�rrrr�<module>
sJ(

A>&	$01%�
a


Youez - 2016 - github.com/yon3zu
LinuXploit