¶ Python Usefull Libraries and and Scripts
python3
import ldap3
server=ldap3.Server('target'), get_info=ldap3.ALL,port=targetport
connection=ldap3.Connection(server)
connection.bind
# You Should recieve a true, if false check info and try again
server.info
# once receiving the naming context we can make more queries
connection.search(search_base='DC=domain,DC=com',search_filter='(&objectclass=*))',search_scope='SUBTREE', attributes='*')
connection.entries
# this will retrieve all directory objects
connection.search(search_base='DC=domain,DC=com',search_filter='(&objectclass=person))',search_scope'SUBTREE', attributes'userpassword')
connection.entries