Permalink
Browse files

added proxy tools generation script

  • Loading branch information...
urule99
urule99 committed Aug 9, 2010
1 parent d1f2514 commit c2603680e0e8130be620f16a8ac263901a91cdb4
Showing with 29 additions and 0 deletions.
  1. +29 −0 tools/getCurrentProxies.pl
View
@@ -0,0 +1,29 @@
#!/usr/bin/perl -w
use LWP::Simple;
use LWP::UserAgent;
use HTTP::Request::Common;
my $ua = new LWP::UserAgent;
$ua->agent("Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1");
my $req = new HTTP::Request GET => 'http://www.malwaregroup.com/Proxies';
my $res = $ua->request($req);
my $proxies = $res->content;
open (STDOUT, ">> proxies.txt");
if (defined $proxies){
@data = $proxies;
foreach $line (@data){
if ($line =~ /\">([\d\.]{7,}.*?)\<\/a\>\<\/td\>\s\<td\>(.*?)\<\/td\>/i){
while ($line =~ m/\">([\d\.]{7,}.*?)\<\/a\>\<\/td\>\s\<td\>(.*?)\<\/td\>/ig){
print "$1:$2,";
}
} else {
print "Fail\n";
}
}
}

0 comments on commit c260368

Please sign in to comment.