% ldapsearch -x -t -h ad.server.name cn=username msExchRecordedName
I get the binary contents of the msExchRecordedName attribute
successfully dumped to a file in /tmp. But here's where I get stuck.
This file seems to have no resemblance to an audio file.
It looks like this attribute is stored as a Unicode String (UTF-16LE),
with attributeSyntax 2.5.5.12 and oMSyntax 64. But I've tried using
iconv to convert this and no matter which formats I use, can't seem to
decode the original binary from this.
Can anyone help point me in the right direction here?
Thanks,
-Kartik
Figured it out. The binary contents of the msExchRecordedName attribute
are actually stored in UTF-8. The UTF-16LE values can be recovered with
this:
iconv -f utf-8 -t utf-16le msexchrecordedname.raw > recordedname.wav.base64
As the extension implies, the resulting UTF-16LE file is a base64 file
which can be decoded to reveal the WAV file. Problem solved!
-Kartik