Skip to content

Commit c9c89da

Browse files
committed
Include action in parsing options
1 parent 157a15a commit c9c89da

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/msf/ui/console/module_argument_parsing.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def parse_exploit_opts(args)
6161
help_cmd = proc do |_result|
6262
cmd_exploit_help
6363
end
64-
parse_opts(@@exploit_opts, args, help_cmd: help_cmd)&.except(:action)
64+
parse_opts(@@exploit_opts, args, help_cmd: help_cmd)
6565
end
6666

6767
def print_module_run_or_check_usage(command:, description: nil, options: @@module_opts)
@@ -149,7 +149,11 @@ def parse_opts(opts, args, help_cmd:, action: nil)
149149

150150
if resembles_datastore_assignment?(val)
151151
name, val = val.split('=', 2)
152-
append_datastore_option(datastore_options, name, val)
152+
if name.upcase == 'ACTION'
153+
result[:action] = val
154+
else
155+
append_datastore_option(datastore_options, name, val)
156+
end
153157
elsif resembles_rhost_value?(val)
154158
append_datastore_option(datastore_options, 'RHOSTS', val)
155159
else

0 commit comments

Comments
 (0)