|
@@ -34,8 +34,8 @@ def print_sections(raw_result):
|
|
lines.append(chr(separator).join(['{}={}'.format(k,clean_value(decoded_value))]))
|
|
lines.append(chr(separator).join(['{}={}'.format(k,clean_value(decoded_value))]))
|
|
|
|
|
|
if lines:
|
|
if lines:
|
|
- print('<<<edirectory_monitor:sep({})>>>'.format(separator))
|
|
|
|
- print(chr(separator).join(lines))
|
|
|
|
|
|
+# print('<<<edirectory_monitor:sep({})>>>'.format(separator))
|
|
|
|
+ print('|'.join(lines))
|
|
|
|
|
|
def main():
|
|
def main():
|
|
args = sys.argv[1:]
|
|
args = sys.argv[1:]
|
|
@@ -83,8 +83,11 @@ def main():
|
|
elif result_type == ldap.RES_SEARCH_ENTRY:
|
|
elif result_type == ldap.RES_SEARCH_ENTRY:
|
|
result_set.append(result_data)
|
|
result_set.append(result_data)
|
|
|
|
|
|
- for i in range(len(result_set)):
|
|
|
|
- print_sections(result_set[i])
|
|
|
|
|
|
+# for i in range(len(result_set)):
|
|
|
|
+ print('<<<edirectory_monitor:sep(124)>>>')
|
|
|
|
+# print_sections(result_set[i])
|
|
|
|
+ print_sections(result_set)
|
|
|
|
+
|
|
|
|
|
|
except ldap.LDAPError as e:
|
|
except ldap.LDAPError as e:
|
|
print(f"LDAP search failed: {e}")
|
|
print(f"LDAP search failed: {e}")
|
|
@@ -94,3 +97,4 @@ def main():
|
|
|
|
|
|
if __name__ == "__main__":
|
|
if __name__ == "__main__":
|
|
main()
|
|
main()
|
|
|
|
+
|