Home  Services  Contact  Projects  Whitepapers  Tools 


use LWP::UserAgent;
use HTTP::Request;
use HTTP::Response;
use HTTP::Status;

($ARGV[0]) || die "usage: coptions.pl <proxy> <cgi-file> <host>\n";

$http="http://";
$cache=$ARGV[0];
$host=$ARGV[2];
$proxy=$http.$cache;

open (CGI_FILE, "< $ARGV[1]") || print "$ARGV[1]", "what???\n";

print ("use proxy ", $proxy, "\n");

my $user_agent = new LWP::UserAgent;
if ($cache ne 'none') {
$user_agent->proxy('http', $proxy);
}

while (<CGI_FILE>) {
my $option = $_;
$option =~ s/\n//g;

if ($host !~ /http/){
$getti=$http.$host;
}else{
$getti=$host;
}

$getti =~ s/\n//;
my $request = new HTTP::Request('GET', $getti);
my $response = $user_agent->request($request);

if ($response->is_success) {
my $fico = $response->content();
my $sreq = new HTTP::Request('GET', $getti."&".$option);
my $sres = $user_agent->request($sreq);

if ($response->content() ne $sres->content()){
print $getti."&".$option." -> ".$response->code()," *** check THIS ***\n";
} else {
print $getti."&".$option." -> ".$response->code(),"\n";
}
} else {
print $getti."&".$option." -> ".$response->code(),"\n";
}

} ### end loop
print ("\ngame over \n");


Home  Services  Contact  Projects  Whitepapers  Tools