#!/usr/bin/perl use LWP::Simple qw($ua get); $ua = LWP::UserAgent->new; $ua->agent('Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.9'); &rficheck("rfis.txt"); sub rficheck($){ $resultfile = $_[0]; open(rfis,"<$resultfile\n") || die "Couldn't open $resultfile\n"; while(){ my $line = $_; chomp($line); print "[-] Checking $line\n"; $response = $ua->get($line); if($response->is_success){ if($response->content =~ m/(.*?)safe(.*?)/i){ open(LOG,">>$resultfile" . "-found.txt") || die "Couldn't open $resultfile" . "-found\n"; print LOG "$line\n"; close(LOG); } } } }