Add PATH option. Feature #5412

git-svn-id: file:///home/svn/framework3/trunk@14067 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Wei Chen 2011-10-25 18:32:02 +00:00
parent 5ce859d3ad
commit ab4f9d65c7
2 changed files with 10 additions and 3 deletions

View File

@ -31,13 +31,17 @@ class Metasploit3 < Msf::Auxiliary
'License' => MSF_LICENSE
)
register_options(
[
OptString.new('PATH', [true, "Path to use", '/']),
], self.class)
end
def run_host(target_host)
begin
res = send_request_raw({
'uri' => '/',
'uri' => datastore['PATH'],
'method' => 'OPTIONS'
}, 10)

View File

@ -31,13 +31,17 @@ class Metasploit3 < Msf::Auxiliary
'License' => MSF_LICENSE
)
register_options(
[
OptString.new('PATH', [true, "Path to use", '/']),
], self.class)
end
def run_host(target_host)
begin
res = send_request_cgi({
'uri' => '/',
'uri' => datastore['PATH'],
'method' => 'PROPFIND',
'data' => '',
'ctype' => 'text/xml',
@ -54,7 +58,6 @@ class Metasploit3 < Msf::Auxiliary
result = res.body.scan(urlregex).uniq
result.each do |u|
print_status("Found file or directory in WebDAV response (#{target_host}) #{u}")