comment around why we do this, make check more explicit

GSoC/Meterpreter_Web_Console
Brent Cook 2018-10-12 02:12:30 -05:00
parent 14e87bf06f
commit 4ae45cb20b
1 changed files with 6 additions and 2 deletions

View File

@ -194,9 +194,13 @@ module Exploit::Remote::Tcp
super
disconnect
end
def print_prefix
if rhost && rhost.split(' ').length < 2
# Only inject a host/port prefix if we have exactly one entry.
# Otherwise we are logging in the global context where rhost can be any
# size (being an alias for rhosts), which is not very useful to insert into
# a single log line.
if rhost && rhost.split(' ').length == 1
super + peer + ' - '
else
super