GRAYBYTE WORDPRESS FILE MANAGER5341

Server IP : 198.54.121.189 / Your IP : 216.73.216.224
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /opt/alt/python37/lib/python3.7/site-packages/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /opt/alt/python37/lib/python3.7/site-packages//sockshandler.py
#!/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())

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
April 17 2024 17:35:58
root / linksafe
0755
Babel-2.9.1-py3.7.egg-info
--
March 03 2024 23:11:04
root / linksafe
0755
Jinja2-3.0.3-py3.7.egg-info
--
March 03 2024 23:11:10
root / linksafe
0755
PyJWT-2.1.0-py3.7.egg-info
--
March 03 2024 23:11:16
root / linksafe
0755
__pycache__
--
May 23 2024 08:32:24
root / linksafe
0755
_distutils_hack
--
March 03 2024 22:40:05
root / linksafe
0755
attr
--
March 03 2024 23:11:35
root / linksafe
0755
attrs-21.2.0-py3.7.egg-info
--
March 03 2024 23:11:35
root / linksafe
0755
babel
--
March 03 2024 23:11:06
root / linksafe
0755
certifi
--
March 03 2024 23:11:30
root / linksafe
0755
certifi-2018.4.16-py3.7.egg-info
--
March 03 2024 23:11:30
root / linksafe
0755
chardet
--
March 03 2024 23:11:28
root / linksafe
0755
chardet-3.0.4-py3.7.egg-info
--
March 03 2024 23:11:28
root / linksafe
0755
cl_dom_collector
--
May 23 2024 08:32:23
root / root
0755
clcommon
--
May 23 2024 08:32:24
root / root
0755
clconfig
--
May 23 2024 08:32:23
root / root
0755
clconfigure
--
May 23 2024 08:32:23
root / root
0755
cldashboard
--
May 23 2024 08:32:23
root / root
0755
clevents
--
May 23 2024 08:32:23
root / root
0755
cllimits_validator
--
May 23 2024 08:32:23
root / root
0755
cllimitslib_v2
--
May 23 2024 08:32:23
root / root
0755
clsentry
--
May 23 2024 08:32:24
root / root
0755
clsummary
--
May 23 2024 08:32:23
root / root
0755
clveconfig
--
May 23 2024 08:32:23
root / root
0755
clwizard
--
May 23 2024 08:32:23
root / root
0755
distlib
--
March 03 2024 22:42:56
root / linksafe
0755
docopt-0.6.2-py3.7.egg-info
--
March 03 2024 23:11:26
root / linksafe
0755
filelock
--
March 03 2024 22:42:58
root / linksafe
0755
filelock-0.0.0-py3.7.egg-info
--
March 03 2024 22:42:58
root / linksafe
0755
future
--
March 03 2024 23:10:26
root / linksafe
0755
future-0.17.0-py3.7.egg-info
--
March 03 2024 23:10:26
root / linksafe
0755
idna
--
March 03 2024 23:11:24
root / linksafe
0755
idna-2.5-py3.7.egg-info
--
March 03 2024 23:11:24
root / linksafe
0755
importlib_metadata
--
March 03 2024 23:11:22
root / linksafe
0755
importlib_metadata-0.0.0-py3.7.egg-info
--
March 03 2024 23:11:22
root / linksafe
0755
jinja2
--
March 03 2024 23:11:10
root / linksafe
0755
jsonschema
--
March 03 2024 23:11:37
root / linksafe
0755
jsonschema-3.2.0-py3.7.egg-info
--
March 03 2024 23:11:37
root / linksafe
0755
jwt
--
March 03 2024 23:14:08
root / linksafe
0755
libfuturize
--
March 03 2024 23:10:26
root / linksafe
0755
libpasteurize
--
March 03 2024 23:10:26
root / linksafe
0755
lve_utils
--
May 23 2024 08:32:23
root / root
0755
past
--
March 03 2024 23:10:26
root / linksafe
0755
pip
--
March 03 2024 22:57:12
root / linksafe
0755
pip-20.2.4.dist-info
--
March 03 2024 22:57:12
root / linksafe
0755
pkg_resources
--
March 03 2024 22:40:05
root / linksafe
0755
platformdirs
--
March 03 2024 22:43:00
root / linksafe
0755
platformdirs-0.0.0-py3.7.egg-info
--
March 03 2024 22:43:00
root / linksafe
0755
pytz
--
March 03 2024 23:11:01
root / linksafe
0755
pytz-2017.2-py3.7.egg-info
--
March 03 2024 23:11:01
root / linksafe
0755
raven
--
March 03 2024 23:10:23
root / linksafe
0755
raven-6.3.0-py3.7.egg-info
--
March 03 2024 23:10:23
root / linksafe
0755
requests
--
March 03 2024 23:11:32
root / root
0755
requests-2.26.0-py3.7.egg-info
--
March 03 2024 23:11:32
root / linksafe
0755
schema-0.7.1-py3.7.egg-info
--
March 03 2024 23:10:59
root / linksafe
0755
setuptools
--
March 03 2024 22:40:05
root / linksafe
0755
setuptools-58.3.0.dist-info
--
March 03 2024 22:40:05
root / linksafe
0755
six-1.15.0-py3.7.egg-info
--
March 03 2024 23:09:02
root / linksafe
0755
typing_extensions-3.7.4.3-py3.7.egg-info
--
March 03 2024 23:11:20
root / linksafe
0755
urllib3
--
March 03 2024 23:11:14
root / linksafe
0755
urllib3-1.26.6-py3.7.egg-info
--
March 03 2024 23:11:14
root / linksafe
0755
vendors_api
--
May 23 2024 08:32:24
root / root
0755
virtualenv
--
March 03 2024 22:53:22
root / root
0755
virtualenv-20.13.0-py3.7.egg-info
--
March 03 2024 22:53:22
root / root
0755
zipp-0.0.0-py3.7.egg-info
--
March 03 2024 23:10:57
root / linksafe
0755
PySocks-1.5.7-py3.7.egg-info
0.314 KB
November 14 2023 14:03:31
root / linksafe
0644
distlib-0.3.4-py3.7.egg-info
1.135 KB
November 14 2023 12:11:47
root / linksafe
0644
distutils-precedence.pth
0.148 KB
November 13 2023 21:35:13
root / linksafe
0644
docopt.py
19.479 KB
June 16 2014 11:14:32
root / linksafe
0644
schema.py
28.514 KB
September 09 2019 17:39:33
root / linksafe
0644
six.py
33.358 KB
May 21 2020 15:25:33
root / linksafe
0644
socks.py
29.25 KB
May 21 2016 21:54:42
root / linksafe
0644
sockshandler.py
2.845 KB
May 21 2016 21:54:42
root / linksafe
0644
typing_extensions.py
81.765 KB
July 07 2020 22:29:25
root / linksafe
0644
zipp.py
8.228 KB
December 31 2021 00:01:49
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF