My output:#!C:/perl/bin/perl.exe use LWP::UserAgent; use LWP::Debug qw(+); use HTTP::Request::Common; my $url= 'http://punsez138451d/L3NOCALM/default.aspx'; my $ua = new LWP::UserAgent(keep_alive => 1); $ua->credentials('punsez138451d:80','',"MYDOMAIN\\username",'password' +); $request = GET $url; print "--Performing request now...------------------\n"; $response = $ua->request($request); print "--Done with request---------------------------\n"; if( $response->is_success) { print $response->content; } else {perl print 'Error: ', $response->status_line, "\n"; print "===== Request Headers =====\n"; print $response->headers->as_string; print "\n===== Response Headers ====\n"; print $response->headers->as_string; print "\n===== Response Content ====\n"; print $response->content; exit 1; } $contents = $response -> content(); #print $response->status_line(), "\n"; #print $response->headers()->as_string();
Any help will be greatly appreciated!!!C:\Documents and Settings\venkatesan_G02\Desktop>perl lwp_test.pl LWP::UserAgent::new: () --Performing request now...------------------ LWP::UserAgent::request: () LWP::UserAgent::send_request: GET http://punsez138451d/L3NOCALM/defaul +t.aspx LWP::UserAgent::_need_proxy: Not proxied LWP::Protocol::http::request: () LWP::Protocol::collect: read 762 bytes LWP::Protocol::collect: read 894 bytes LWP::Protocol::http::request: Keep the http connection to punsez138451 +d:80 LWP::UserAgent::request: Simple response: Unauthorized LWP::Authen::Ntlm::authenticate: authenticate() has been called LWP::Authen::Ntlm::authenticate: In first phase of NTLM authentication LWP::Authen::Ntlm::authenticate: Returning response object with auth h +eader: Authorization NTLM TlRMTVNTUAABAAAAB7IAAA4ADgAgAAAACQAJAC4AAAB2ZW5rYXR +lc2FuX0cwM klORkxFVkVMMw== LWP::UserAgent::request: () LWP::UserAgent::send_request: GET http://punsez138451d/L3NOCALM/defaul +t.aspx LWP::UserAgent::_need_proxy: Not proxied LWP::Protocol::http::request: () LWP::Protocol::collect: read 100 bytes LWP::UserAgent::request: Simple response: Internal Server Error --Done with request--------------------------- Error: 500 Internal Server Error ===== Request Headers ===== Connection: close Date: Mon, 13 Apr 2009 18:15:25 GMT Server: Microsoft-IIS/6.0 Content-Length: 100 Content-Type: text/html Client-Date: Mon, 13 Apr 2009 18:15:19 GMT Client-Peer: 4.33.37.49:80 Client-Response-Num: 2 MicrosoftSharePointTeamServices: 12.0.0.4518 Title: Error X-Powered-By: ASP.NET ===== Response Headers ==== Connection: close Date: Mon, 13 Apr 2009 18:15:25 GMT Server: Microsoft-IIS/6.0 Content-Length: 100 Content-Type: text/html Client-Date: Mon, 13 Apr 2009 18:15:19 GMT Client-Peer: 4.33.37.49:80 Client-Response-Num: 2 MicrosoftSharePointTeamServices: 12.0.0.4518 Title: Error X-Powered-By: ASP.NET ===== Response Content ==== <html><head><title>Error</title></head><body>The function requested is + not suppo rted </body></html>
In reply to Re^3: More NTLM
by Anonymous Monk
in thread More NTLM
by j.goor
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |