File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
modules/auxiliary/admin/http Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 2
2
require 'stringio'
3
3
4
4
class MetasploitModule < Msf ::Auxiliary
5
- #Rank = ExcellentRanking
6
5
include Msf ::Exploit ::Remote ::HttpClient
7
6
8
7
def initialize ( info = { } )
@@ -62,7 +61,7 @@ def inflate_parse(data)
62
61
while index < parse_data . length
63
62
index , filename = process_data ( index , parse_data )
64
63
index , directory = process_data ( index , parse_data )
65
- remote_files += directory + '\\' + filename + "\n "
64
+ remote_files << directory + '\\' + filename + "\n "
66
65
67
66
#skip FFFFFFFFFFFFFFFF
68
67
index += 8
@@ -72,10 +71,16 @@ def inflate_parse(data)
72
71
end
73
72
74
73
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
79
84
if res && res . code == 200
80
85
if target_uri . path =~ /fileIndex\. db/i
81
86
inflate_parse ( res . body )
You can’t perform that action at this time.
0 commit comments