Module: WebSite::InterestingHeaders
- Included in:
- WebSite
- Defined in:
- lib/wpscan/web_site/interesting_headers.rb
Class Method Summary (collapse)
- + (Array) known_headers protected
Instance Method Summary (collapse)
-
- (Array) interesting_headers
Checks for interesting headers.
Class Method Details
+ (Array) known_headers (protected)
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/wpscan/web_site/interesting_headers.rb', line 25 def self.known_headers %w{ Location Date Content-Type Content-Length Connection Etag Expires Last-Modified Pragma Vary Cache-Control X-Pingback Accept-Ranges } end |
Instance Method Details
- (Array) interesting_headers
Checks for 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 |