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) rport = instance.rport if instance.respond_to?(:rport)
peer = "#{rhost}:#{rport}" peer = "#{rhost}:#{rport}"
end end
peer_msg = peer ? "#{peer} - " : ''
begin begin
if instance.respond_to?(:check_simple) 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 and code.kind_of?(Array) and code.length > 1)
if (code == Msf::Exploit::CheckCode::Vulnerable) if (code == Msf::Exploit::CheckCode::Vulnerable)
print_good("#{peer} #{code[1]}") print_good("#{peer_msg}#{code[1]}")
# Restore RHOST for report_vuln # Restore RHOST for report_vuln
instance.datastore['RHOST'] ||= rhost instance.datastore['RHOST'] ||= rhost
report_vuln(instance) report_vuln(instance)
else else
print_status("#{peer} #{code[1]}") print_status("#{peer_msg}#{code[1]}")
end end
else 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) print_error(msg)
elog("#{msg}\n#{caller.join("\n")}") elog("#{msg}\n#{caller.join("\n")}")
end end