Skip to content

Commit 1684bfe

Browse files
David MaloneyDavid Maloney
authored andcommitted
add missing data to loginscanner results
the chef web ui and symantec web gateway loginscanners do not save the target(host/port/proto) info in the Result object. This can cause modules to break as they expected the Result to contain that information MSP-12499
1 parent cecc8ab commit 1684bfe

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

lib/metasploit/framework/login_scanner/chef_webui.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,14 @@ class ChefWebUI < HTTP
2424
# @param credential [Metasploit::Framework::Credential] The credential object
2525
# @return [Result]
2626
def attempt_login(credential)
27-
result_opts = { credential: credential }
27+
result_opts = {
28+
credential: credential,
29+
status: Metasploit::Model::Login::Status::INCORRECT,
30+
proof: nil,
31+
host: host,
32+
port: port,
33+
protocol: 'tcp'
34+
}
2835

2936
begin
3037
status = try_login(credential)

lib/metasploit/framework/login_scanner/symantec_web_gateway.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,14 @@ def get_login_state(username, password)
9595
# @param credential [Metasploit::Framework::Credential] The credential object
9696
# @return [Result] A Result object indicating success or failure
9797
def attempt_login(credential)
98-
result_opts = { credential: credential }
98+
result_opts = {
99+
credential: credential,
100+
status: Metasploit::Model::Login::Status::INCORRECT,
101+
proof: nil,
102+
host: host,
103+
port: port,
104+
protocol: 'tcp'
105+
}
99106

100107
begin
101108
result_opts.merge!(get_login_state(credential.public, credential.private))

0 commit comments

Comments
 (0)