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

Discussion in 'Perl Misc' started by wqhflp@gmail.com, Jan 5, 2007.

  1. Guest

    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();
    , Jan 5, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    484
  2. Eric
    Replies:
    1
    Views:
    341
    Alexey Smirnov
    Apr 2, 2007
  3. rodrigo
    Replies:
    3
    Views:
    761
    Ryan Ginstrom
    Oct 15, 2007
  4. Shailesh Patel
    Replies:
    0
    Views:
    448
    Shailesh Patel
    Nov 8, 2006
  5. Paul
    Replies:
    2
    Views:
    112
Loading...

Share This Page