
Net::Scan::HTTP::Server::Directory - scan for directory on a web server

use Net::Scan::HTTP::Server::Directory;
my $host = $ARGV[0];
my @directory = ("test","foo","bar");
foreach(@directory){
scan($host,$_);
}
sub scan{
my ($host,$directory) = @_;
my $scan = Net::Scan::HTTP::Server::Directory->new({
host => $host,
directory => $directory,
timeout => 5
});
my $results = $scan->scan;
print "$host $results\n" if $results;
}

This module permit to scan for directory on a web server.

The constructor. Given a host returns a Net::Scan::HTTP::Server::Directory object:
my $scan = Net::Scan::HTTP::Server::Directory->new({
host => '127.0.0.1',
port => 80,
timeout => 5,
http_version => '1.1',
user_agent => 'Mozilla/5.0',
directory => 'directory',
debug => 0
});
Optionally, you can also specify :
Remote port. Default is 80;
Default is 8 seconds;
Set the HTTP protocol version. Default is '1.1'.
Set the product token that is used to identify the user agent on the network. The agent value is sent as the "User-Agent" header in the requests. Default is 'Mozilla/5.0'.
Directory to search on web server. Default is '/';
Set to 1 enable debug. Debug displays "connection refused" when an HTTP server is unrecheable. Default is 0;
Scan the target.
$scan->scan;

1xx: Informational
2xx: Success
3xx: Redirection
4xx: Client error
5xx: Server error

RFC 1945, RFC 2068, RFC 2616
LW2 http://www.wiretrip.net/rfp/lw.asp

Matteo Cantoni, <mcantoni@cpan.org>

You may distribute this module under the terms of the Artistic license. See Copying file in the source distribution archive.
Copyright (c) 2006, Matteo Cantoni