Hello ,
i have wrote the following code wich works good , but slow too much ... i need your sugestions to improve it
#!/usr/bin/perl -w use strict; use HTTP::Request; use LWP::UserAgent; if(not $ARGV[0] or $ARGV[0]!~/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/){die + "usage : perl $0 IP";} my @ports = qw/80 8080 3128/; my $ip = $ARGV[0]; my $ua = LWP::UserAgent->new; $ua->timeout(3); foreach my $port(@ports){ print "Checking IP $ip with port $port \n"; $ua->proxy('http','http://'.$ip.':'.$port); my $request = HTTP::Request->new(GET =>'http://www.yahoo.com/'); my $response = $ua->request($request); print $response->code,"\n"; }
Regards,
Ahmad
In reply to Detect Open Proxies by ahmad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |