in reply to Re: Loging into a website using javascript for login
in thread Loging into a website using javascript for login
<META HTTP-EQUIV="Refresh" CONTENT="0;URL=https://secure2.playboy.com/ +security/cookieGenerator.do"> <html> <body bgcolor="#000000" > </body> </html>
#!/usr/bin/perl use HTTP::Cookies; use WWW::Mechanize; use strict; use warnings; use diagnostics; use LWP::Debug qw(+); #Shows the transaction taking place my $start_page = 'https://secure2.playboy.com/security/loginStart.do?s +c_target=cyber.playboy.com'; my $mech = WWW::Mechanize->new( agent=>"Mozilla/5.0 (X11; U; Linux i68 +6; en-US; rv:1.7) Gecko/20040918 Firefox/0.9.3 " ); my $cookie_jar = HTTP::Cookies->new(file => './lwp_cookies.dat', autos +ave => 1,); #Creating a cookie jar $mech->cookie_jar($cookie_jar); #Attaching cookie jar to the user agen +t i.e $mech $mech->get( $start_page ); if ($mech->success()==1) { print "Success \n"; } $mech->submit_form( form_name => 'loginForm', fields => { username => 'xxxx', password => 'xxxx', savedPWAction => 'on', } ); if ($mech->success()==1) { print "Success \n"; } print $mech->content(); my $member_gateway='https://secure2.playboy.com/gateway/gateway.do '; $mech->get($member_gateway); print $mech->content();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Loging into a website using javascript for login
by Kanji (Parson) on Sep 27, 2004 at 16:30 UTC | |
by homer123 (Initiate) on Sep 27, 2004 at 18:05 UTC | |
by Kanji (Parson) on Sep 27, 2004 at 20:30 UTC |