Skip to content

Instantly share code, notes, and snippets.

@vkushnir
Forked from tsuchm/ldapsearch.sh
Created April 3, 2023 13:00
Show Gist options
  • Save vkushnir/5d4f5477f5889d53717739a130f1384b to your computer and use it in GitHub Desktop.
Save vkushnir/5d4f5477f5889d53717739a130f1384b to your computer and use it in GitHub Desktop.
ldapsearch with Base64 decode
#!/bin/sh
/usr/bin/ldapsearch -o ldif-wrap=no "$@" | perl -MMIME::Base64 -Mutf8 -pe 's/^([-a-zA-Z0-9;]+):(:\s+)(\S+)$/$1.$2.&decode_base64($3)/e'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment