Python script for data extraction from LDAP v2/v3