Fixup modules

bug/bundler_fix
Meatballs 2013-12-15 18:43:55 +00:00
parent f10a35ed08
commit 87fe6ecfaa
No known key found for this signature in database
GPG Key ID: 5380EAF01F2F8B38
3 changed files with 12 additions and 9 deletions

View File

@ -86,7 +86,7 @@ class Metasploit3 < Msf::Exploit::Local
vprint_status(srv_info.to_s)
case START_TYPE[srv_info[:start_type]]
case START_TYPE[srv_info[:starttype]]
when 'Disabled'
print_error("Service startup is Disabled, so will be unable to exploit unless account has correct permissions...")
return Exploit::CheckCode::Safe
@ -235,13 +235,13 @@ class Metasploit3 < Msf::Exploit::Local
service_information = service_info(@service_name)
if START_TYPE[service_information[:start_type]] == 'Disabled'
if START_TYPE[service_information[:starttype]] == 'Disabled'
print_status("Service is disabled, attempting to enable...")
service_change_startup(@service_name, 'auto')
service_information = service_info(@service_name)
# Still disabled
if START_TYPE[service_information[:start_type]] == 'Disabled'
if START_TYPE[service_information[:starttype]] == 'Disabled'
fail_with(Exploit::Failure::NotVulnerable, "Unable to enable service, aborting...")
end
end
@ -285,7 +285,7 @@ class Metasploit3 < Msf::Exploit::Local
end
rescue RuntimeError => e
raise e if e.kind_of? Msf::Exploit::Failed
if START_TYPE[service_information[:start_type]] == 'Manual'
if START_TYPE[service_information[:starttype]] == 'Manual'
fail_with(Exploit::Failure::Unknown, "Unable to start service, and it does not auto start, cleaning up...")
else
if job_id

View File

@ -72,7 +72,7 @@ class Metasploit3 < Msf::Post
begin
srv_conf = service_info(srv[:name])
#filter service based on filters passed, the are cumulative
if qcred and ! srv_conf[:service_start_name].downcase.include? qcred.downcase
if qcred and ! srv_conf[:startname].downcase.include? qcred.downcase
next
end
@ -81,13 +81,16 @@ class Metasploit3 < Msf::Post
end
# There may not be a 'Startup', need to check nil
if qtype and ! (START_TYPE[srv_conf[:start_type]] || '').downcase.include? qtype.downcase
if qtype and ! (START_TYPE[srv_conf[:starttype]] || '').downcase.include? qtype.downcase
next
end
results_table << [srv[:name], srv_conf[:service_start_name], START_TYPE[srv_conf[:start_type]], srv_conf[:path]
results_table << [srv[:name],
srv_conf[:startname],
START_TYPE[srv_conf[:starttype]],
srv_conf[:path]]
rescue
rescue RuntimeError => e
print_error("An error occurred enumerating service: #{srv[:name]}")
end
else

View File

@ -9,7 +9,7 @@ class Metasploit3 < Msf::Post
include Msf::Post::File
include Msf::Post::Windows::Registry
include Msf::Post::Windows::WindowsServices
include Msf::Post::Windows::Services
include Msf::Post::Windows::Priv
def initialize(info={})