[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.117.73.72: ~ $


�`W%�@s�dZddlmZyddlZWnAek
riddlZddlmZejde��YnXddl	m
ZmZ
ddlmZmZdd	lmZmZdd
lmZmZddlmZddlmZyddlZWnek
rdZYnXGd
d�de�ZGdd�dee�ZGdd�de�ZGdd�de�ZGdd�de�ZdS)aK
SOCKS support for urllib3
~~~~~~~~~~~~~~~~~~~~~~~~~

This contrib module contains provisional support for SOCKS proxies from within
urllib3. This module supports SOCKS4 (specifically the SOCKS4A variant) and
SOCKS5. To enable its functionality, either install PySocks or install this
module with the ``socks`` extra.

Known Limitations:

- Currently PySocks does not support contacting remote websites via literal
  IPv6 addresses. Any such connection attempt will fail.
- Currently PySocks does not support IPv6 connections to the SOCKS proxy. Any
  such connection attempt will fail.
�)�absolute_importN�)�DependencyWarningz�SOCKS support in urllib3 requires the installation of optional dependencies: specifically, PySocks.  For more information, see https://urllib3.readthedocs.org/en/latest/contrib.html#socks-proxies)�error�timeout)�HTTPConnection�HTTPSConnection)�HTTPConnectionPool�HTTPSConnectionPool)�ConnectTimeoutError�NewConnectionError)�PoolManager)�	parse_urlcs4eZdZdZ�fdd�Zdd�Z�S)�SOCKSConnectionzG
    A plain-text HTTP connection that connects via a SOCKS proxy.
    cs/|jd�|_tt|�j||�dS)N�_socks_options)�popr�superr�__init__)�self�args�kwargs)�	__class__��	/socks.pyr9szSOCKSConnection.__init__cCs�i}|jr|j|d<|jr2|j|d<yltj|j|jfd|jdd|jdd|jdd|jd	d
|jdd|j|�}Wntk
r�}z$t	|d
|j|jf��WYdd}~Xn�tj
k
rw}zq|jrR|j}t|t�r<t	|d
|j|jf��qet
|d|��nt
|d|��WYdd}~Xn8tk
r�}zt
|d|��WYdd}~XnX|S)zA
        Establish a new connection via the SOCKS proxy.
        �source_address�socket_optionsZ
proxy_type�
socks_versionZ
proxy_addr�
proxy_host�
proxy_portZproxy_username�usernameZproxy_password�passwordrz0Connection to %s timed out. (connect timeout=%s)Nz(Failed to establish a new connection: %s)rr�socks�create_connection�host�portrr�
SocketTimeoutrZ
ProxyErrorZ
socket_err�
isinstancer�SocketError)rZextra_kw�conn�errrr�	_new_conn=sJ	
	






(		#zSOCKSConnection._new_conn)�__name__�
__module__�__qualname__�__doc__rr*rr)rrr5src@seZdZdS)�SOCKSHTTPSConnectionN)r+r,r-rrrrr/zsr/c@seZdZeZdS)�SOCKSHTTPConnectionPoolN)r+r,r-r�
ConnectionClsrrrrr0~sr0c@seZdZeZdS)�SOCKSHTTPSConnectionPoolN)r+r,r-r/r1rrrrr2�sr2csFeZdZdZdedeiZdddd�fdd�Z�S)�SOCKSProxyManagerzh
    A version of the urllib3 ProxyManager that routes connections via the
    defined SOCKS proxy.
    ZhttpZhttpsN�
c

s�t|�}|jdkr'tj}n+|jdkrBtj}ntd|��||_d|d|jd|jd|d|i}	|	|d	<t	t
|�j|||�t
j|_dS)
NZsocks5Zsocks4z)Unable to determine SOCKS version from %srrrrr r)
r�schemer!ZPROXY_TYPE_SOCKS5ZPROXY_TYPE_SOCKS4�
ValueError�	proxy_urlr#r$rr3r�pool_classes_by_scheme)
rr7rr Z	num_poolsZheadersZconnection_pool_kwZparsedrZ
socks_options)rrrr�s"
			

zSOCKSProxyManager.__init__)r+r,r-r.r0r2r8rrr)rrr3�s
r3) r.Z
__future__rr!�ImportError�warnings�
exceptionsr�warn�socketrr'rr%�
connectionrrZconnectionpoolr	r
rrZpoolmanagerr
Zutil.urlrZsslrr/r0r2r3rrrr�<module>s2

E

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