diff --git a/lib/msf/core/exploit/mixins.rb b/lib/msf/core/exploit/mixins.rb index bb7c876a40..fc3afd9eea 100644 --- a/lib/msf/core/exploit/mixins.rb +++ b/lib/msf/core/exploit/mixins.rb @@ -53,6 +53,7 @@ require 'msf/core/exploit/pop2' require 'msf/core/exploit/tns' require 'msf/core/exploit/db2' require 'msf/core/exploit/postgres' +require 'msf/core/exploit/vim_soap' require 'msf/core/exploit/wdbrpc' require 'msf/core/exploit/wdbrpc_client' diff --git a/modules/auxiliary/admin/vmware/poweroff_vm.rb b/modules/auxiliary/admin/vmware/poweroff_vm.rb index 20149c3e27..ed4820eb78 100644 --- a/modules/auxiliary/admin/vmware/poweroff_vm.rb +++ b/modules/auxiliary/admin/vmware/poweroff_vm.rb @@ -11,7 +11,6 @@ require 'msf/core' -require 'msf/core/exploit/vim_soap' class Metasploit3 < Msf::Auxiliary @@ -42,10 +41,10 @@ class Metasploit3 < Msf::Auxiliary def run if vim_do_login(datastore['USERNAME'], datastore['PASSWORD']) == :success vm_ref = vim_find_vm_by_name(datastore['VM']) - case vm_ref + case vm_ref when String return_state = vim_powerOFF_vm(vm_ref) - case return_state + case return_state when 'success' print_good "VM Powered Off Successfully" when 'alreadyOFF' diff --git a/modules/auxiliary/admin/vmware/poweron_vm.rb b/modules/auxiliary/admin/vmware/poweron_vm.rb index c9a16d1e1a..20e4f51dd0 100644 --- a/modules/auxiliary/admin/vmware/poweron_vm.rb +++ b/modules/auxiliary/admin/vmware/poweron_vm.rb @@ -11,7 +11,6 @@ require 'msf/core' -require 'msf/core/exploit/vim_soap' class Metasploit3 < Msf::Auxiliary @@ -43,10 +42,10 @@ class Metasploit3 < Msf::Auxiliary if vim_do_login(datastore['USERNAME'], datastore['PASSWORD']) == :success vm_ref = vim_find_vm_by_name(datastore['VM']) - case vm_ref + case vm_ref when String return_state = vim_powerON_vm(vm_ref) - case return_state + case return_state when 'success' print_good "VM Powered On Successfully" when 'alreadyON' diff --git a/modules/auxiliary/admin/vmware/tag_vm.rb b/modules/auxiliary/admin/vmware/tag_vm.rb index 5939b2e6d6..3b4b0aec7e 100644 --- a/modules/auxiliary/admin/vmware/tag_vm.rb +++ b/modules/auxiliary/admin/vmware/tag_vm.rb @@ -11,7 +11,6 @@ require 'msf/core' -require 'msf/core/exploit/vim_soap' class Metasploit3 < Msf::Auxiliary @@ -24,8 +23,8 @@ class Metasploit3 < Msf::Auxiliary super( 'Name' => 'VMWare Tag Virtual Machine', 'Description' => %Q{ - This module will log into the Web API of VMWare and - 'tag' a specified Virtual Machine. It does this by + This module will log into the Web API of VMWare and + 'tag' a specified Virtual Machine. It does this by logging a user event with user supplied text}, 'Author' => ['TheLightCosine '], 'License' => MSF_LICENSE @@ -45,7 +44,7 @@ class Metasploit3 < Msf::Auxiliary if vim_do_login(datastore['USERNAME'], datastore['PASSWORD']) == :success vm_ref = vim_find_vm_by_name(datastore['VM']) - case vm_ref + case vm_ref when String result = vim_log_event_vm(vm_ref, datastore['MSG']) case result diff --git a/modules/auxiliary/admin/vmware/terminate_esx_sessions.rb b/modules/auxiliary/admin/vmware/terminate_esx_sessions.rb index 39320a16ee..56bf2798c4 100644 --- a/modules/auxiliary/admin/vmware/terminate_esx_sessions.rb +++ b/modules/auxiliary/admin/vmware/terminate_esx_sessions.rb @@ -11,7 +11,6 @@ require 'msf/core' -require 'msf/core/exploit/vim_soap' class Metasploit3 < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/vmware/esx_fingerprint.rb b/modules/auxiliary/scanner/vmware/esx_fingerprint.rb index 0d42ed7bf6..dfefc08b88 100644 --- a/modules/auxiliary/scanner/vmware/esx_fingerprint.rb +++ b/modules/auxiliary/scanner/vmware/esx_fingerprint.rb @@ -11,7 +11,6 @@ require 'msf/core' -require 'msf/core/exploit/vim_soap' class Metasploit3 < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/vmware/vmware_enum_vms.rb b/modules/auxiliary/scanner/vmware/vmware_enum_vms.rb index ddc53d057f..18b892bf12 100644 --- a/modules/auxiliary/scanner/vmware/vmware_enum_vms.rb +++ b/modules/auxiliary/scanner/vmware/vmware_enum_vms.rb @@ -11,7 +11,6 @@ require 'msf/core' -require 'msf/core/exploit/vim_soap' class Metasploit3 < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/vmware/vmware_host_details.rb b/modules/auxiliary/scanner/vmware/vmware_host_details.rb index b5ff83cbe0..52b84ceca5 100644 --- a/modules/auxiliary/scanner/vmware/vmware_host_details.rb +++ b/modules/auxiliary/scanner/vmware/vmware_host_details.rb @@ -11,7 +11,6 @@ require 'msf/core' -require 'msf/core/exploit/vim_soap' class Metasploit3 < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/vmware/vmware_screenshot_stealer.rb b/modules/auxiliary/scanner/vmware/vmware_screenshot_stealer.rb index 951b519cb2..111d95d02b 100644 --- a/modules/auxiliary/scanner/vmware/vmware_screenshot_stealer.rb +++ b/modules/auxiliary/scanner/vmware/vmware_screenshot_stealer.rb @@ -11,7 +11,6 @@ require 'msf/core' -require 'msf/core/exploit/vim_soap' class Metasploit3 < Msf::Auxiliary