strantheman
Programmer
Im new to Perl and this forum, but not Tek-Tips. I appreciate any help you guys can offer here, and will be checking back often. Im trying to get Perl to login to a HTTPS site and retrieve a CSV file. I have been unsuccessful because the site requires 128bit encryption and is refusing my attempt to login. Yes, all of my login info is accurate.
Here's exactly how im setup: Downloaded ActivePerl and installed on my dev server. [Win2k running IIS]. Ran PPM and installed Found a SSL solution at( and followed those steps. Started a file called spider.pl and began my logic.
1) $mech is my new object.
2) I set the agent_alias to 'Windows IE 6' so that the header of the request makes it look like IE 6 is hitting the server. (ive also set these parameters using an array but this works just as well)
3) $response is my attempt to read the login form page using $mech->get($url)
4) $mech->form_name("form") to choose the only form on the page
5) $mech->field(password=>"xxxxxxx") to fill in the text input named password with the value xxxxxxxx
6) Print $mech->response->status_line at the end to see what the response was.
7) And finally ouput the HTML of the following page with $mech->response->content.
If the form submit worked, I should see the first page of a framed website... I assume Id see the index file and the frame tags, not content from one of the frames. However, I get the site's generic "password not accepted" error page. The page is ambiguous and gives me no clue as to what went wrong, but after extensive testing on other sites and on my own web forms, Ive realized that my encryption standard is not compatible.
I have added the following SSL module ( to my Perl install. It allowed me to at least read HTTPS pages, like the login form. Without this I couldn't even read the form page. However, it doesn't seem to be enough to grant me the secure connection I need.
Any help here would be hot. Im totally lost. How do I get Perl to use the SSL 3.0 standard?
ty
Here's exactly how im setup: Downloaded ActivePerl and installed on my dev server. [Win2k running IIS]. Ran PPM and installed Found a SSL solution at( and followed those steps. Started a file called spider.pl and began my logic.
1) $mech is my new object.
2) I set the agent_alias to 'Windows IE 6' so that the header of the request makes it look like IE 6 is hitting the server. (ive also set these parameters using an array but this works just as well)
3) $response is my attempt to read the login form page using $mech->get($url)
4) $mech->form_name("form") to choose the only form on the page
5) $mech->field(password=>"xxxxxxx") to fill in the text input named password with the value xxxxxxxx
6) Print $mech->response->status_line at the end to see what the response was.
7) And finally ouput the HTML of the following page with $mech->response->content.
If the form submit worked, I should see the first page of a framed website... I assume Id see the index file and the frame tags, not content from one of the frames. However, I get the site's generic "password not accepted" error page. The page is ambiguous and gives me no clue as to what went wrong, but after extensive testing on other sites and on my own web forms, Ive realized that my encryption standard is not compatible.
I have added the following SSL module ( to my Perl install. It allowed me to at least read HTTPS pages, like the login form. Without this I couldn't even read the form page. However, it doesn't seem to be enough to grant me the secure connection I need.
Any help here would be hot. Im totally lost. How do I get Perl to use the SSL 3.0 standard?
Code:
# spider
use strict;
$|++;
use LWP 5.64;
use [URL unfurl="true"]WWW::Mechanize;[/URL]
my $mech = [URL unfurl="true"]WWW::Mechanize->new();[/URL]
$mech->agent_alias( 'Windows IE 6' );
##START
my $url = '[URL unfurl="true"]https://www.whatever.com';[/URL]
my $response = $mech->get($url);
##FORM
$mech->form_name( "form" );
$mech->field( password => "pass" );
$mech->submit();
$mech->success or die "post failed: ", $mech->response->status_line;
my $html = $mech->response->content;
print "$html";
ty