Module: WebSite::InterestingHeaders

Included in:
WebSite
Defined in:
lib/wpscan/web_site/interesting_headers.rb

Instance Method Summary collapse

Instance Method Details

#interesting_headersArray

Checks for interesting headers

Returns:

  • (Array)

    Interesting Headers


8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/wpscan/web_site/interesting_headers.rb', line 8

def interesting_headers
  response = Browser.head(@uri.to_s)
  headers = response.headers
  # Header Names are case insensitve so convert them to upcase
  headers_uppercase = headers.inject({}) do |hash, keys|
    hash[keys[0].upcase] = keys[1]
    hash
  end
  InterestingHeaders.known_headers.each do |h|
    headers_uppercase.delete(h.upcase)
  end
  headers_uppercase.to_a.compact.sort
end