BBQ has asked for the wisdom of the Perl Monks concerning the following question:
Would anyone care to take a stab at a best approach to doing this? Use sockets and a while on the file handle?#!/usr/bin/perl # What The Server Is RUNning # get the server make (and maybe OS) by GETting # a simple query via http... if (!$ARGV[0]) { print "Usage: witsirun.pl [host] [port]\n"; } else { $ARGV[1] = 80 if ! $ARGV[1]; print "Getting "; print `echo 'GET / HTTP/1.0\n' | netcat $ARGV[0] $ARGV[1] | grep '^S +erver:'`; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: What The Server Is RUNning
by httptech (Chaplain) on Apr 23, 2000 at 04:26 UTC | |
by BBQ (Curate) on Apr 23, 2000 at 04:36 UTC |