Skip to content

Commit 5993cbe

Browse files
committed
Fix undefined method error
[FixRM rapid7#8348]
1 parent 9f98d4a commit 5993cbe

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

modules/auxiliary/admin/http/typo3_sa_2010_020.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,23 @@ def run
9999
},25)
100100

101101
rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout
102+
return
102103
rescue ::Timeout::Error, ::Errno::EPIPE => e
103104
print_error(e.message)
105+
return
106+
end
107+
108+
if file.nil?
109+
print_error("Connection timed out")
110+
return
104111
end
105112

106113
if ((counter.to_f/queue.length.to_f)*100.0).to_s =~ /\d0.0$/ # Display percentage complete every 10%
107114
percentage = (counter.to_f/queue.length.to_f)*100.0
108115
print_status("Requests #{percentage.to_i}% complete - [#{counter} / #{queue.length}]")
109116
end
110117

118+
# file can be nil
111119
case file.headers['Content-Type']
112120
when 'text/html'
113121
case file.body

0 commit comments

Comments
 (0)