CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/msf/core/module/ui.rb
Views: 1904
1
2
module Msf::Module::UI
3
autoload :Line, 'msf/core/module/ui/line'
4
autoload :Message, 'msf/core/module/ui/message'
5
6
# Modules can subscribe to a user-interface, and as such they include the
7
# UI subscriber module. This provides methods like print, print_line, etc.
8
# User interfaces are designed to be medium independent, and as such the
9
# user interface subscribes are designed to provide a flexible way of
10
# interacting with the user, n stuff.
11
include Rex::Ui::Subscriber
12
13
# Overwrite the {Rex::UI::Subscriber#print_line} to do custom prefixes
14
include Msf::Module::UI::Line
15
# Overwrite the {Rex::Ui::Subscriber} print_(status|error|good) to do time stamps
16
include Msf::Module::UI::Message
17
18
# Add alerts to {Rex::Ui::Subscriber#init_ui}
19
def init_ui(*args)
20
super
21
alert_user
22
end
23
end
24
25