Single char args multi_console_console_command
parent
83cd0bc977
commit
40313bf623
|
@ -17,9 +17,9 @@
|
||||||
# Setting Arguments
|
# Setting Arguments
|
||||||
@@exec_opts = Rex::Parser::Arguments.new(
|
@@exec_opts = Rex::Parser::Arguments.new(
|
||||||
"-h" => [ false,"Help menu." ],
|
"-h" => [ false,"Help menu." ],
|
||||||
"-sl" => [ false,"Hide commands output for work in background sessions"],
|
"-s" => [ false,"Hide commands output for work in background sessions"],
|
||||||
"-cl" => [ true,"Commands to execute. The command must be enclosed in double quotes and separated by a comma."],
|
"-c" => [ true,"Commands to execute. The command must be enclosed in double quotes and separated by a comma."],
|
||||||
"-rc" => [ true,"Text file with list of commands, one per line."]
|
"-r" => [ true,"Text file with list of commands, one per line."]
|
||||||
)
|
)
|
||||||
|
|
||||||
commands = nil
|
commands = nil
|
||||||
|
@ -36,9 +36,9 @@ end
|
||||||
@@exec_opts.parse(args) { |opt, idx, val|
|
@@exec_opts.parse(args) { |opt, idx, val|
|
||||||
case opt
|
case opt
|
||||||
|
|
||||||
when "-cl"
|
when "-c"
|
||||||
commands = val.split(",")
|
commands = val.split(",")
|
||||||
when "-rc"
|
when "-r"
|
||||||
script = val
|
script = val
|
||||||
if not ::File.exist?(script)
|
if not ::File.exist?(script)
|
||||||
raise "Command List File does not exists!"
|
raise "Command List File does not exists!"
|
||||||
|
@ -51,7 +51,7 @@ end
|
||||||
|
|
||||||
when "-h"
|
when "-h"
|
||||||
help = true
|
help = true
|
||||||
when "-sl"
|
when "-s"
|
||||||
silence = true
|
silence = true
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue