From df56bff027b2f3f1d56f3ca27b4f5512e6fb0227 Mon Sep 17 00:00:00 2001 From: Jonathan Cran Date: Thu, 2 Jun 2011 06:18:38 +0000 Subject: [PATCH] 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 --- plugins/lab.rb | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/plugins/lab.rb b/plugins/lab.rb index d98c95567d..e34de9c90a 100644 --- a/plugins/lab.rb +++ b/plugins/lab.rb @@ -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