How can I use the password and username stored in cookie files to access the web automatically

W

wqhflp

To access some websites, not only the username/pwd is need, but also a
field need to fill based on a randomly generated digitals/letters on an
image(this will prevent the automatically account creating, such as
when creating the MSN account, the website will ask us to fill that
kind of data).

When I first accessed the website using firefox or IE, I must fill the
username/pwd and that kind of field. And if I close the browser and
open it a second time to view the same website, there is no need for me
to fill username/pwd which means firefox/IE can use the cookie to
access it. And I tried to use the cookie using be IE by model
HTTP::Cookies::Microsoft in the code, but the response from the web
server still can NOT recogize that I already logged in.


my $cookie_jar = HTTP::Cookies::Microsoft->new(
file => "$cookies_dir\\index.dat",
'delayload' => 0,
);
my $mech=WWW::Mechanize->new(cookie_jar=>$cookie_jar);
$mech->get("http://bbs1.21our.com/");
$mech->cookie_jar($cookie_jar);
die "Can't evan get the home pages" unless $mech->success;
my $output_page=$mech->content();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top