via https://www.reddit.com/r/Sysadmin_Fr/comments/86pv54/using_curl_for_querying_active_directory_ldap/