NAME
Net::Scan::HTTP::Server::Directory - scan for directory on a web server
SYNOPSIS
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;
}
DESCRIPTION
This module permit to scan for directory on a web server.
METHODS
new
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 :
- port
-
Remote port. Default is 80;
- timeout
-
Default is 8 seconds;
- http_version
-
Set the HTTP protocol version. Default is '1.1'.
- user_agent
-
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
-
Directory to search on web server. Default is '/';
- debug
-
Set to 1 enable debug. Debug displays "connection refused" when an HTTP server is unrecheable. Default is 0;
scan
Scan the target.
$scan->scan;
NOTES
1xx: Informational
2xx: Success
3xx: Redirection
4xx: Client error
5xx: Server error
SEE ALSO
RFC 1945, RFC 2068, RFC 2616
LW2 http://www.wiretrip.net/rfp/lw.asp
AUTHOR
Matteo Cantoni, <mcantoni@cpan.org>
COPYRIGHT AND LICENSE
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