enum_services service_info fixup

bug/bundler_fix
Meatballs 2013-12-15 18:13:12 +00:00
parent 6d5aefd620
commit 577adcef27
No known key found for this signature in database
GPG Key ID: 5380EAF01F2F8B38
1 changed files with 5 additions and 5 deletions

View File

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