File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
modules/auxiliary/admin/http Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -99,15 +99,23 @@ def run
99
99
} , 25 )
100
100
101
101
rescue ::Rex ::ConnectionRefused , ::Rex ::HostUnreachable , ::Rex ::ConnectionTimeout
102
+ return
102
103
rescue ::Timeout ::Error , ::Errno ::EPIPE => e
103
104
print_error ( e . message )
105
+ return
106
+ end
107
+
108
+ if file . nil?
109
+ print_error ( "Connection timed out" )
110
+ return
104
111
end
105
112
106
113
if ( ( counter . to_f /queue . length . to_f ) *100.0 ) . to_s =~ /\d 0.0$/ # Display percentage complete every 10%
107
114
percentage = ( counter . to_f /queue . length . to_f ) *100.0
108
115
print_status ( "Requests #{ percentage . to_i } % complete - [#{ counter } / #{ queue . length } ]" )
109
116
end
110
117
118
+ # file can be nil
111
119
case file . headers [ 'Content-Type' ]
112
120
when 'text/html'
113
121
case file . body
You can’t perform that action at this time.
0 commit comments