Single char args multiscript
This commit is contained in:
parent
6067e9423e
commit
b2005e761d
|
@ -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!"
|
||||
|
|
Loading…
Reference in New Issue