Saturday, October 07, 2006

Server Probing

Here is Server Probing script from somewhere, pretty nice...
Of course, Server Spy can do this , but the idea basically functions the same
perl $0 > server

#!/usr/bin/perl -W
use strict;
use IO::Socket;

my @hosts=qw(www.google.com www.foundstone);

sub go{
my $server=shift;
print "Processing Server probing ...\n";
my $socket=new IO::Socket::INET(PeerAddr=$server,
PeerPort='80';
Proto='tcp');
$socket or die "\n unable to connect to the $_:$!";
print $socket "GET / HTTP/1.1\r\n\r\n";
while($socket){
if(/^Server:\s*(.*)/){
print "$server:$1\n";
last;
}
}
}

foreach(@hosts){
go $_;
}

1 comment:

Anonymous said...

Security very nice blog!
would it make fun for you to make money in the Internet?
yes?
more information
www-franco.blogspot.com
see the video