Land #10971, Fix extraneous whitespace in check output
commit
8be53f8730
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue