
www.syngress.com
408 Chapter 12 • Automating Google Searches
"apache","//","not found for:","OPTIONS","By sending an OPTIONS request for
/, the physical path to PHP can be revealed."
The following is our developed source code to scan a particular site using the
signatures housed within CIRT’s NIKTO database.
SOURCE
#!/usr/bin/perl -w
use IO::Socket;
$server = 'www.google.com';
$port = 80;
#############################
sub socketInit()
{
$socket = IO::Socket::INET->new(
Proto => 'tcp',
PeerAddr => $server,
PeerPort => $port,
Timeout => 10,
);
unless($socket)
{
die("Could not connect to $server:$port");
}
$socket->autoflush(1);
}
############################
sub sendQuery($) ...