Solved

Getting web page from intranet using perl

Posted on 2011-09-30
2
814 Views
Last Modified: 2012-05-12

I am attempting to download an intranet page using lwp::userAgent. I have tried a number of different approaches including using Authen-NTLM-HTTP but I appear to be unable to get authorization or I get page not found.
I am able to access pages through R using --internet2.dll which uses existing internet explorer settings.
Error messages:

Server: Microsoft-IIS/6.0
WWW-Authenticate: Negotiate
WWW-Authenticate: NTLM
Content-Length: 1656
Content-Type: text/html
Content-Type: text/html; charset=Windows-1252
Client-Date: Fri, 30 Sep 2011 13:33:52 GMT
Client-Peer: 166.14.6.18:80
Client-Response-Num: 2
Client-Warning: Unsupported authentication scheme 'ntlm'
Proxy-Connection: Keep-Alive
Proxy-Support: Session-based-authentication
Title: You are not authorized to view this page
X-Powered-By: ASP.NET


Code Summary:



use LWP::UserAgent;
use HTTP::Request::Common;
$ua = new LWP::UserAgent(keep_alive=>1);
$ua -> proxy ('http', 'myproxy')
$ua->agent("Mozilla/6.0");
$ua->credentials(a,b,c,d);
$req = GET 'http://url";
0
Comment
Question by:benwilkinson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 9

Accepted Solution

by:
Suhas . earned 500 total points
ID: 36892168
Try the module Win32::IEAutomation , if you can use Internet Explorer
0
 
LVL 23

Expert Comment

by:nemws1
ID: 36892608
There is a discussion, along with a solution and code examples using LWP::Authen::Ntlm here:

  http://www.linuxquestions.org/questions/programming-9/perl-with-lwp-and-ntlm-621296/
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question