File tree Expand file tree Collapse file tree 1 file changed +17
-9
lines changed
modules/auxiliary/scanner/http Expand file tree Collapse file tree 1 file changed +17
-9
lines changed Original file line number Diff line number Diff line change @@ -55,20 +55,28 @@ def find_auth_uri
55
55
end
56
56
57
57
paths . each do |path |
58
- res = send_request_cgi ( {
59
- 'uri' => path ,
60
- 'method' => 'GET'
61
- } )
58
+ begin
59
+ res = send_request_cgi ( {
60
+ 'uri' => path ,
61
+ 'method' => 'GET'
62
+ } )
63
+ rescue ::Rex ::ConnectionError
64
+ next
65
+ end
62
66
63
67
next unless res
64
68
65
69
if res . redirect? && res . headers [ 'Location' ] && res . headers [ 'Location' ] !~ /^http/
66
70
path = res . headers [ 'Location' ]
67
71
vprint_status ( "#{ rhost } :#{ rport } - Following redirect: #{ path } " )
68
- res = send_request_cgi ( {
69
- 'uri' => path ,
70
- 'method' => 'GET'
71
- } )
72
+ begin
73
+ res = send_request_cgi ( {
74
+ 'uri' => path ,
75
+ 'method' => 'GET'
76
+ } )
77
+ rescue ::Rex ::ConnectionError
78
+ next
79
+ end
72
80
next unless res
73
81
end
74
82
@@ -205,7 +213,7 @@ def send_request_login(opts = {})
205
213
end
206
214
207
215
def determine_result ( response )
208
- return :abort unless response . kind_of? Rex ::Proto ::Http ::Response
216
+ return :abort unless response . kind_of? ( Rex ::Proto ::Http ::Response )
209
217
return :abort unless response . code
210
218
211
219
if [ 200 , 301 , 302 ] . include? ( response . code )
You can’t perform that action at this time.
0 commit comments