Module: Msf::Module::Options
- Included in:
- Msf::Module
- Defined in:
- lib/msf/core/module/options.rb
Overview
Register, deregister, and validate #options.
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
-
#deregister_options(*names) ⇒ Object
protected
Removes the supplied options from the module’s option container and data store.
-
#register_advanced_options(options, owner = self.class) ⇒ Object
protected
Register advanced options with a specific owning class.
-
#register_evasion_options(options, owner = self.class) ⇒ Object
protected
Register evasion options with a specific owning class.
-
#register_options(options, owner = self.class) ⇒ Object
protected
Register options with a specific owning class.
-
#validate ⇒ Object
This method ensures that the options associated with this module all have valid values according to each required option in the option container.
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
9 10 11 |
# File 'lib/msf/core/module/options.rb', line 9 def @options end |
Instance Method Details
#deregister_options(*names) ⇒ Object (protected)
Removes the supplied options from the module’s option container and data store.
30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/msf/core/module/options.rb', line 30 def (*names) names.each { |name| real_name = self.datastore.find_key_case(name) if self.datastore.is_a?(Msf::DataStoreWithFallbacks) self.datastore.remove_option(name) else self.datastore.delete(name) end self..remove_option(name) if real_name != name self..remove_option(real_name) end } end |
#register_advanced_options(options, owner = self.class) ⇒ Object (protected)
Register advanced options with a specific owning class.
50 51 52 53 |
# File 'lib/msf/core/module/options.rb', line 50 def (, owner = self.class) self..(, owner) import_defaults(false) end |
#register_evasion_options(options, owner = self.class) ⇒ Object (protected)
Register evasion options with a specific owning class.
58 59 60 61 |
# File 'lib/msf/core/module/options.rb', line 58 def (, owner = self.class) self..(, owner) import_defaults(false) end |
#register_options(options, owner = self.class) ⇒ Object (protected)
Register options with a specific owning class.
66 67 68 69 |
# File 'lib/msf/core/module/options.rb', line 66 def (, owner = self.class) self..(, owner) import_defaults(false) end |
#validate ⇒ Object
This method ensures that the options associated with this module all have valid values according to each required option in the option container.
20 21 22 |
# File 'lib/msf/core/module/options.rb', line 20 def validate self..validate(self.datastore) end |