From c9dad7d7c4e317f23173c1d221c306763778a02b Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Thu, 5 Oct 2017 16:38:05 -0500 Subject: [PATCH] unify api usage --- lib/msf/ui/console/command_dispatcher/auxiliary.rb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/msf/ui/console/command_dispatcher/auxiliary.rb b/lib/msf/ui/console/command_dispatcher/auxiliary.rb index 8291cc8ea6..a51a355c04 100644 --- a/lib/msf/ui/console/command_dispatcher/auxiliary.rb +++ b/lib/msf/ui/console/command_dispatcher/auxiliary.rb @@ -74,7 +74,7 @@ class Auxiliary # Executes an auxiliary module # def cmd_run(*args) - opt_str = nil + opts = [] action = mod.datastore['ACTION'] jobify = false quiet = false @@ -84,7 +84,7 @@ class Auxiliary when '-j' jobify = true when '-o' - opt_str = val + opts.push(val) when '-a' action = val when '-q' @@ -93,9 +93,8 @@ class Auxiliary cmd_run_help return false else - (key, val) = val.split('=') - if key && val - mod.datastore[key] = val + if val[0] != '-' && val.match?('=') + opts.push(val) else cmd_run_help return false @@ -112,7 +111,7 @@ class Auxiliary begin mod.run_simple( 'Action' => action, - 'OptionStr' => opt_str, + 'OptionStr' => opts.join(','), 'LocalInput' => driver.input, 'LocalOutput' => driver.output, 'RunAsJob' => jobify,