CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/metasploit/framework/parsed_options/remote_db.rb
Views: 11784
1
require 'metasploit/framework/parsed_options/base'
2
3
class Metasploit::Framework::ParsedOptions::RemoteDB < Metasploit::Framework::ParsedOptions::Base
4
5
def options
6
unless @options
7
super.tap { |options|
8
options.console = ActiveSupport::OrderedOptions.new
9
10
options.console.commands = []
11
options.console.confirm_exit = false
12
options.console.histfile = nil
13
options.console.local_output = nil
14
options.console.plugins = []
15
options.console.quiet = false
16
options.console.real_readline = false
17
options.console.resources = []
18
options.console.subcommand = :run
19
}
20
end
21
22
@options
23
end
24
25
#######
26
private
27
#######
28
29
def option_parser
30
unless @option_parser
31
super.tap { |option_parser|
32
option_parser.banner = "Usage: #{option_parser.program_name} [options]"
33
34
option_parser.separator ''
35
option_parser.separator 'Remote DB options:'
36
37
option_parser.on('-ns', "Remove signal processing") do
38
options.database.no_signal = true
39
end
40
41
}
42
end
43
44
@option_parser
45
end
46
end
47