404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.145.78.203: ~ $
#!/usr/bin/env python
"""
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...
"""
import ssl

try:
    import urllib2
    import httplib
except ImportError: # Python 3
    import urllib.request as urllib2
    import http.client as httplib

import socks # $ pip install PySocks

def merge_dict(a, b):
    d = a.copy()
    d.update(b)
    return d

class SocksiPyConnection(httplib.HTTPConnection):
    def __init__(self, proxytype, proxyaddr, proxyport=None, rdns=True, username=None, password=None, *args, **kwargs):
        self.proxyargs = (proxytype, proxyaddr, proxyport, rdns, username, password)
        httplib.HTTPConnection.__init__(self, *args, **kwargs)

    def connect(self):
        self.sock = socks.socksocket()
        self.sock.setproxy(*self.proxyargs)
        if type(self.timeout) in (int, float):
            self.sock.settimeout(self.timeout)
        self.sock.connect((self.host, self.port))

class SocksiPyConnectionS(httplib.HTTPSConnection):
    def __init__(self, proxytype, proxyaddr, proxyport=None, rdns=True, username=None, password=None, *args, **kwargs):
        self.proxyargs = (proxytype, proxyaddr, proxyport, rdns, username, password)
        httplib.HTTPSConnection.__init__(self, *args, **kwargs)

    def connect(self):
        sock = socks.socksocket()
        sock.setproxy(*self.proxyargs)
        if type(self.timeout) in (int, float):
            sock.settimeout(self.timeout)
        sock.connect((self.host, self.port))
        self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file)

class SocksiPyHandler(urllib2.HTTPHandler, urllib2.HTTPSHandler):
    def __init__(self, *args, **kwargs):
        self.args = args
        self.kw = kwargs
        urllib2.HTTPHandler.__init__(self)

    def http_open(self, req):
        def build(host, port=None, timeout=0, **kwargs):
            kw = merge_dict(self.kw, kwargs)
            conn = SocksiPyConnection(*self.args, host=host, port=port, timeout=timeout, **kw)
            return conn
        return self.do_open(build, req)

    def https_open(self, req):
        def build(host, port=None, timeout=0, **kwargs):
            kw = merge_dict(self.kw, kwargs)
            conn = SocksiPyConnectionS(*self.args, host=host, port=port, timeout=timeout, **kw)
            return conn
        return self.do_open(build, req)

if __name__ == "__main__":
    import sys
    try:
        port = int(sys.argv[1])
    except (ValueError, IndexError):
        port = 9050
    opener = urllib2.build_opener(SocksiPyHandler(socks.PROXY_TYPE_SOCKS5, "localhost", port))
    print("HTTP: " + opener.open("http://httpbin.org/ip").read().decode())
    print("HTTPS: " + opener.open("https://httpbin.org/ip").read().decode())

Filemanager

