Module: Msf::Exploit::Remote::HTTP::Atlassian::Confluence::Version

Defined in:
lib/msf/core/exploit/remote/http/atlassian/confluence/version.rb

Instance Method Summary collapse

Instance Method Details

#get_confluence_versionObject



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/msf/core/exploit/remote/http/atlassian/confluence/version.rb', line 4

def get_confluence_version
  res = send_request_cgi(
    'method' => 'GET',
    'uri' => normalize_uri(target_uri.path, 'login.action')
  )
  return nil unless res&.code == 200

  poweredby = res.get_xml_document.xpath('//ul[@id="poweredby"]/li[@class="print-only"]/text()').first&.text
  return nil unless poweredby =~ /Confluence (\d+(\.\d+)*)/

  Rex::Version.new(Regexp.last_match(1))
end