comment around why we do this, make check more explicit
parent
14e87bf06f
commit
4ae45cb20b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue