Module: CMSScanner::Target::Server::IIS

Defined in:
lib/cms_scanner/target/server/iis.rb

Overview

Some IIS specific implementation

Instance Method Summary collapse

Instance Method Details

#directory_listing?(path = nil, params = {}) ⇒ Boolean

Returns true if url(path) has the directory listing enabled, false otherwise.

Parameters:

  • path (String) (defaults to: nil)
  • params (Hash) (defaults to: {})

    The request params

Returns:

  • (Boolean)

    true if url(path) has the directory listing enabled, false otherwise



19
20
21
22
23
# File 'lib/cms_scanner/target/server/iis.rb', line 19

def directory_listing?(path = nil, params = {})
  res = NS::Browser.get(url(path), params)

  res.code == 200 && res.body =~ %r{<H1>#{uri.host} - /} ? true : false
end

#server(_path = nil, _params = {}) ⇒ Symbol

Returns :IIS.

Parameters:

  • path (String)
  • params (Hash)

    The request params

Returns:

  • (Symbol)

    :IIS



10
11
12
# File 'lib/cms_scanner/target/server/iis.rb', line 10

def server(_path = nil, _params = {})
  :IIS
end