Have multiple paths to find the generator tag

bug/bundler_fix
wchen-r7 2015-12-19 13:45:41 -06:00
parent 6dada5f20f
commit 0fda963601
1 changed files with 13 additions and 8 deletions

View File

@ -7,15 +7,20 @@ module Msf::Exploit::Remote::HTTP::Joomla::Base
# @return [TrueClass] Joomla is up and running.
# @return [FalseClass] Joomla is not up.
def joomla_and_online?
res = send_request_cgi({
'uri' => normalize_uri(target_uri.path)
})
# Possible paths that we might see the generator tag.
paths = [ '/', '/administrator' ]
if res
elements = res.get_html_meta_elements
elements.each_entry do |e|
if e.attributes['content'] && /joomla!/i === e.attributes['content'].value
return true
paths.each do |path|
res = send_request_cgi({
'uri' => normalize_uri(target_uri.path, path)
})
if res
elements = res.get_html_meta_elements
elements.each_entry do |e|
if e.attributes['content'] && /joomla!/i === e.attributes['content'].value
return true
end
end
end
end