Perl: ActiveState 5.6.1, OS: Windows 2000

Hi, I'm trying to get the contents of a webpage, but I can't get through my company's Microsoft Proxy server with Lwp::Useragent. The reason for this is that the Proxy server requires NTLM authentication. I am able to get around this problem if I install Winsock proxy client on my workstation or if I run the job from the proxy server. However, our Security Department wont allow this as a long term solution. I found a module called

Authen::NTLM

But, the documentation is geared towards IMAP. I also found some examples on this site, but I couldn't get it to work. I was hoping someone could point me to some good documentation for using Authen::NTLM with Lwp::Useragent or provide a simple example, such as...

use LWP::UserAgent; use HTTP::Request::Common; use Authen::NTLM; ntlm_reset(); ntlm_domain(Domain); ntlm_user(username); ntlm_password(password); # How does the ntlm functions tie in with Lwp methods? $ua = new LWP::UserAgent(); $ua->proxy('http','proxyserver'); $resp = $ua->request(GET "http://www.perl.com"); $htmcode=$resp->{_content}; print "here comes the output...\n$htmcode\n";

Any help would be much appreciated, thank you.
Mitch

In reply to Proxy NTLM Authentication by Mitch

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.