06.12.2004 10:47

Automatic NTLM Authentication using Perl

Since Friday I tried to automatically parse the output of Microsofts
Certification Services via HTTP because I need to forward the generated
challenge password to my automated certificate enrollment procedure.
Looking back, it was a little bit tricky after all. I had to consider
several things that I want to summarize in this article. Maybe it can be
useful to anyone.

First of all, you have to install libwww-perl [DEB] and the Authen::NTLM [EN] Perl Module from CPAN. For the latest version of this module consult the CPAN-shell (perl -e shell -MCPAN 'install Authen::NTLM').

The Output of microsoft's certification service is encoded as UTF-16LE, so
you have to decode it. I don't know, if it's encoded everywhere the same,
so be sure to check which encoding you get with your browser.