Proxy Checker

By Ivanalicius on Mar 01, 2008

Its my first Perl script, and maybe the code isnt trim... Probably better is to using Warnings

#!/usr/bin/perl -w

and reading of code need to be too elegant, portable way for script to work and on windows in a *nix platform, something like this:

open(PLIST, "proxy") or die;
foreach $i (<PLIST>) {
 ....
}

And i doesnt need to use WWW::Mechanize modul , but i like it! :lol:

#!/usr/bin/perl
#
use WWW::Mechanize;
@proxy=`cat proxy`;
foreach $i (@proxy) {
chomp($i);
my $go = WWW::Mechanize->new( agent=> "Mozilla/5.0" );
$go->proxy(&#91;'http'], 'http://'.$i.'/');
$go->get('http://www.whatismyip.com');
$match = $go->content;
# print "$match\n";
my($crap,$ip)=split(/^(.*):/,$i);print "$i -> ";
if ($match =~ m/(.*)Your IP Is $ip(.*)/ ) { print "Ok.\n";
open(LOG,">> proxy.log"); print LOG "$i\n"; close(LOG);
}
else { print "Nop\n"; }
} 

Comments

Sign in to comment.
CodeProphet   -  Feb 26, 2009

ripped

 Respond  
Joshuaxiong1   -  Nov 11, 2008

Anyway you're beautiful.

 Respond  
Joshuaxiong1   -  Oct 19, 2008

Number found where operator expected at C:\Perl\bin\kkk.pl line 8, near "&#91"
(Missing operator before 91?)
syntax error at C:\Perl\bin\kkk.pl line 8, near "&#91"
Unmatched right curly bracket at C:\Perl\bin\kkk.pl line 17, at end of line
Execution of C:\Perl\bin\kkk.pl aborted due to compilation errors.

C:\Perl\bin>

 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.