Make your own free website on Tripod.com
login.pl

 
This is how you can log into sites!!!

 1  #!/usr/bin/perl -w
 2  use LWP::UserAgent;
 3  use HTTP::Cookies;
 4  $browser = LWP::UserAgent->new;
 5  $browser->proxy('http', 'http://proxy:8080/');
 6  $cookie_jar=HTTP::Cookies->new(file => "cookie_file",autosave => 1, ignore_discard=>1 );
 7  $browser->cookie_jar($cookie_jar);
 8  my @ns_headers = (
 9     'User-Agent' => 'Mozilla/4.76 [en] (Win98; U)',
10     'Accept' => 'image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*',
11     'Accept-Charset' => 'iso-8859-1,*,utf-8',
12     'Accept-Language' => 'en-US',
13    );
14
15  $res=$browser->post(
16                  "http://LOGIN",
17                  [
18                  usr=>'username',
19                  pwd=>'password'
20                  ],
21                  @ns_headers
22                  );
23  print $res->content;
24  exit;
25
26
27
28  $res=$browser->get(
29  "URL OF THE COOKIE HUNGRY RESOURCE",
30  @ns_headers
31  );
32
33  print $res->content;