[Buffalo-pm] LWP help request

Jason Parker-Burlingham jasonp at panix.com
Wed Jul 30 23:16:52 CDT 2003

Jesse L Farinacci <jlf27 at cse.Buffalo.EDU> writes:

> my $url = 'https://manage1.sprintpcs.com/Manage?target=MyCurrentUsage&action=current_usage';
> my $ua = LWP::UserAgent->new;
> my $req = HTTP::Request->new(GET => $url);
> $req->authorization_basic(PHONE_NBR, PASSWORD);
> my $res = $ua->request($req);

I think I *do* remember some problems getting basic authorization
working over HTTPS some years ago when I was working on a HotMail
harvester.  Sadly I seem to have deleted that project.

> i've got the LWP with SSL properly configured, i've tested this out with
> other https pages and it's working fine.

I assume the other pages don't use basic authorization?  Could you set
up a small test area to work with?

> i'm not sure if it is even possible for me to POST to the main page,
> then while still within that UserAgent to request the usage page ::
> perhaps the uname / pword authentication will have passed from the
> POST and remain within the context of the UA??  maybe i'm grasping
> at straws..

You *may* want to have a look at the WWW::Mechanize::Shell module from
CPAN.  I've been toying with it for the last few hours and have been
having pretty good success, although...  Well.  Here's the problem:

   [0]henry at freezer:henry $ perl -MWWW::Mechanize::Shell -eshell
   Module File::Modified not found. Automatic reloading disabled.
   >get http://heavens-above.com/
   Retrieving http://heavens-above.com/(200)
   [0] Return to main menu page
   [1] Advertisement
   [2] here
   [3] here
   [4] log-on
   [5] Register
   [6] Select
   [7] Enter
   [8] Chris Peat
   [9] FAQ
   [10] GSOC Home Page
   http://heavens-above.com/>open 4
   Form [1]
   POST http://heavens-above.com/processlogon.asp
     UserName=<UNDEF>                (textbox) 
     Password=                       (password) 
     Remember=<UNDEF>                (checkbox) [*<UNDEF>|1]
     <NONAME>=Submit                 (submit)  
   (textbox)UserName> [] nooks
   (password)Password> [] NotMyPassword
   (checkbox)Remember> [] 1

For some reason trying to set the UserName parameter doesn't seem to
be sent to the server correctly.  But this sounds like a pretty bad
failure of WWW::Mechanize::Shell.  I'm checking the module is properly
installed now but I wonder if any list members have ideas?

Stay up-to-date on what I'm doing lately:

More information about the Buffalo-pm mailing list