Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env perl
- # autoflush the output by turning buffering off
- $|++;
- use strict;
- use warnings;
- use WWW::Mechanize;
- my $uid = '';
- my $pass = '';
- my $url = 'https://my.xsusenet.com/';
- my $mech = WWW::Mechanize->new( agent => 'Mozilla/5.0 (X11 Ubuntu Linux x86_64 rv 14.0) Gecko/20100101 Firefox/14.0.1' );
- $mech->cookie_jar(HTTP::Cookies->new());
- $mech->get($url);
- my @forms = $mech->forms;
- $mech->set_fields (
- 'email' => $uid,
- 'password' => $pass );
- my $resp = $mech->submit();
- my $status = $mech->status();
- my $output_page = $mech->content();
- while (defined $mech->find_link( url_abs_regex => qr{prolong}) && $status == 200) {
- $mech->follow_link(url_regex => qr/prolong/i);
- $status = $mech->status();
- }
Advertisement
Add Comment
Please, Sign In to add comment