diff --git a/modules/exploits/windows/local/ms10_092_schelevator.rb b/modules/exploits/windows/local/ms10_092_schelevator.rb index a8d6880292..b7b4df2ce2 100644 --- a/modules/exploits/windows/local/ms10_092_schelevator.rb +++ b/modules/exploits/windows/local/ms10_092_schelevator.rb @@ -33,8 +33,8 @@ class Metasploit3 < Msf::Exploit::Local 'License' => MSF_LICENSE, 'Author' => [ 'jduck' ], 'Version' => '$Revision$', - 'Platform' => [ 'windows' ], 'Arch' => [ ARCH_X86, ARCH_X86_64 ], + 'Platform' => [ 'windows' ], 'SessionTypes' => [ 'meterpreter' ], 'Targets' => [ @@ -88,16 +88,7 @@ class Metasploit3 < Msf::Exploit::Local return end - vuln = false - winver = sysinfo["OS"] - affected = [ 'Windows Vista', 'Windows 7', 'Windows 2008' ] - affected.each { |v| - if winver.include? v - vuln = true - break - end - } - if not vuln + if check == Exploit::CheckCode::Safe print_error("#{winver} is not vulnerable.") return end