#!/usr/bin/perl #Usage : proxy.pl #Proxies should be in the format IP:Port #Working ones are printed to proxyworking.txt use LWP; if(@ARGV < 1) { print "\nUsage : proxy.pl \n"; print "Proxies should be in the format IP:Port\n"; print "Working ones are printed to proxyworking.txt\n"; exit; } $num = 1; $workingnum = 0; $ua = LWP::UserAgent->new; $ua->timeout(10); $site = "http://google.co.uk"; $proxyfile = $ARGV[0]; $working = "proxyworking.txt"; open(DAT,$proxyfile) || die("Can't open proxy file"); @proxys=; close(DAT); while (<>) {} $linetotal = "$."; system("CLS"); print "--++Proxy Checker by mainvoid++--\n\n"; foreach $proxy (@proxys) { chomp($proxy); print "$workingnum - $num/$linetotal\t\t$proxy"; $prox = "http://".$proxy if ($proxy !~ m/http:\/\//); $ua->proxy('http', $prox); if ($ua->get($site)->is_success) { print "\t\t\tworking\n"; open FILE, ">>$working" || print "\n [-]Can't write the file."; print FILE "$proxy\n"; close FILE; $workingnum++; } else { print "\n"; } $num++; }