Skip to content

Commit b0f8df0

Browse files
committed
Flow the action through to the exploit class
1 parent 49823d4 commit b0f8df0

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

lib/msf/base/simple/exploit.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def self.exploit_simple(oexploit, opts, &block)
6565

6666
# Import options from the OptionStr or Option hash.
6767
exploit._import_extra_options(opts)
68+
exploit.datastore['ACTION'] = opts['Action'] if opts['Action']
6869
opts['Payload'] ||= exploit.datastore['Payload']
6970

7071
unless opts['Quiet']

lib/msf/ui/console/command_dispatcher/exploit.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ def cmd_exploit(*args, opts: {})
124124
mod.options.include?('rhosts')
125125

126126
opts = {
127+
'Action' => args[:action],
127128
'Encoder' => args[:encoder] || mod_with_opts.datastore['ENCODER'],
128129
'Payload' => args[:payload] || mod_with_opts.datastore['PAYLOAD'],
129130
'Target' => args[:target] || mod_with_opts.datastore['TARGET'],

0 commit comments

Comments
 (0)