Module: Msf::ModuleManager::ModuleSets
- Extended by:
- ActiveSupport::Concern
- Included in:
- Msf::ModuleManager
- Defined in:
- lib/msf/core/module_manager/module_sets.rb
Overview
Concerns the various type-specific module sets in a Msf::ModuleManager
Instance Attribute Summary collapse
-
#enablement_by_type ⇒ Object
protected
:nodoc:.
-
#module_set_by_type ⇒ Object
protected
:nodoc:.
Instance Method Summary collapse
-
#auxiliary ⇒ Object
Returns the set of loaded auxiliary module classes.
-
#encoders ⇒ Object
Returns the set of loaded encoder module classes.
- #evasion ⇒ Object
-
#exploits ⇒ Object
Returns the set of loaded exploit module classes.
- #init_module_set(type) ⇒ Object
-
#module_names(set) ⇒ Object
Provide a list of module names of a specific type.
-
#module_set(type) ⇒ Object
Returns all of the modules of the specified type.
-
#module_types ⇒ Object
Provide a list of the types of modules in the set.
-
#nops ⇒ Object
Returns the set of loaded nop module classes.
-
#payloads ⇒ Object
Returns the set of loaded payload module classes.
-
#post ⇒ Object
Returns the set of loaded auxiliary module classes.
- #type_enabled?(type) ⇒ Boolean
Instance Attribute Details
#enablement_by_type ⇒ Object (protected)
:nodoc:
105 106 107 |
# File 'lib/msf/core/module_manager/module_sets.rb', line 105 def enablement_by_type @enablement_by_type end |
#module_set_by_type ⇒ Object (protected)
:nodoc:
106 107 108 |
# File 'lib/msf/core/module_manager/module_sets.rb', line 106 def module_set_by_type @module_set_by_type end |
Instance Method Details
#auxiliary ⇒ Object
Returns the set of loaded auxiliary module classes.
20 21 22 |
# File 'lib/msf/core/module_manager/module_sets.rb', line 20 def auxiliary module_set(Msf::MODULE_AUX) end |
#encoders ⇒ Object
Returns the set of loaded encoder module classes.
27 28 29 |
# File 'lib/msf/core/module_manager/module_sets.rb', line 27 def encoders module_set(Msf::MODULE_ENCODER) end |
#evasion ⇒ Object
95 96 97 |
# File 'lib/msf/core/module_manager/module_sets.rb', line 95 def evasion module_set(Msf::MODULE_EVASION) end |
#exploits ⇒ Object
Returns the set of loaded exploit module classes.
34 35 36 |
# File 'lib/msf/core/module_manager/module_sets.rb', line 34 def exploits module_set(Msf::MODULE_EXPLOIT) end |
#init_module_set(type) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/msf/core/module_manager/module_sets.rb', line 38 def init_module_set(type) self.enablement_by_type[type] = true case type when Msf::MODULE_PAYLOAD instance = Msf::PayloadSet.new else instance = Msf::ModuleSet.new(type) end self.module_set_by_type[type] = instance # Set the module set's framework reference instance.framework = self.framework end |
#module_names(set) ⇒ Object
Provide a list of module names of a specific type
56 57 58 |
# File 'lib/msf/core/module_manager/module_sets.rb', line 56 def module_names(set) module_set_by_type[set] ? module_set_by_type[set].keys.dup : [] end |
#module_set(type) ⇒ Object
Returns all of the modules of the specified type
63 64 65 |
# File 'lib/msf/core/module_manager/module_sets.rb', line 63 def module_set(type) module_set_by_type[type] end |
#module_types ⇒ Object
Provide a list of the types of modules in the set
70 71 72 |
# File 'lib/msf/core/module_manager/module_sets.rb', line 70 def module_types module_set_by_type.keys.dup end |
#nops ⇒ Object
Returns the set of loaded nop module classes.
77 78 79 |
# File 'lib/msf/core/module_manager/module_sets.rb', line 77 def nops module_set(Msf::MODULE_NOP) end |
#payloads ⇒ Object
Returns the set of loaded payload module classes.
84 85 86 |
# File 'lib/msf/core/module_manager/module_sets.rb', line 84 def payloads module_set(Msf::MODULE_PAYLOAD) end |
#post ⇒ Object
Returns the set of loaded auxiliary module classes.
91 92 93 |
# File 'lib/msf/core/module_manager/module_sets.rb', line 91 def post module_set(Msf::MODULE_POST) end |
#type_enabled?(type) ⇒ Boolean
99 100 101 |
# File 'lib/msf/core/module_manager/module_sets.rb', line 99 def type_enabled?(type) enablement_by_type[type] || false end |