Linux biogene 3.16.0-11-amd64 #1 SMP Debian 3.16.84-1 (2020-06-09) x86_64
Apache
: 46.101.124.208 | : 18.189.171.166
Cant Read [ /etc/named.conf ]
5.6.40-0+deb8u12
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
lib /
python2.7 /
dist-packages /
[ HOME SHELL ]
Name
Size
Permission
Action
Cheetah
[ DIR ]
drwxr-xr-x
Cheetah-2.4.4.egg-info
[ DIR ]
drwxr-xr-x
Crypto
[ DIR ]
drwxr-xr-x
Jinja2-2.7.3.egg-info
[ DIR ]
drwxr-xr-x
MarkupSafe-0.23.egg-info
[ DIR ]
drwxr-xr-x
MySQL_python-1.2.3.egg-info
[ DIR ]
drwxr-xr-x
MySQLdb
[ DIR ]
drwxr-xr-x
OpenSSL
[ DIR ]
drwxr-xr-x
PIL
[ DIR ]
drwxr-xr-x
Pillow-2.6.1.egg-info
[ DIR ]
drwxr-xr-x
Pygments-2.0.1.egg-info
[ DIR ]
drwxr-xr-x
SOAPpy
[ DIR ]
drwxr-xr-x
SOAPpy-0.12.22.egg-info
[ DIR ]
drwxr-xr-x
SQLAlchemy-0.9.8.egg-info
[ DIR ]
drwxr-xr-x
_markerlib
[ DIR ]
drwxr-xr-x
apt
[ DIR ]
drwxr-xr-x
aptsources
[ DIR ]
drwxr-xr-x
bcrypt
[ DIR ]
drwxr-xr-x
boto
[ DIR ]
drwxr-xr-x
boto-2.34.0.egg-info
[ DIR ]
drwxr-xr-x
cffi
[ DIR ]
drwxr-xr-x
cffi-0.8.6.egg-info
[ DIR ]
drwxr-xr-x
chardet
[ DIR ]
drwxr-xr-x
chardet-2.3.0.egg-info
[ DIR ]
drwxr-xr-x
cloud_init-0.7.6.egg-info
[ DIR ]
drwxr-xr-x
cloudinit
[ DIR ]
drwxr-xr-x
colorama
[ DIR ]
drwxr-xr-x
colorama-0.3.2.egg-info
[ DIR ]
drwxr-xr-x
configobj-5.0.6.egg-info
[ DIR ]
drwxr-xr-x
cryptography
[ DIR ]
drwxr-xr-x
cryptography-0.6.1.egg-info
[ DIR ]
drwxr-xr-x
cryptography.egg-info
[ DIR ]
drwxr-xr-x
debian
[ DIR ]
drwxr-xr-x
debian_bundle
[ DIR ]
drwxr-xr-x
defusedxml
[ DIR ]
drwxr-xr-x
distlib
[ DIR ]
drwxr-xr-x
distro_info-0.14.egg-info
[ DIR ]
drwxr-xr-x
distro_info_test
[ DIR ]
drwxr-xr-x
docutils
[ DIR ]
drwxr-xr-x
ecdsa
[ DIR ]
drwxr-xr-x
euca2ools
[ DIR ]
drwxr-xr-x
euca2ools-3.1.0.egg-info
[ DIR ]
drwxr-xr-x
flup
[ DIR ]
drwxr-xr-x
flup-1.0.2.egg-info
[ DIR ]
drwxr-xr-x
html5lib
[ DIR ]
drwxr-xr-x
html5lib-0.999.egg-info
[ DIR ]
drwxr-xr-x
jinja2
[ DIR ]
drwxr-xr-x
jsonpatch-1.3.egg-info
[ DIR ]
drwxr-xr-x
ldap
[ DIR ]
drwxr-xr-x
lxml
[ DIR ]
drwxr-xr-x
lxml-3.4.0.egg-info
[ DIR ]
drwxr-xr-x
markupsafe
[ DIR ]
drwxr-xr-x
netifaces-0.10.4.egg-info
[ DIR ]
drwxr-xr-x
oauth
[ DIR ]
drwxr-xr-x
oauth-1.0.1.egg-info
[ DIR ]
drwxr-xr-x
paramiko
[ DIR ]
drwxr-xr-x
paramiko-1.15.1.egg-info
[ DIR ]
drwxr-xr-x
pip
[ DIR ]
drwxr-xr-x
pip-1.5.6.egg-info
[ DIR ]
drwxr-xr-x
ply
[ DIR ]
drwxr-xr-x
ply-3.4.egg-info
[ DIR ]
drwxr-xr-x
prettytable-0.7.2.egg-info
[ DIR ]
drwxr-xr-x
pyOpenSSL-0.14.egg-info
[ DIR ]
drwxr-xr-x
py_bcrypt-0.4.egg-info
[ DIR ]
drwxr-xr-x
pyasn1
[ DIR ]
drwxr-xr-x
pyasn1-0.1.7.egg-info
[ DIR ]
drwxr-xr-x
pycparser
[ DIR ]
drwxr-xr-x
pygments
[ DIR ]
drwxr-xr-x
python_debian-0.1.27.egg-info
[ DIR ]
drwxr-xr-x
reportbug
[ DIR ]
drwxr-xr-x
reportbug-6.6.3.egg-info
[ DIR ]
drwxr-xr-x
requestbuilder
[ DIR ]
drwxr-xr-x
requestbuilder-0.2.3.egg-info
[ DIR ]
drwxr-xr-x
requests
[ DIR ]
drwxr-xr-x
requests-2.4.3.egg-info
[ DIR ]
drwxr-xr-x
serial
[ DIR ]
drwxr-xr-x
setuptools
[ DIR ]
drwxr-xr-x
setuptools-5.5.1.egg-info
[ DIR ]
drwxr-xr-x
six-1.8.0.egg-info
[ DIR ]
drwxr-xr-x
softwareproperties
[ DIR ]
drwxr-xr-x
sqlalchemy
[ DIR ]
drwxr-xr-x
urllib3
[ DIR ]
drwxr-xr-x
urllib3-1.9.1.egg-info
[ DIR ]
drwxr-xr-x
virtualenv-1.11.6.egg-info
[ DIR ]
drwxr-xr-x
web
[ DIR ]
drwxr-xr-x
wheel
[ DIR ]
drwxr-xr-x
wheel-0.24.0.egg-info
[ DIR ]
drwxr-xr-x
wstools
[ DIR ]
drwxr-xr-x
wstools-0.4.3.egg-info
[ DIR ]
drwxr-xr-x
yaml
[ DIR ]
drwxr-xr-x
BeautifulSoup-3.2.1.egg-info
970
B
-rw-r--r--
BeautifulSoup.py
77.7
KB
-rw-r--r--
BeautifulSoup.pyc
67.55
KB
-rw-r--r--
BeautifulSoupTests.py
36.71
KB
-rw-r--r--
BeautifulSoupTests.pyc
40.56
KB
-rw-r--r--
PyYAML-3.11.egg-info
1.63
KB
-rw-r--r--
README
119
B
-rw-r--r--
_cffi_backend.x86_64-linux-gnu...
81.05
KB
-rw-r--r--
_ldap.so
68.38
KB
-rw-r--r--
_mysql.so
58.54
KB
-rw-r--r--
_mysql_exceptions.py
2.25
KB
-rw-r--r--
_mysql_exceptions.pyc
4.09
KB
-rw-r--r--
_version.py
21
B
-rw-r--r--
_version.pyc
163
B
-rw-r--r--
_yaml.so
198.47
KB
-rw-r--r--
apt_inst.so
50.82
KB
-rw-r--r--
apt_pkg.so
339.07
KB
-rw-r--r--
configobj.py
87.51
KB
-rw-r--r--
configobj.pyc
65.45
KB
-rw-r--r--
deb822.py
146
B
-rw-r--r--
deb822.pyc
317
B
-rw-r--r--
debconf.py
5.83
KB
-rw-r--r--
debconf.pyc
5.87
KB
-rw-r--r--
defusedxml-0.4.1.egg-info
35.09
KB
-rw-r--r--
distro_info.py
9.26
KB
-rw-r--r--
distro_info.pyc
10.18
KB
-rw-r--r--
docutils-0.12.egg-info
2.31
KB
-rw-r--r--
dsml.py
8.06
KB
-rw-r--r--
dsml.pyc
9.27
KB
-rw-r--r--
easy_install.py
126
B
-rw-r--r--
easy_install.pyc
315
B
-rw-r--r--
ecdsa-0.11.egg-info
610
B
-rw-r--r--
jsonpatch.py
15.57
KB
-rw-r--r--
jsonpatch.pyc
16.98
KB
-rw-r--r--
jsonpointer-1.0.egg-info
302
B
-rw-r--r--
jsonpointer.py
6.46
KB
-rw-r--r--
jsonpointer.pyc
6.15
KB
-rw-r--r--
ldapurl.py
11.48
KB
-rw-r--r--
ldapurl.pyc
13.15
KB
-rw-r--r--
ldif.py
13.41
KB
-rw-r--r--
ldif.pyc
13.73
KB
-rw-r--r--
lsb_release.py
13.41
KB
-rw-r--r--
lsb_release.pyc
10.11
KB
-rw-r--r--
netifaces.so
18.47
KB
-rw-r--r--
pkg_resources.py
98.96
KB
-rw-r--r--
pkg_resources.pyc
105.69
KB
-rw-r--r--
prettytable.py
52.93
KB
-rw-r--r--
prettytable.pyc
50.38
KB
-rw-r--r--
pycparser-2.10.egg-info
602
B
-rw-r--r--
pycrypto-2.6.1.egg-info
666
B
-rw-r--r--
pyinotify-0.9.4.egg-info
1.15
KB
-rw-r--r--
pyinotify.py
85.61
KB
-rw-r--r--
pyinotify.pyc
83.4
KB
-rw-r--r--
pyserial-2.6.egg-info
1.37
KB
-rw-r--r--
python-support.pth
29
B
-rw-r--r--
python_apt-0.9.3.13.egg-info
229
B
-rw-r--r--
python_ldap-2.4.10.egg-info
1.41
KB
-rw-r--r--
roman-2.0.0.egg-info
1.28
KB
-rw-r--r--
roman.py
2.63
KB
-rw-r--r--
roman.pyc
3.45
KB
-rw-r--r--
setuptools.pth
26
B
-rw-r--r--
six.py
26.7
KB
-rw-r--r--
six.pyc
26.69
KB
-rw-r--r--
validate.py
46.13
KB
-rw-r--r--
validate.pyc
46.44
KB
-rw-r--r--
virtualenv.py
97.99
KB
-rw-r--r--
virtualenv.pyc
81.43
KB
-rw-r--r--
web.py-0.37.egg-info
301
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : ldapurl.py
""" ldapurl - handling of LDAP URLs as described in RFC 4516 See http://www.python-ldap.org/ for details. \$Id: ldapurl.py,v 1.58 2012/06/07 18:40:59 stroeder Exp $ Python compability note: This module only works with Python 2.0+ since 1. string methods are used instead of module string and 2. list comprehensions are used. """ __version__ = '2.4.10' __all__ = [ # constants 'SEARCH_SCOPE','SEARCH_SCOPE_STR', 'LDAP_SCOPE_BASE','LDAP_SCOPE_ONELEVEL','LDAP_SCOPE_SUBTREE', # functions 'isLDAPUrl', # classes 'LDAPUrlExtension','LDAPUrlExtensions','LDAPUrl' ] import UserDict from urllib import quote,unquote LDAP_SCOPE_BASE = 0 LDAP_SCOPE_ONELEVEL = 1 LDAP_SCOPE_SUBTREE = 2 SEARCH_SCOPE_STR = {None:'',0:'base',1:'one',2:'sub'} SEARCH_SCOPE = { '':None, # the search scope strings defined in RFC2255 'base':LDAP_SCOPE_BASE, 'one':LDAP_SCOPE_ONELEVEL, 'sub':LDAP_SCOPE_SUBTREE, } # Some widely used types StringType = type('') TupleType=type(()) def isLDAPUrl(s): """ Returns 1 if s is a LDAP URL, 0 else """ s_lower = s.lower() return \ s_lower.startswith('ldap://') or \ s_lower.startswith('ldaps://') or \ s_lower.startswith('ldapi://') def ldapUrlEscape(s): """Returns URL encoding of string s""" return quote(s).replace(',','%2C').replace('/','%2F') class LDAPUrlExtension: """ Class for parsing and unparsing LDAP URL extensions as described in RFC 4516. Usable class attributes: critical Boolean integer marking the extension as critical extype Type of extension exvalue Value of extension """ def __init__(self,extensionStr=None,critical=0,extype=None,exvalue=None): self.critical = critical self.extype = extype self.exvalue = exvalue if extensionStr: self._parse(extensionStr) def _parse(self,extension): extension = extension.strip() if not extension: # Don't parse empty strings self.extype,self.exvalue = None,None return self.critical = extension[0]=='!' if extension[0]=='!': extension = extension[1:].strip() try: self.extype,self.exvalue = extension.split('=',1) except ValueError: # No value, just the extype self.extype,self.exvalue = extension,None else: self.exvalue = unquote(self.exvalue.strip()) self.extype = self.extype.strip() def unparse(self): if self.exvalue is None: return '%s%s' % ('!'*(self.critical>0),self.extype) else: return '%s%s=%s' % ( '!'*(self.critical>0), self.extype,quote(self.exvalue or '') ) def __str__(self): return self.unparse() def __repr__(self): return '<%s.%s instance at %s: %s>' % ( self.__class__.__module__, self.__class__.__name__, hex(id(self)), self.__dict__ ) def __eq__(self,other): return \ (self.critical==other.critical) and \ (self.extype==other.extype) and \ (self.exvalue==other.exvalue) def __ne__(self,other): return not self.__eq__(other) class LDAPUrlExtensions(UserDict.UserDict): """ Models a collection of LDAP URL extensions as dictionary type """ def __init__(self,default=None): UserDict.UserDict.__init__(self) for k,v in (default or {}).items(): self[k]=v def __setitem__(self,name,value): """ value Either LDAPUrlExtension instance, (critical,exvalue) or string'ed exvalue """ assert isinstance(value,LDAPUrlExtension) assert name==value.extype self.data[name] = value def values(self): return [ self[k] for k in self.keys() ] def __str__(self): return ','.join(map(str,self.values())) def __repr__(self): return '<%s.%s instance at %s: %s>' % ( self.__class__.__module__, self.__class__.__name__, hex(id(self)), self.data ) def __eq__(self,other): assert isinstance(other,self.__class__),TypeError( "other has to be instance of %s" % (self.__class__) ) return self.data==other.data def parse(self,extListStr): for extension_str in extListStr.strip().split(','): if extension_str: e = LDAPUrlExtension(extension_str) self[e.extype] = e def unparse(self): return ','.join([ v.unparse() for v in self.values() ]) class LDAPUrl: """ Class for parsing and unparsing LDAP URLs as described in RFC 4516. Usable class attributes: urlscheme URL scheme (either ldap, ldaps or ldapi) hostport LDAP host (default '') dn String holding distinguished name (default '') attrs list of attribute types (default None) scope integer search scope for ldap-module filterstr String representation of LDAP Search Filters (see RFC 4515) extensions Dictionary used as extensions store who Maps automagically to bindname LDAP URL extension cred Maps automagically to X-BINDPW LDAP URL extension """ attr2extype = {'who':'bindname','cred':'X-BINDPW'} def __init__( self, ldapUrl=None, urlscheme='ldap', hostport='',dn='',attrs=None,scope=None,filterstr=None, extensions=None, who=None,cred=None ): self.urlscheme=urlscheme self.hostport=hostport self.dn=dn self.attrs=attrs self.scope=scope self.filterstr=filterstr self.extensions=(extensions or LDAPUrlExtensions({})) if ldapUrl!=None: self._parse(ldapUrl) if who!=None: self.who = who if cred!=None: self.cred = cred def __eq__(self,other): return \ self.urlscheme==other.urlscheme and \ self.hostport==other.hostport and \ self.dn==other.dn and \ self.attrs==other.attrs and \ self.scope==other.scope and \ self.filterstr==other.filterstr and \ self.extensions==other.extensions def __ne__(self,other): return not self.__eq__(other) def _parse(self,ldap_url): """ parse a LDAP URL and set the class attributes urlscheme,host,dn,attrs,scope,filterstr,extensions """ if not isLDAPUrl(ldap_url): raise ValueError,'Parameter ldap_url does not seem to be a LDAP URL.' scheme,rest = ldap_url.split('://',1) self.urlscheme = scheme.strip() if not self.urlscheme in ['ldap','ldaps','ldapi']: raise ValueError,'LDAP URL contains unsupported URL scheme %s.' % (self.urlscheme) slash_pos = rest.find('/') qemark_pos = rest.find('?') if (slash_pos==-1) and (qemark_pos==-1): # No / and ? found at all self.hostport = unquote(rest) self.dn = '' return else: if slash_pos!=-1 and (qemark_pos==-1 or (slash_pos<qemark_pos)): # Slash separates DN from hostport self.hostport = unquote(rest[:slash_pos]) # Eat the slash from rest rest = rest[slash_pos+1:] elif qemark_pos!=1 and (slash_pos==-1 or (slash_pos>qemark_pos)): # Question mark separates hostport from rest, DN is assumed to be empty self.hostport = unquote(rest[:qemark_pos]) # Do not eat question mark rest = rest[qemark_pos:] else: raise ValueError,'Something completely weird happened!' paramlist=rest.split('?',4) paramlist_len = len(paramlist) if paramlist_len>=1: self.dn = unquote(paramlist[0]).strip() if (paramlist_len>=2) and (paramlist[1]): self.attrs = unquote(paramlist[1].strip()).split(',') if paramlist_len>=3: scope = paramlist[2].strip() try: self.scope = SEARCH_SCOPE[scope] except KeyError: raise ValueError,"Search scope must be either one of base, one or sub. LDAP URL contained %s" % (repr(scope)) if paramlist_len>=4: filterstr = paramlist[3].strip() if not filterstr: self.filterstr = None else: self.filterstr = unquote(filterstr) if paramlist_len>=5: if paramlist[4]: self.extensions = LDAPUrlExtensions() self.extensions.parse(paramlist[4]) else: self.extensions = None return def applyDefaults(self,defaults): """ Apply defaults to all class attributes which are None. defaults Dictionary containing a mapping from class attributes to default values """ for k in defaults.keys(): if getattr(self,k) is None: setattr(self,k,defaults[k]) def initializeUrl(self): """ Returns LDAP URL suitable to be passed to ldap.initialize() """ if self.urlscheme=='ldapi': # hostport part might contain slashes when ldapi:// is used hostport = ldapUrlEscape(self.hostport) else: hostport = self.hostport return '%s://%s' % (self.urlscheme,hostport) def unparse(self): """ Returns LDAP URL depending on class attributes set. """ if self.attrs is None: attrs_str = '' else: attrs_str = ','.join(self.attrs) scope_str = SEARCH_SCOPE_STR[self.scope] if self.filterstr is None: filterstr = '' else: filterstr = ldapUrlEscape(self.filterstr) dn = ldapUrlEscape(self.dn) if self.urlscheme=='ldapi': # hostport part might contain slashes when ldapi:// is used hostport = ldapUrlEscape(self.hostport) else: hostport = self.hostport ldap_url = '%s://%s/%s?%s?%s?%s' % ( self.urlscheme, hostport,dn,attrs_str,scope_str,filterstr ) if self.extensions: ldap_url = ldap_url+'?'+self.extensions.unparse() return ldap_url def htmlHREF(self,urlPrefix='',hrefText=None,hrefTarget=None): """ Returns a string with HTML link for this LDAP URL. urlPrefix Prefix before LDAP URL (e.g. for addressing another web-based client) hrefText link text/description hrefTarget string added as link target attribute """ assert type(urlPrefix)==StringType, "urlPrefix must be StringType" if hrefText is None: hrefText = self.unparse() assert type(hrefText)==StringType, "hrefText must be StringType" if hrefTarget is None: target = '' else: assert type(hrefTarget)==StringType, "hrefTarget must be StringType" target = ' target="%s"' % hrefTarget return '<a%s href="%s%s">%s</a>' % ( target,urlPrefix,self.unparse(),hrefText ) def __str__(self): return self.unparse() def __repr__(self): return '<%s.%s instance at %s: %s>' % ( self.__class__.__module__, self.__class__.__name__, hex(id(self)), self.__dict__ ) def __getattr__(self,name): if self.attr2extype.has_key(name): extype = self.attr2extype[name] if self.extensions and \ self.extensions.has_key(extype) and \ not self.extensions[extype].exvalue is None: result = unquote(self.extensions[extype].exvalue) else: return None else: raise AttributeError,"%s has no attribute %s" % ( self.__class__.__name__,name ) return result # __getattr__() def __setattr__(self,name,value): if self.attr2extype.has_key(name): extype = self.attr2extype[name] if value is None: # A value of None means that extension is deleted delattr(self,name) elif value!=None: # Add appropriate extension self.extensions[extype] = LDAPUrlExtension( extype=extype,exvalue=unquote(value) ) else: self.__dict__[name] = value def __delattr__(self,name): if self.attr2extype.has_key(name): extype = self.attr2extype[name] if self.extensions: try: del self.extensions[extype] except KeyError: pass else: del self.__dict__[name]
Close