Name Type Size Permission Actions
Babel-2.5.1-py3.6.egg-info Folder 0755
ConfigArgParse-0.14.0-py3.6.egg-info Folder 0755
Jinja2-2.10.1-py3.6.egg-info Folder 0755
OpenSSL Folder 0755
PyJWT-1.6.1-py3.6.egg-info Folder 0755
PySocks-1.6.8-py3.6.egg-info Folder 0755
Pygments-2.2.0-py3.6.egg-info Folder 0755
__pycache__ Folder 0755
acme Folder 0755
acme-1.22.0-py3.6.egg-info Folder 0755
babel Folder 0755
certbot Folder 0755
certbot-1.22.0-py3.6.egg-info Folder 0755
chardet Folder 0755
chardet-3.0.4-py3.6.egg-info Folder 0755
charset_normalizer Folder 0755
charset_normalizer-2.0.7-py3.6.egg-info Folder 0755
cloud_init-23.4-py3.6.egg-info Folder 0755
cloudinit Folder 0755
dateutil Folder 0755
decorator-4.2.1-py3.6.egg-info Folder 0755
defusedxml Folder 0755
defusedxml-0.6.0-py3.6.egg-info Folder 0755
distro-1.4.0-py3.6.egg-info Folder 0755
dnf Folder 0755
dnf-plugins Folder 0755
dnfpluginscore Folder 0755
file_magic-0.3.0-py3.6.egg-info Folder 0755
httpie Folder 0755
httpie-2.6.0-py3.6.egg-info Folder 0755
idna Folder 0755
idna-2.5-py3.6.egg-info Folder 0755
iotop Folder 0755
isc Folder 0755
jinja2 Folder 0755
josepy Folder 0755
josepy-1.9.0-py3.6.egg-info Folder 0755
jsonpatch-1.21-py3.6.egg-info Folder 0755
jsonpointer-1.10-py3.6.egg-info Folder 0755
jsonschema Folder 0755
jsonschema-2.6.0-py3.6.egg-info Folder 0755
jwt Folder 0755
oauthlib Folder 0755
oauthlib-2.1.0-py3.6.egg-info Folder 0755
parsedatetime Folder 0755
parsedatetime-2.5-py3.6.egg-info Folder 0755
pexpect Folder 0755
pip Folder 0755
pip-9.0.3.dist-info Folder 0755
pkg_resources Folder 0755
ply Folder 0755
ply-3.9-py3.6.egg-info Folder 0755
prettytable-0.7.2-py3.6.egg-info Folder 0755
procfs Folder 0755
ptyprocess Folder 0755
pyOpenSSL-19.0.0-py3.6.egg-info Folder 0755
pyRFC3339-1.1-py3.6.egg-info Folder 0755
pycparser Folder 0755
pycparser-2.14-py3.6.egg-info Folder 0755
pydbus Folder 0755
pydbus-0.6.0-py3.6.egg-info Folder 0755
pygments Folder 0755
pyparsing-2.1.10.dist-info Folder 0755
pyrfc3339 Folder 0755
pyserial-3.1.1-py3.6.egg-info Folder 0755
python_dateutil-2.6.1-py3.6.egg-info Folder 0755
python_linux_procfs-0.7.3-py3.6.egg-info Folder 0755
pytz Folder 0755
pytz-2017.2-py3.6.egg-info Folder 0755
pyudev Folder 0755
pyudev-0.21.0-py3.6.egg-info Folder 0755
requests Folder 0755
requests-2.20.0-py3.6.egg-info Folder 0755
requests_toolbelt Folder 0755
requests_toolbelt-0.9.1-py3.6.egg-info Folder 0755
rhn Folder 0755
sepolgen Folder 0755
sepolicy Folder 0755
serial Folder 0755
setroubleshoot Folder 0755
setuptools Folder 0755
setuptools-39.2.0.dist-info Folder 0755
six-1.11.0.dist-info Folder 0755
sos Folder 0755
sos-4.7.1-py3.6.egg-info Folder 0755
syspurpose Folder 0755
syspurpose-1.28.42-py3.6.egg-info Folder 0755
tuned Folder 0755
up2date_client Folder 0755
urllib3 Folder 0755
urllib3-1.24.2-py3.6.egg-info Folder 0755
zope Folder 0755
zope.component-4.3.0-py3.6.egg-info Folder 0755
zope.event-4.2.0-py3.6.egg-info Folder 0755
_version.py File 21 B 0644
configargparse.py File 40.21 KB 0644
configobj-5.0.6-py3.6.egg-info File 2.96 KB 0644
configobj.py File 87.53 KB 0644
decorator.py File 16.18 KB 0644
distro.py File 42.24 KB 0644
easy_install.py File 126 B 0644
hwdata.py File 7.95 KB 0644
iotop-0.6-py3.6.egg-info File 348 B 0644
isc-2.0-py3.6.egg-info File 267 B 0644
jsonpatch.py File 23.9 KB 0644
jsonpointer.py File 9.15 KB 0644
magic.py File 8.66 KB 0644
pciutils-2.3.6-py3.6.egg-info File 242 B 0644
pexpect-4.3.1-py3.6.egg-info File 2.23 KB 0644
prettytable.py File 52.93 KB 0644
ptyprocess-0.5.2-py3.6.egg-info File 264 B 0644
pyparsing.py File 224.48 KB 0644
rhnlib-2.8.6-py3.6.egg-info File 343 B 0644
seobject.py File 106.42 KB 0644
sepolicy-1.1-py3.6.egg-info File 227 B 0644
setroubleshoot-1.1-py3.6.egg-info File 217 B 0644
six.py File 30.16 KB 0644
socks.py File 31.52 KB 0644
sockshandler.py File 2.84 KB 0644
validate.py File 46.13 KB 0644
zope.component-4.3.0-py3.6-nspkg.pth File 529 B 0644
zope.event-4.2.0-py3.6-nspkg.pth File 529 B 0644