Auto Clicker

By Ivanalicius on Mar 21, 2008

Auto Clicker with proxy support

#!/usr/bin/perl 
use LWP; 
use strict; 
use warnings; 

if(@ARGV < 2) { 
    die("[Autoclicker with proxy support]\n". 
    "Usage: webclicker.pl <site> <proxy file>\n"); 
} 

my $ua = LWP::UserAgent->new; 
$ua->timeout(60); 
my $site = $ARGV[0]; 
my $proxyfile = $ARGV[1]; 

open(DAT,$proxyfile) || die("Can't open proxy file"); 
my @proxys=<DAT> 
close(DAT); 

foreach my $proxy (@proxys) 
{ 
    chomp($proxy); 
    print "Clicking using $proxy..."; 
    $proxy = "http://".$proxy if ($proxy !~ m/http:\/\//); 
    $ua->proxy('http', $proxy); 
    if ($ua->get($site)->is_success) { 
        print "done.\n"; 
    } 
    else { 
        print "fail.\n"; 
    } 
} 

Comments

Sign in to comment.
atmost   -  Aug 18, 2009

what compiler should i use

 Respond  
Anish   -  Jul 26, 2009

a semi-colon is missing after in line 16
so , it should be

open(DAT,$proxyfile) || die("Can't open proxy file"); 
my @proxys=<DAT>; 
close(DAT); 
 Respond  
ntek   -  Oct 11, 2008

keep getting a syntax error: syntax error at webclicker.pl line 18, near "close"
Execution of webclicker.pl aborted due to compilation errors.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.