Sha256: 150bd3f448ae9ee04231e6e2346f5dc8ecaa9d2a95eddd5d4a59a51d14f93e21

Contents?: true

Size: 510 Bytes

Versions: 23

Compression:

Stored size: 510 Bytes

Contents

module CMSScanner
  # Robots.txt
  class RobotsTxt < InterestingFinding
    # @todo Better detection, currently everything not empty or / is returned
    #
    # @return [ Array<String> ] The interesting Allow/Disallow rules detected
    def interesting_entries
      results = []

      entries.each do |entry|
        next unless entry =~ /\A(?:dis)?allow:\s*(.+)\z/i
        match = Regexp.last_match(1)
        next if match == '/'

        results << match
      end

      results.uniq
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
cms_scanner-0.0.39.4 app/models/robots_txt.rb
cms_scanner-0.0.39.3 app/models/robots_txt.rb
cms_scanner-0.0.39.2 app/models/robots_txt.rb
cms_scanner-0.0.39.1 app/models/robots_txt.rb
cms_scanner-0.0.39.0 app/models/robots_txt.rb
cms_scanner-0.0.38.4 app/models/robots_txt.rb
cms_scanner-0.0.38.3 app/models/robots_txt.rb
cms_scanner-0.0.38.2 app/models/robots_txt.rb
cms_scanner-0.0.38.1 app/models/robots_txt.rb
cms_scanner-0.0.38.0 app/models/robots_txt.rb
cms_scanner-0.0.37.12 app/models/robots_txt.rb
cms_scanner-0.0.37.11 app/models/robots_txt.rb
cms_scanner-0.0.37.10 app/models/robots_txt.rb
cms_scanner-0.0.37.9 app/models/robots_txt.rb
cms_scanner-0.0.37.8 app/models/robots_txt.rb
cms_scanner-0.0.37.7 app/models/robots_txt.rb
cms_scanner-0.0.37.6 app/models/robots_txt.rb
cms_scanner-0.0.37.5 app/models/robots_txt.rb
cms_scanner-0.0.37.4 app/models/robots_txt.rb
cms_scanner-0.0.37.3 app/models/robots_txt.rb