Single char args multiscript

This commit is contained in:
Josh Hale 2017-08-06 17:58:13 -05:00
parent 6067e9423e
commit b2005e761d
1 changed files with 4 additions and 4 deletions

View File

@ -15,8 +15,8 @@ session = client
@@exec_opts = Rex::Parser::Arguments.new(
"-h" => [ false,"Help menu." ],
"-cl" => [ true,"Collection of scripts to execute. Each script command must be enclosed in double quotes and separated by a semicolon."],
"-rc" => [ true,"Text file with list of commands, one per line."]
"-c" => [ true,"Collection of scripts to execute. Each script command must be enclosed in double quotes and separated by a semicolon."],
"-r" => [ true,"Text file with list of commands, one per line."]
)
#Setting Argument variables
commands = ""
@ -53,9 +53,9 @@ end
@@exec_opts.parse(args) do |opt, idx, val|
case opt
when "-cl"
when "-c"
commands = val.gsub(/;/,"\n")
when "-rc"
when "-r"
script = val
if not ::File.exist?(script)
raise "Script List File does not exists!"