Sha256: 3b88494f84ee50d1ed8c5193382c97de6b160388fb1ccca5f767c74bf975998a

Contents?: true

Size: 567 Bytes

Versions: 31

Compression:

Stored size: 567 Bytes

Contents

module CMSScanner
  module Finders
    module InterestingFindings
      # Robots.txt finder
      class RobotsTxt < Finder
        # @return [ String ] The url of the robots.txt file
        def url
          target.url('robots.txt')
        end

        # @return [ InterestingFinding ]
        def aggressive(_opts = {})
          res = NS::Browser.get(url)

          return unless res && res.code == 200 && res.body =~ /(?:user-agent|(?:dis)?allow):/i

          NS::RobotsTxt.new(url, confidence: 100, found_by: found_by)
        end
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
cms_scanner-0.0.37.12 app/finders/interesting_findings/robots_txt.rb
cms_scanner-0.0.37.11 app/finders/interesting_findings/robots_txt.rb
cms_scanner-0.0.37.10 app/finders/interesting_findings/robots_txt.rb
cms_scanner-0.0.37.9 app/finders/interesting_findings/robots_txt.rb
cms_scanner-0.0.37.8 app/finders/interesting_findings/robots_txt.rb
cms_scanner-0.0.37.7 app/finders/interesting_findings/robots_txt.rb
cms_scanner-0.0.37.6 app/finders/interesting_findings/robots_txt.rb
cms_scanner-0.0.37.5 app/finders/interesting_findings/robots_txt.rb
cms_scanner-0.0.37.4 app/finders/interesting_findings/robots_txt.rb
cms_scanner-0.0.37.3 app/finders/interesting_findings/robots_txt.rb
cms_scanner-0.0.37.2 app/finders/interesting_findings/robots_txt.rb
cms_scanner-0.0.37.1 app/finders/interesting_findings/robots_txt.rb
cms_scanner-0.0.37 app/finders/interesting_findings/robots_txt.rb
cms_scanner-0.0.36 app/finders/interesting_findings/robots_txt.rb
cms_scanner-0.0.35.1 app/finders/interesting_findings/robots_txt.rb
cms_scanner-0.0.35 app/finders/interesting_findings/robots_txt.rb
cms_scanner-0.0.34 app/finders/interesting_findings/robots_txt.rb
cms_scanner-0.0.33 app/finders/interesting_findings/robots_txt.rb
cms_scanner-0.0.32 app/finders/interesting_findings/robots_txt.rb
cms_scanner-0.0.31 app/finders/interesting_findings/robots_txt.rb