parent
96864b3892
commit
a9a6f0c5f9
|
@ -176,18 +176,6 @@ class Module
|
|||
obj
|
||||
end
|
||||
|
||||
#
|
||||
# Overwrite the Subscriber print_line to do custom prefixes
|
||||
#
|
||||
|
||||
def print_line_prefix
|
||||
datastore['CustomPrintPrefix'] || framework.datastore['CustomPrintPrefix'] || ''
|
||||
end
|
||||
|
||||
def print_line(msg='')
|
||||
super(print_line_prefix + msg)
|
||||
end
|
||||
|
||||
# Verbose version of #print_status
|
||||
def vprint_status(msg)
|
||||
print_status(msg) if datastore['VERBOSE'] || framework.datastore['VERBOSE']
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
module Msf::Module::UI
|
||||
autoload :Line, 'msf/core/module/ui/line'
|
||||
autoload :Message, 'msf/core/module/ui/message'
|
||||
|
||||
# Modules can subscribe to a user-interface, and as such they include the
|
||||
|
@ -8,6 +9,8 @@ module Msf::Module::UI
|
|||
# interacting with the user, n stuff.
|
||||
include Rex::Ui::Subscriber
|
||||
|
||||
# Overwrite the {Rex::UI::Subscriber#print_line} to do custom prefixes
|
||||
include Msf::Module::UI::Line
|
||||
# Overwrite the {Rex::Ui::Subscriber} print_(status|error|good) to do time stamps
|
||||
include Msf::Module::UI::Message
|
||||
end
|
|
@ -0,0 +1,9 @@
|
|||
module Msf::Module::UI::Line
|
||||
def print_line(msg='')
|
||||
super(print_line_prefix + msg)
|
||||
end
|
||||
|
||||
def print_line_prefix
|
||||
datastore['CustomPrintPrefix'] || framework.datastore['CustomPrintPrefix'] || ''
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue