Solved

Getting web page from intranet using perl

Posted on 2011-09-30
2
810 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
use perl to insert into MySQL database 9 159
Merge files & delete row based on criteria using Perl. 1 105
perl getopt long help 34 84
Export Variables in Perl 3 104
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…
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
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…

756 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