Land #10971, Fix extraneous whitespace in check output

GSoC/Meterpreter_Web_Console
Brent Cook 2018-11-16 03:38:32 -06:00
commit 8be53f8730
No known key found for this signature in database
GPG Key ID: 1FFAA0B24B708F96
1 changed files with 4 additions and 3 deletions

View File

@ -221,6 +221,7 @@ module ModuleCommandDispatcher
rport = instance.rport if instance.respond_to?(:rport)
peer = "#{rhost}:#{rport}"
end
peer_msg = peer ? "#{peer} - " : ''
begin
if instance.respond_to?(:check_simple)
@ -235,15 +236,15 @@ module ModuleCommandDispatcher
if (code and code.kind_of?(Array) and code.length > 1)
if (code == Msf::Exploit::CheckCode::Vulnerable)
print_good("#{peer} #{code[1]}")
print_good("#{peer_msg}#{code[1]}")
# Restore RHOST for report_vuln
instance.datastore['RHOST'] ||= rhost
report_vuln(instance)
else
print_status("#{peer} #{code[1]}")
print_status("#{peer_msg}#{code[1]}")
end
else
msg = "#{peer} Check failed: The state could not be determined."
msg = "#{peer_msg}Check failed: The state could not be determined."
print_error(msg)
elog("#{msg}\n#{caller.join("\n")}")
end