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. Advertisements

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:
    547
  2. Eric
    Replies:
    1
    Views:
    523
    Alexey Smirnov
    Apr 2, 2007
  3. rodrigo
    Replies:
    3
    Views:
    985
    Ryan Ginstrom
    Oct 15, 2007
  4. Steve Kallal
    Replies:
    9
    Views:
    360
    Joe Kaplan \(MVP - ADSI\)
    Jun 9, 2005
  5. Replies:
    5
    Views:
    228
    Bob Barrows [MVP]
    Dec 1, 2005
  6. Charlotte
    Replies:
    3
    Views:
    280
    Anthony Jones
    Oct 3, 2007
  7. Sam S.
    Replies:
    2
    Views:
    301
    Tad McClellan
    Feb 9, 2005
  8. Paul
    Replies:
    2
    Views:
    686
Loading...