Module: Msf::Module::UI::Message
Overview
Methods for print messages with status indicators
Defined Under Namespace
Modules: Verbose
Instance Method Summary
collapse
Methods included from Verbose
#vprint_error, #vprint_good, #vprint_status, #vprint_warning
Instance Method Details
#print_error(msg = '', prefix: nil) ⇒ Object
Also known as:
print_bad
7
8
9
10
|
# File 'lib/msf/core/module/ui/message.rb', line 7
def print_error(msg='', prefix: nil)
msg_prefix = prefix.nil? ? print_prefix : prefix
super(msg_prefix + msg)
end
|
#print_good(msg = '', prefix: nil) ⇒ Object
14
15
16
17
|
# File 'lib/msf/core/module/ui/message.rb', line 14
def print_good(msg='', prefix: nil)
msg_prefix = prefix.nil? ? print_prefix : prefix
super(msg_prefix + msg)
end
|
#print_prefix ⇒ Object
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/msf/core/module/ui/message.rb', line 19
def print_prefix
prefix = ''
if datastore['TimestampOutput'] ||
(framework && framework.datastore['TimestampOutput'])
prefix << "[#{Time.now.strftime("%Y.%m.%d-%H:%M:%S")}] "
xn ||= datastore['ExploitNumber']
xn ||= framework.datastore['ExploitNumber']
if xn.is_a?(Integer)
prefix << "[%04d] " % xn
end
end
prefix
end
|
#print_status(msg = '', prefix: nil) ⇒ Object
35
36
37
38
|
# File 'lib/msf/core/module/ui/message.rb', line 35
def print_status(msg='', prefix: nil)
msg_prefix = prefix.nil? ? print_prefix : prefix
super(msg_prefix + msg)
end
|
#print_warning(msg = '', prefix: nil) ⇒ Object
40
41
42
43
|
# File 'lib/msf/core/module/ui/message.rb', line 40
def print_warning(msg='', prefix: nil)
msg_prefix = prefix.nil? ? print_prefix : prefix
super(msg_prefix + msg)
end
|