Skip to content

Commit 82b74d5

Browse files
committed
Fixes to MyBook Live Module
This commit contains three fixes as requested on PR rapid7#4003. Those include: + Removing extraneous puts statement + Checking for valid response + SSL support.
1 parent 70b1381 commit 82b74d5

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

lib/metasploit/framework/login_scanner/mybook_live.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,12 @@ def attempt_login(credential)
4242
'data' => body
4343
})
4444
res = cli.send_recv(req)
45-
print res
4645
if res && res.code == 302 && res.headers['location'] && res.headers['location'].include?('UI')
4746
result_opts.merge!(status: Metasploit::Model::Login::Status::SUCCESSFUL, proof: res.headers)
47+
elsif res.nil?
48+
result_opts.merge!(status: Metasploit::Model::Login::Status::INCORRECT)
4849
else
49-
result_opts.merge!(status: Metasploit::Model::Login::Status::INCORRECT, proof: res)
50+
result_opts.merge!(status: Metasploit::Model::Login::Status::INCORRECT, proof: res.headers)
5051
end
5152
rescue ::EOFError, Errno::ETIMEDOUT, Rex::ConnectionError, ::Timeout::Error
5253
result_opts.merge!(status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT)

modules/auxiliary/scanner/http/mybook_live_login.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ def run_host(ip)
5454
vhost: datastore['VHOST']
5555
)
5656

57+
if ssl
58+
scanner.ssl = datastore['SSL']
59+
scanner.ssl_version = datastore['SSLVERSION']
60+
end
61+
5762
scanner.scan! do |result|
5863
credential_data = result.to_h
5964
credential_data.merge!(

0 commit comments

Comments
 (0)