Skip to content

Commit 765b5e6

Browse files
committed
Use configured method and URI rather than duplicated values
1 parent ed9b7ea commit 765b5e6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/metasploit/framework/login_scanner/mybook_live.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ class MyBookLive < HTTP
1414

1515
# (see Base#set_sane_defaults)
1616
def set_sane_defaults
17-
self.uri = "/UI/login" if self.uri.nil?
18-
self.method = "POST" if self.method.nil?
17+
self.uri = '/UI/login' if self.uri.nil?
18+
self.method = 'POST' if self.method.nil?
1919

2020
super
2121
end
@@ -38,8 +38,8 @@ def attempt_login(credential)
3838
cli = Rex::Proto::Http::Client.new(host, port, {}, ssl, ssl_version)
3939
cli.connect
4040
req = cli.request_cgi(
41-
'method' => 'POST',
42-
'uri' => '/UI/login',
41+
'method' => method,
42+
'uri' => uri,
4343
'data' => body
4444
)
4545
res = cli.send_recv(req)

0 commit comments

Comments
 (0)