Posted on 2009-06-27 11:33:00-07 by jgormley
Help with Login Script - Input type image
I can't figure out why this is not working... It is a login page where it is submitted by the on_click of a input field of type image. If this example could get "Your username or password is incorrect." in the response... Then it should work with a valid login... Any help would be greatly appreciated....
#!/usr/bin/perl use warnings; use strict; use WWW::Mechanize; my $username = 'fakename'; my $password = 'fakepassword'; my $url = 'http://www.betterinvesting.org/Members'; my $mech = WWW::Mechanize->new(autocheck => 1); $mech->get( $url ); $mech->form_name("aspnetForm"); $mech->field('ct100$ContentPlaceHolder1$UserName', $username); $mech->field('ct100$ContentPlaceHolder1$Password', $password); $mech->click('ctl00$ContentPlaceHolder1$LoginButton'); print $mech->content();
Direct Responses: 11067 | Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.