@Meatballs1 fixes
parent
e3a6782345
commit
6435b4370a
|
@ -9,6 +9,7 @@ require 'msf/core/post/common'
|
|||
|
||||
class Metasploit3 < Msf::Post
|
||||
include Msf::Post::Common
|
||||
include Msf::Post::Windows::ExtAPI
|
||||
|
||||
def initialize(info={})
|
||||
super(update_info(info,
|
||||
|
@ -28,7 +29,7 @@ class Metasploit3 < Msf::Post
|
|||
|
||||
register_options(
|
||||
[
|
||||
OptBool.new('MSFLOCALS', [ false, 'Search for missing patchs for which there is a MSF local module', true]),
|
||||
OptBool.new('MSFLOCALS', [ true, 'Search for missing patchs for which there is a MSF local module', true]),
|
||||
OptString.new('KB', [ true, 'A comma separated list of KB patches to search for', 'KB2871997, KB2928120'])
|
||||
], self.class)
|
||||
end
|
||||
|
@ -53,9 +54,10 @@ class Metasploit3 < Msf::Post
|
|||
patches = patches + msfmodules
|
||||
end
|
||||
|
||||
client.core.use("extapi") if not client.ext.aliases.include?("extapi")
|
||||
extapi_loaded = load_extapi
|
||||
if extapi_loaded
|
||||
begin
|
||||
objects = client.extapi.wmi.query("SELECT HotFixID FROM Win32_QuickFixEngineering")
|
||||
objects = session.extapi.wmi.query("SELECT HotFixID FROM Win32_QuickFixEngineering")
|
||||
rescue RuntimeError
|
||||
print_error "Known bug in WMI query, try migrating to another process"
|
||||
return
|
||||
|
@ -83,5 +85,8 @@ class Metasploit3 < Msf::Post
|
|||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
print_error "ExtAPI failed to load"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue