Module: Msf::Exploit::Remote::HTTP::Joomla::Base

Included in:
Msf::Exploit::Remote::HTTP::Joomla
Defined in:
lib/msf/core/exploit/remote/http/joomla/base.rb

Instance Method Summary collapse

Instance Method Details

#joomla_and_online?TrueClass, FalseClass

Checks if Joomla is up and running.

Returns:

  • (TrueClass)

    Joomla is up and running.

  • (FalseClass)

    Joomla is not up.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/msf/core/exploit/remote/http/joomla/base.rb', line 9

def joomla_and_online?
  # Possible paths that we might see the generator tag.
  paths = [ '/', '/administrator/' ]

  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

  false
end