Sha256: b3172c4d852d5dfba3e8405bf6ba7c599f32ff62da3ad97c27966582c7dc5a7c

Contents?: true

Size: 511 Bytes

Versions: 15

Compression:

Stored size: 511 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

15 entries across 15 versions & 1 rubygems

Version Path
cms_scanner-0.0.41.10 app/models/robots_txt.rb
cms_scanner-0.0.41.9 app/models/robots_txt.rb
cms_scanner-0.0.41.8 app/models/robots_txt.rb
cms_scanner-0.0.41.7 app/models/robots_txt.rb
cms_scanner-0.0.41.6 app/models/robots_txt.rb
cms_scanner-0.0.41.5 app/models/robots_txt.rb
cms_scanner-0.0.41.4 app/models/robots_txt.rb
cms_scanner-0.0.41.3 app/models/robots_txt.rb
cms_scanner-0.0.41.2 app/models/robots_txt.rb
cms_scanner-0.0.41.1 app/models/robots_txt.rb
cms_scanner-0.0.41.0 app/models/robots_txt.rb
cms_scanner-0.0.40.3 app/models/robots_txt.rb
cms_scanner-0.0.40.2 app/models/robots_txt.rb
cms_scanner-0.0.40.1 app/models/robots_txt.rb
cms_scanner-0.0.40 app/models/robots_txt.rb