use LWP::UserAgent; use strict; my $agent = new LWP::UserAgent; $agent->agent("RDFmilla/0.1"); my $base = "192.168.0."; # change this according to local preference for my $ip (1 .. 255) { print "Trying $base$ip "; my $req = new HTTP::Request GET => "http://$base$ip/"; my $result = $agent->request($req); if ($result->is_success) { print "valid HTTP reply from $base$ip\n"; } else { print "no reply\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Find all webservers on local domain
by split (Initiate) on Mar 27, 2002 at 17:17 UTC | |
by rdfield (Priest) on Mar 28, 2002 at 10:34 UTC | |
by split (Initiate) on Mar 28, 2002 at 17:14 UTC |