in reply to NTLM authentication with IIS 6
Have you tried
LWP::Authen::Ntlm? It seems like such a good fit.
#!/usr/bin/perl -l use strict; use warnings; use LWP::UserAgent; use HTTP::Request::Common; my $url = 'http://server:port/path/script.aspx'; my $user = 'domain\\user'; my $pass = 'password'; my $host = 'server:port'; my $ua = LWP::UserAgent->new( keep_alive => 1 ); $ua->credentials($host, '', $user, $pass); my $req = GET $url; my $response = $ua->request($req); if ($response->is_success) { printf " %s\n", $response->status_line; printf "\n\n\n" . $response->content(); } else { print "Something's not right... ->" . $response->code; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: NTLM authentication with IIS 6
by runrig (Abbot) on Apr 16, 2013 at 23:03 UTC | |
by mrlizard123 (Novice) on Apr 17, 2013 at 01:18 UTC | |
by runrig (Abbot) on Apr 17, 2013 at 06:14 UTC | |
by Anonymous Monk on Apr 17, 2013 at 02:22 UTC | |
Re^2: NTLM authentication with IIS 6
by mrlizard123 (Novice) on Apr 16, 2013 at 22:28 UTC | |
by padrino (Initiate) on Apr 21, 2013 at 14:31 UTC |
In Section
Seekers of Perl Wisdom