5
5
#
6
6
# let(:encoder) {
7
7
# load_and_create_module(
8
- # modules_path: modules_path,
9
8
# module_type: 'encoder',
10
9
# reference_name: 'x86/shikata_ga_nai'
11
10
# )
20
19
# stagers/android/reverse_https
21
20
# stages/android/meterpreter
22
21
# },
23
- # modules_path: modules_path,
24
22
# module_type: 'payload',
25
23
# reference_name: 'android/meterpreter/reverse_tcp'
26
24
# )
@@ -127,10 +125,10 @@ def expect_to_load_module_ancestors(options={})
127
125
# @option options [String] :modules_path path to the `modules` directory from which to load
128
126
# `:ancestor_reference_names`.
129
127
# @option options [String] :module_type the type of module
130
- # @option options [String] :modules_path the 'modules' directory from which to load `:ancestor_reference_names`.
128
+ # @option options [String] :modules_path (#modules_path) the 'modules' directory from which to load
129
+ # `:ancestor_reference_names`.
131
130
# @return [Msf::Module]
132
131
# @raise [KeyError] if `:ancestor_reference_names` is not given when `:module_type` is `'payload'`.
133
- # @raise [KeyError] unless :modules_path is given.
134
132
# @raise [KeyError] unless :module_type is given.
135
133
# @raise [KeyError] unless :reference_name is given.
136
134
def load_and_create_module ( options = { } )
@@ -143,7 +141,9 @@ def load_and_create_module(options={})
143
141
options . except ( :modules_path )
144
142
)
145
143
146
- modules_path = options . fetch ( :modules_path )
144
+ modules_path = options . fetch ( :modules_path ) {
145
+ self . modules_path
146
+ }
147
147
148
148
expect_to_load_module_ancestors (
149
149
ancestor_reference_names : ancestor_reference_names ,
0 commit comments