jamesjyu has asked for the wisdom of the Perl Monks concerning the following question:
But this returns nothing in the contents (but it does not error, which leads me to believe that it logged in correctly). When I login with my real browser, the POST redirects me to a new page at https://www.mbnanetaccess.com/NASApp/NetAccess/RegisteredAccountsDisplay?&ehn=670 which is where I want to extract some information. However, I'm unsure about how this redirect is passed down to the browser. Also, there must some sort of secure session state that is carried along, but again, I'm not sure where it is. Is there some tool that will allow me to see the primitive GETS, POSTS, session states etc. when I login with my real browser? So that I can mimic this with perl? Anyone have other suggestions?$url = "https://www.mbnanetaccess.com/NASApp/NetAccess/Login"; $browser = LWP::UserAgent->new(); $browser->timeout(10); @fields = [username => 'myusername', password => 'mypassword' ]; my $response = $browser->post($url,@fields); if ($response->is_error()) { printf "Error!"; printf "%s\n", $response->status_line; } $contents = $response->content(); print $contents;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Secure Sessions and HTTPS
by Codon (Friar) on Dec 13, 2005 at 21:53 UTC | |
by jamesjyu (Acolyte) on Dec 13, 2005 at 22:21 UTC | |
Re: Secure Sessions and HTTPS
by Anonymous Monk on Dec 13, 2005 at 22:38 UTC |