Skip to content

Commit 855cadc

Browse files
committed
Rescue more exceptions
The attempt_login method is rescuing these exceptions, so maybe I should do the same.
1 parent 111e3fc commit 855cadc

File tree

1 file changed

+1
-5
lines changed
  • lib/metasploit/framework/login_scanner

1 file changed

+1
-5
lines changed

lib/metasploit/framework/login_scanner/http.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,7 @@ def send_request(opts)
208208
cli.connect
209209
req = cli.request_cgi(opts)
210210
res = cli.send_recv(req)
211-
rescue ::Errno::EPIPE, ::Timeout::Error => e
212-
# We are trying to mimic the same type of exception rescuing in
213-
# Msf::Exploit::Remote::HttpClient. But instead of returning nil, we'll consistently
214-
# raise Rex::ConnectionError so the #attempt_login can return the error message back
215-
# to the login module.
211+
rescue ::EOFError, Errno::ETIMEDOUT, Rex::ConnectionError, ::Timeout::Error => e
216212
raise Rex::ConnectionError, e.message
217213
ensure
218214
cli.close

0 commit comments

Comments
 (0)