[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.116.88.123: ~ $


�`W.�'@sdZddlmZy$ddlmZddlmZWn1ek
rmZ	ze
e	��WYddZ	[	XnXddlZddl
mZddlmZmZddlmZmZydd	lmZWn(e
k
r�dZdd
lmZYnXddlZddlZddlZddlmZdd
lmZddgZ eZ!ej"ej#j$ej%ej#j&iZ'e(ed�r�e(ej#d�r�ej#j)e'ej*<e(ed�r�e(ej#d�r�ej#j+e'ej,<y e'j-ej.ej#j/i�Wne0k
rYnXej1ej#j2ej3ej#j4ej5ej#j4ej#j6iZ7ej8j9j:d�Z;dZ<ej!Z=ej>Z?dd�Z@dd�ZAGdd�de�Zdd�ZBGdd�deC�ZDer�d%dd �ZEneZEeEeD_Ed!d"�ZFdddddddd#d$�Z>dS)&a!SSL with SNI_-support for Python 2. Follow these instructions if you would
like to verify SSL certificates in Python 2. Note, the default libraries do
*not* do certificate checking; you need to do additional work to validate
certificates yourself.

This needs the following packages installed:

* pyOpenSSL (tested with 0.13)
* ndg-httpsclient (tested with 0.3.2)
* pyasn1 (tested with 0.1.6)

You can install them with the following command:

    pip install pyopenssl ndg-httpsclient pyasn1

To activate certificate checking, call
:func:`~urllib3.contrib.pyopenssl.inject_into_urllib3` from your Python code
before you begin making HTTP requests. This can be done in a ``sitecustomize``
module, or at any other time before your application begins using ``urllib3``,
like this::

    try:
        import urllib3.contrib.pyopenssl
        urllib3.contrib.pyopenssl.inject_into_urllib3()
    except ImportError:
        pass

Now you can use :mod:`urllib3` as you normally would, and it will support SNI
when the required modules are installed.

Activating this module also has the positive side effect of disabling SSL/TLS
compression in Python 2 (see `CRIME attack`_).

If you want to configure the default list of supported cipher suites, you can
set the ``urllib3.contrib.pyopenssl.DEFAULT_SSL_CIPHER_LIST`` variable.

Module Variables
----------------

:var DEFAULT_SSL_CIPHER_LIST: The list of supported SSL/TLS cipher suites.

.. _sni: https://en.wikipedia.org/wiki/Server_Name_Indication
.. _crime attack: https://en.wikipedia.org/wiki/CRIME_(security_exploit)

�)�absolute_import)�SUBJ_ALT_NAME_SUPPORT)�SubjectAltNameN)�decoder)�univ�
constraint)�timeout�error)�_fileobject)�backport_makefile�)�
connection)�util�inject_into_urllib3�extract_from_urllib3�PROTOCOL_TLSv1_1�TLSv1_1_METHOD�PROTOCOL_TLSv1_2�TLSv1_2_METHOD�asciii@cCstt_tt_dt_dS)z7Monkey-patch urllib3 with PyOpenSSL-backed SSL-support.TN)�ssl_wrap_socketr
�HAS_SNIr�IS_PYOPENSSL�rr�
/pyopenssl.pyrns		cCstt_tt_dt_dS)z4Undo monkey-patching by :func:`inject_into_urllib3`.FN)�orig_connection_ssl_wrap_socketr
r�orig_util_HAS_SNIrrrrrrrrvs		c@s2eZdZdZejjejdd�ZdS)rz0ASN.1 implementation for subjectAltNames support�iN)	�__name__�
__module__�__qualname__�__doc__rZ
SequenceOfZsizeSpecrZValueSizeConstraintrrrrrs	rcCsg}ts|St�}x�t|j��D]�}|j|�}|j�}|dkr\q,|j�}tj|d|�}xz|D]r}t	|t�s�q�xWtt
|��D]C}	|j|	�}
|
j�dkr�q�|j
t|
j���q�Wq�Wq,W|S)NssubjectAltNameZasn1SpecZdNSName)rr�rangeZget_extension_count�
get_extensionZget_short_name�get_data�der_decoder�decode�
isinstance�lenZgetComponentByPosition�getName�append�strZgetComponent)Z	peer_certZdns_nameZ
general_names�i�extZext_nameZext_datZdecoded_dat�name�entryZ	componentrrr�get_subj_alt_name�s*		
%r0c@s�eZdZdZddd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
ddd�Zdd�Zdd�ZdS)�
WrappedSocketz�API-compatibility wrapper for Python OpenSSL's Connection-class.

    Note: _makefile_refs, _drop() and _reuse() are needed for the garbage
    collector of pypy.
    TcCs1||_||_||_d|_d|_dS)NrF)r
�socket�suppress_ragged_eofs�_makefile_refs�_closed)�selfr
r2r3rrr�__init__�s
				zWrappedSocket.__init__cCs
|jj�S)N)r2�fileno)r6rrrr8�szWrappedSocket.filenocCs5|jdkr|jd8_|jr1|j�dS)Nrr)r4r5�close)r6rrr�_decref_socketios�s	zWrappedSocket._decref_socketioscOs5y|jj||�}Wntjjk
rt}z3|jrP|jdkrPdStt|���WYdd}~Xn�tjj	k
r�}z'|jj
�tjjkr�dS�WYdd}~Xnqtjjk
r,t
j
|jggg|jj��\}}}|std��n|j||�SYnX|SdS)Nr�Unexpected EOF�zThe read operation timed out���)r=r;)r
�recv�OpenSSL�SSL�SysCallErrorr3�args�SocketErrorr+�ZeroReturnError�get_shutdown�RECEIVED_SHUTDOWN�
WantReadError�selectr2�
gettimeoutr)r6rB�kwargs�data�e�rd�wd�edrrrr>�s"$*zWrappedSocket.recvcOs/y|jj||�SWntjjk
rr}z3|jrN|jdkrNdStt|���WYdd}~Xn�tjj	k
r�}z'|jj
�tjjkr�dS�WYdd}~Xnmtjjk
r*t
j
|jggg|jj��\}}}|std��n|j||�SYnXdS)Nr�Unexpected EOFrzThe read operation timed outr=)r=rP)r
�	recv_intor?r@rAr3rBrCr+rDrErFrGrHr2rIr)r6rBrJrLrMrNrOrrrrQ�s $*zWrappedSocket.recv_intocCs|jj|�S)N)r2�
settimeout)r6rrrrrR�szWrappedSocket.settimeoutcCs|xuy|jj|�SWqtjjk
rstjg|jgg|jj��\}}}|slt��wYqXqWdS)N)	r
�sendr?r@ZWantWriteErrorrHr2rIr)r6rK�_Zwlistrrr�_send_until_done�s	zWrappedSocket._send_until_donecCsJd}x=|t|�krE|j|||t��}||7}q	WdS)Nr)r(rU�SSL_WRITE_BLOCKSIZE)r6rK�
total_sent�sentrrr�sendall�szWrappedSocket.sendallcCs|jj�dS)N)r
�shutdown)r6rrrrZszWrappedSocket.shutdowncCs^|jdkrKyd|_|jj�SWqZtjjk
rGdSYqZXn|jd8_dS)NrT)r4r5r
r9r?r@�Error)r6rrrr9s	zWrappedSocket.closeFcCsp|jj�}|s|S|r8tjjtjj|�Sdd|j�jfffddd�t|�D�iS)NZsubjectZ
commonNameZsubjectAltNamecSsg|]}d|f�qS)ZDNSr)�.0�valuerrr�
<listcomp>s	z-WrappedSocket.getpeercert.<locals>.<listcomp>)	r
Zget_peer_certificater?ZcryptoZdump_certificateZ
FILETYPE_ASN1Zget_subjectZCNr0)r6Zbinary_form�x509rrr�getpeercerts			zWrappedSocket.getpeercertcCs|jd7_dS)Nr)r4)r6rrr�_reuse#szWrappedSocket._reusecCs/|jdkr|j�n|jd8_dS)Nr)r4r9)r6rrr�_drop&s
zWrappedSocket._dropN)rrr r!r7r8r:r>rQrRrUrYrZr9r`rarbrrrrr1�s
r1rcCs%|jd7_t|||dd�S)Nrr9T)r4r
)r6�mode�bufsizerrr�makefile.srecCs
|dkS)Nrr)�cnxr_Zerr_noZ	err_depthZreturn_coderrr�_verify_callback7srgcCstjjt|�}|r5|p%|}|j|�|rH|j|�|tjkrk|jt	|t
�|sw|r�y|j||�Wq�tjjk
r�}	ztj
d||	��WYdd}	~	Xq�Xn
|j�d}
|j|
�|jt�tjj||�}t|tj�r2|jd�}|j|�|j�x�y|j�Wn�tjjk
r�tj|ggg|j��\}}
}
|s�td��wLYn>tjjk
r�}	ztj
d|	��WYdd}	~	XnXPqLWt||�S)Nzbad ca_certs: %rizutf-8zselect timed outzbad handshake: %r)r?r@ZContext�_openssl_versionsZuse_certificate_fileZuse_privatekey_file�ssl�	CERT_NONEZ
set_verify�_openssl_verifyrgZload_verify_locationsr[ZSSLErrorZset_default_verify_pathsZset_optionsZset_cipher_list�DEFAULT_SSL_CIPHER_LIST�
Connectionr'�sixZ	text_type�encodeZset_tlsext_host_nameZset_connect_stateZdo_handshakerGrHrIrr1)�sockZkeyfileZcertfileZ	cert_reqsZca_certsZserver_hostnameZssl_versionZca_cert_dir�ctxrLZOP_NO_COMPRESSIONrfrMrTrrrr;sD

,




*&rr=)Gr!Z
__future__rZ%ndg.httpsclient.ssl_peer_verificationrZndg.httpsclient.subj_alt_namerZBaseSubjectAltName�SyntaxErrorrL�ImportErrorZOpenSSL.SSLr?Zpyasn1.codec.derrr%Zpyasn1.typerrr2rr	rCr
Z#urllib3.packages.backports.makefilerrirHrn�r
r�__all__rZPROTOCOL_SSLv23r@Z
SSLv23_METHODZPROTOCOL_TLSv1ZTLSv1_METHODrh�hasattrrrrr�updateZPROTOCOL_SSLv3ZSSLv3_METHOD�AttributeErrorrjZVERIFY_NONEZ
CERT_OPTIONALZVERIFY_PEERZ
CERT_REQUIREDZVERIFY_FAIL_IF_NO_PEER_CERTrkZssl_ZDEFAULT_CIPHERSrorlrVrrrrrr0�objectr1rergrrrr�<module>-sj
!! 
			�		

Filemanager

Name Type Size Permission Actions
__init__.cpython-35.opt-1.pyc File 95 B 0644
__init__.cpython-35.pyc File 95 B 0644
appengine.cpython-35.opt-1.pyc File 6.87 KB 0644
appengine.cpython-35.pyc File 6.87 KB 0644
ntlmpool.cpython-35.opt-1.pyc File 3.39 KB 0644
ntlmpool.cpython-35.pyc File 3.39 KB 0644
pyopenssl.cpython-35.opt-1.pyc File 10.56 KB 0644
pyopenssl.cpython-35.pyc File 10.56 KB 0644
socks.cpython-35.opt-1.pyc File 4.58 KB 0644
socks.cpython-35.pyc File 4.58 KB 0644