Class: WPScan::Controller::Base
Overview
Constant Summary
OptParseValidator::VERSION
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.option_parser=(parser) ⇒ Object
35
36
37
|
# File 'lib/wpscan/controller.rb', line 35
def self.option_parser=(parser)
@@option_parser = parser
end
|
.reset ⇒ Object
Reset all the class attributes. Currently only used in specs.
23
24
25
26
27
|
# File 'lib/wpscan/controller.rb', line 23
def self.reset
@@target = nil
@@datastore = nil
@@formatter = nil
end
|
Instance Method Details
#==(other) ⇒ Object
18
19
20
|
# File 'lib/wpscan/controller.rb', line 18
def ==(other)
self.class == other.class
end
|
#after_scan ⇒ Object
16
|
# File 'lib/wpscan/controller.rb', line 16
def after_scan; end
|
#before_scan ⇒ Object
12
|
# File 'lib/wpscan/controller.rb', line 12
def before_scan; end
|
10
|
# File 'lib/wpscan/controller.rb', line 10
def cli_options; end
|
#datastore ⇒ Hash
45
46
47
|
# File 'lib/wpscan/controller.rb', line 45
def datastore
@@datastore ||= {}
end
|
40
41
42
|
# File 'lib/wpscan/controller.rb', line 40
def option_parser
@@option_parser
end
|
#output(tpl, vars = {}) ⇒ Void
57
58
59
|
# File 'lib/wpscan/controller.rb', line 57
def output(tpl, vars = {})
formatter.output(*tpl_params(tpl, vars))
end
|
#render(tpl, vars = {}) ⇒ String
64
65
66
|
# File 'lib/wpscan/controller.rb', line 64
def render(tpl, vars = {})
formatter.render(*tpl_params(tpl, vars))
end
|
#run ⇒ Object
14
|
# File 'lib/wpscan/controller.rb', line 14
def run; end
|
#tmp_directory ⇒ Pathname
74
75
76
77
78
|
# File 'lib/wpscan/controller.rb', line 74
def tmp_directory
return Pathname.new(ENV['TMPDIR']).join(WPScan.app_name) if ENV['TMPDIR']
WPScan.user_cache_dir
end
|
#user_interaction? ⇒ Boolean
69
70
71
|
# File 'lib/wpscan/controller.rb', line 69
def user_interaction?
formatter.user_interaction? && !WPScan::ParsedCli.output
end
|