File "sockshandler.cpython-37.pyc"

Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/opt/alt/python37/lib/python3.7/site-packages/__pycache__/sockshandler.cpython-37.pyc
File size: 3.63 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit

B

"@Wa	@s&dZddlZyddlZddlZWn,ek
rLddlmZddlmZYnXddl	Z	ddZ
GdddejZGdddej
ZGd	d
d
ejejZedkr"ddlZyeejdZWneefk
rd
ZYnXeee	jdeZededededdS)z
SocksiPy + urllib2 handler

version: 0.3
author: e<e@tr0ll.in>

This module provides a Handler which you can use with urllib2 to allow it to tunnel your connection through a socks.sockssocket socket, with out monkey patching the original socket...
NcCs|}|||S)N)copyupdate)abdr=/opt/alt/python37/lib/python3.7/site-packages/sockshandler.py
merge_dicts
r	c@seZdZdddZddZdS)SocksiPyConnectionNTc	Os*||||||f|_tjj|f||dS)N)	proxyargshttplibHTTPConnection__init__)	self	proxytype	proxyaddr	proxyportrdnsusernamepasswordargskwargsrrrrszSocksiPyConnection.__init__cCsPt|_|jj|jt|jttfkr8|j	|j|j
|j|jfdS)N)
socks
socksocketsocksetproxyrtypetimeoutintfloat
settimeoutconnecthostport)rrrrr!s

zSocksiPyConnection.connect)NTNN)__name__
__module____qualname__rr!rrrrr
s
r
c@seZdZdddZddZdS)SocksiPyConnectionSNTc	Os*||||||f|_tjj|f||dS)N)rrHTTPSConnectionr)	rrrrrrrrrrrrr'szSocksiPyConnectionS.__init__cCs\t}|j|jt|jttfkr2||j|	|j
|jft
||j|j|_dS)N)rrrrrrrrr r!r"r#sslZwrap_socketZkey_fileZ	cert_filer)rrrrrr!+szSocksiPyConnectionS.connect)NTNN)r$r%r&rr!rrrrr'&s
r'c@s$eZdZddZddZddZdS)SocksiPyHandlercOs||_||_tj|dS)N)rkwurllib2HTTPHandlerr)rrrrrrr4szSocksiPyHandler.__init__csdfdd	}||S)Nrcs(tj|}tj|||d|}|S)N)r"r#r)r	r+r
r)r"r#rrr+conn)rrrbuild:sz(SocksiPyHandler.http_open.<locals>.build)Nr)do_open)rreqr/r)rr	http_open9szSocksiPyHandler.http_opencsdfdd	}||S)Nrcs(tj|}tj|||d|}|S)N)r"r#r)r	r+r'r)r"r#rrr+r.)rrrr/Asz)SocksiPyHandler.https_open.<locals>.build)Nr)r0)rr1r/r)rr
https_open@szSocksiPyHandler.https_openN)r$r%r&rr2r3rrrrr*3sr*__main__iZ#Z	localhostzHTTP: zhttp://httpbin.org/ipzHTTPS: zhttps://httpbin.org/ip) __doc__r)r,rImportErrorZurllib.requestZrequestZhttp.clientZclientrr	r
r
r(r'r-ZHTTPSHandlerr*r$sysrargvr#
ValueError
IndexErrorZbuild_openerZPROXY_TYPE_SOCKS5openerprintopenreaddecoderrrr<module>	s*