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.119.119.187
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 : dsml.py
""" dsml - generate and parse DSMLv1 data (see http://www.oasis-open.org/committees/dsml/) See http://www.python-ldap.org/ for details. $Id: dsml.py,v 1.27 2012/06/07 18:40:59 stroeder Exp $ Python compability note: Tested with Python 2.0+. """ __version__ = '2.4.10' import string,base64 special_entities = ( ('&','&'), ('<','<'), ('"','"'), ("'",'''), ) def replace_char(s): for char,entity in special_entities: s = string.replace(s,char,entity) return s class DSMLWriter: """ Class for writing LDAP entry records to a DSMLv1 file. Arguments: f File object for output. base64_attrs Attribute types to be base64-encoded. dsml_comment Text placed in comment lines behind <dsml:dsml>. indent String used for indentiation of next nested level. """ def __init__( self,f,base64_attrs=[],dsml_comment='',indent=' ' ): self._output_file = f self._base64_attrs = {}.fromkeys(map(string.lower,base64_attrs)) self._dsml_comment = dsml_comment self._indent = indent def _needs_base64_encoding(self,attr_type,attr_value): if self._base64_attrs: return self._base64_attrs.has_key(string.lower(attr_type)) else: try: unicode(attr_value,'utf-8') except UnicodeError: return 1 else: return 0 def writeHeader(self): """ Write the header """ self._output_file.write('\n'.join([ '<?xml version="1.0" encoding="UTF-8"?>', '<!DOCTYPE root PUBLIC "dsml.dtd" "http://www.dsml.org/1.0/dsml.dtd">', '<dsml:dsml xmlns:dsml="http://www.dsml.org/DSML">', '%s<dsml:directory-entries>\n' % (self._indent), ]) ) if self._dsml_comment: self._output_file.write('%s<!--\n' % (self._indent)) self._output_file.write('%s%s\n' % (self._indent,self._dsml_comment)) self._output_file.write('%s-->\n' % (self._indent)) def writeFooter(self): """ Write the footer """ self._output_file.write('%s</dsml:directory-entries>\n' % (self._indent)) self._output_file.write('</dsml:dsml>\n') def unparse(self,dn,entry): return self.writeRecord(dn,entry) def writeRecord(self,dn,entry): """ dn string-representation of distinguished name entry dictionary holding the LDAP entry {attr:data} """ # Write line dn: first self._output_file.write( '%s<dsml:entry dn="%s">\n' % ( self._indent*2,replace_char(dn) ) ) objectclasses = entry.get('objectclass',entry.get('objectClass',[])) self._output_file.write('%s<dsml:objectclass>\n' % (self._indent*3)) for oc in objectclasses: self._output_file.write('%s<dsml:oc-value>%s</dsml:oc-value>\n' % (self._indent*4,oc)) self._output_file.write('%s</dsml:objectclass>\n' % (self._indent*3)) attr_types = entry.keys()[:] try: attr_types.remove('objectclass') attr_types.remove('objectClass') except ValueError: pass attr_types.sort() for attr_type in attr_types: self._output_file.write('%s<dsml:attr name="%s">\n' % (self._indent*3,attr_type)) for attr_value_item in entry[attr_type]: needs_base64_encoding = self._needs_base64_encoding( attr_type,attr_value_item ) if needs_base64_encoding: attr_value_item = base64.encodestring(attr_value_item) else: attr_value_item = replace_char(attr_value_item) self._output_file.write('%s<dsml:value%s>\n' % ( self._indent*4, ' encoding="base64"'*needs_base64_encoding ) ) self._output_file.write('%s%s\n' % ( self._indent*5, attr_value_item ) ) self._output_file.write('%s</dsml:value>\n' % ( self._indent*4, ) ) self._output_file.write('%s</dsml:attr>\n' % (self._indent*3)) self._output_file.write('%s</dsml:entry>\n' % (self._indent*2)) return try: import xml.sax,xml.sax.handler except ImportError: pass else: class DSMLv1Handler(xml.sax.handler.ContentHandler): """ Content handler class for DSMLv1 """ def __init__(self,parser_instance): self._parser_instance = parser_instance xml.sax.handler.ContentHandler.__init__(self) def startDocument(self): pass def endDocument(self): pass def startElement(self,raw_name,attrs): assert raw_name.startswith(''),'Illegal name' name = raw_name[5:] if name=='dsml': pass elif name=='directory-entries': self._parsing_entries = 1 elif name=='entry': self._dn = attrs['dn'] self._entry = {} elif name=='attr': self._attr_type = attrs['name'].encode('utf-8') self._attr_values = [] elif name=='value': self._attr_value = '' self._base64_encoding = attrs.get('encoding','').lower()=='base64' # Handle object class tags elif name=='objectclass': self._object_classes = [] elif name=='oc-value': self._oc_value = '' # Unhandled tags else: raise ValueError,'Unknown tag %s' % (raw_name) def endElement(self,raw_name): assert raw_name.startswith('dsml:'),'Illegal name' name = raw_name[5:] if name=='dsml': pass elif name=='directory-entries': self._parsing_entries = 0 elif name=='entry': self._parser_instance.handle(self._dn,self._entry) del self._dn del self._entry elif name=='attr': self._entry[self._attr_type] = self._attr_values del self._attr_type del self._attr_values elif name=='value': if self._base64_encoding: attr_value = base64.decodestring(self._attr_value.strip()) else: attr_value = self._attr_value.strip().encode('utf-8') self._attr_values.append(attr_value) del attr_value del self._attr_value del self._base64_encoding # Handle object class tags elif name=='objectclass': self._entry['objectClass'] = self._object_classes del self._object_classes elif name=='oc-value': self._object_classes.append(self._oc_value.strip().encode('utf-8')) del self._oc_value # Unhandled tags else: raise ValueError,'Unknown tag %s' % (raw_name) def characters(self,ch): if self.__dict__.has_key('_oc_value'): self._oc_value = self._oc_value + ch elif self.__dict__.has_key('_attr_value'): self._attr_value = self._attr_value + ch else: pass class DSMLParser: """ Base class for a DSMLv1 parser. Applications should sub-class this class and override method handle() to implement something meaningful. Public class attributes: records_read Counter for records processed so far Arguments: input_file File-object to read the DSMLv1 input from ignored_attr_types Attributes with these attribute type names will be ignored. max_entries If non-zero specifies the maximum number of entries to be read from f. line_sep String used as line separator """ def __init__( self, input_file, ContentHandlerClass, ignored_attr_types=None, max_entries=0, ): self._input_file = input_file self._max_entries = max_entries self._ignored_attr_types = {}.fromkeys(map(string.lower,(ignored_attr_types or []))) self._current_record = None,None self.records_read = 0 self._parser = xml.sax.make_parser() self._parser.setFeature(xml.sax.handler.feature_namespaces,0) content_handler = ContentHandlerClass(self) self._parser.setContentHandler(content_handler) def handle(self,*args,**kwargs): """ Process a single DSMLv1 entry record. This method should be implemented by applications using DSMLParser. """ import pprint pprint.pprint(args) pprint.pprint(kwargs) def parse(self): """ Continously read and parse DSML records """ self._parser.parse(self._input_file)
Close