do the right thing w/ a suspend or reset command on all vms. fixes #4630

git-svn-id: file:///home/svn/framework3/trunk@12814 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Jonathan Cran 2011-06-02 06:18:38 +00:00
parent 0a7f6b8528
commit df56bff027
1 changed files with 13 additions and 3 deletions

View File

@ -152,7 +152,17 @@ class Plugin::Lab < Msf::Plugin
##
def cmd_lab_show(*args)
hlp_print_lab
if args.empty?
hlp_print_lab
else
args.each do |vmid|
if @controller.includes_vmid? vmid
print_line @controller[vmid].to_yaml
else
print_error "Unknown vm '#{vmid}'"
end
end
end
end
def cmd_lab_show_running(*args)
@ -217,7 +227,7 @@ class Plugin::Lab < Msf::Plugin
return lab_usage if args.empty?
if args[0] == "all"
@controller.each{ |vm| vm.start }
@controller.each{ |vm| vm.suspend }
else
args.each do |arg|
if @controller.includes_vmid? arg
@ -233,7 +243,7 @@ class Plugin::Lab < Msf::Plugin
if args[0] == "all"
print_line "Resetting all lab vms."
@controller.each{ |vm| vm.start }
@controller.each{ |vm| vm.reset }
else
args.each do |arg|
if @controller.includes_vmid? arg