Changeset 650


Ignore:
Timestamp:
01/22/12 00:19:03 (16 months ago)
Author:
recon
Message:

Better settings URL, improved advanced anti-throttling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trollforge/users/recon/gmail stuff/sig_changer.pl

    r596 r650  
    88# Gmail Settings 
    99my $gmailURL = 'https://mail.google.com/mail/x/mog-/gp/?source=mog&gl=us'; 
    10 my $gmailSettingsURL = 'http://mail.google.com/mail/h/'; 
     10my $gmailSettingsURL = 'http://mail.google.com/mail/h/?&v=prg'; 
    1111my $signature = $ARGV[0]; 
    1212 
     
    2929        $mech->cookie_jar(HTTP::Cookies->new()); 
    3030        $mech->agent_alias('Windows Mozilla'); 
     31        sleep(int(rand(5))); #advanced anti-throttling technique 
    3132        $mech->get($gmailURL); 
    3233        $mech->form_name('gaia_loginform'); 
    3334        $mech->field ('Email' => $email); 
    3435        $mech->field ('Passwd' => $password); 
    35         print "$email... "; 
     36        print "Trying $email... "; 
    3637        $mech->submit(); # Login 
    3738 
     
    4142                $pm->finish; 
    4243        } else { 
    43                 print "Success!\n"; 
     44                print "Success! "; 
    4445        } 
    4546 
    46         sleep(1); #advanced anti-throttling technique 
     47        sleep(int(rand(5))); #advanced anti-throttling technique 
    4748 
    4849        # Go to HTML settings page to change signature 
    4950        $mech->get($gmailSettingsURL); 
    50         $mech->follow_link(text => 'Settings'); 
    5151        $mech->form_number(2); 
    52         $mech->field('dp' => ''); 
    5352        $mech->field('p_sx_sg' => $signature); 
    5453        $mech->click('nvp_a_prefs'); 
    55  
     54        print "signature changed\n"; #LOL should probably check for m/saved/ but lazy  
    5655        $pm->finish; 
    5756} 
Note: See TracChangeset for help on using the changeset viewer.