add simple sessions -K to kill all. useful at least when i'm testing.
git-svn-id: file:///home/svn/framework3/trunk@7100 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
aecbf12b5b
commit
8efeb58285
|
@ -27,7 +27,8 @@ class Core
|
|||
"-v" => [ false, "List verbose fields." ],
|
||||
"-q" => [ false, "Quiet mode." ],
|
||||
"-d" => [ true, "Detach an interactive session" ],
|
||||
"-k" => [ true, "Terminate session." ])
|
||||
"-k" => [ true, "Terminate session." ],
|
||||
"-K" => [ false, "Terminate all sessions." ])
|
||||
|
||||
@@jobs_opts = Rex::Parser::Arguments.new(
|
||||
"-h" => [ false, "Help banner." ],
|
||||
|
@ -965,7 +966,10 @@ class Core
|
|||
when "-k"
|
||||
method = 'kill'
|
||||
sid = val
|
||||
|
||||
|
||||
when "-K"
|
||||
method = 'killall'
|
||||
|
||||
when "-d"
|
||||
method = 'detach'
|
||||
sid = val
|
||||
|
@ -988,6 +992,14 @@ class Core
|
|||
print_status("Killing session #{sid}")
|
||||
session.kill
|
||||
end
|
||||
|
||||
when 'killall'
|
||||
print_status("Killing all sessions...")
|
||||
framework.sessions.each_sorted do |sid|
|
||||
if ((session = framework.sessions.get(sid)))
|
||||
session.kill
|
||||
end
|
||||
end
|
||||
|
||||
when 'detach'
|
||||
if ((session = framework.sessions.get(sid)))
|
||||
|
|
Loading…
Reference in New Issue