Sha256: 81b4e7e0e1bb0ad577de1792fdcc7c6e77cb21d9bd79e08eb9275a179f2112be
Contents?: true
Size: 595 Bytes
Versions: 34
Compression:
Stored size: 595 Bytes
Contents
# frozen_string_literal: true module CMSScanner module Model # 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 end
Version data entries
34 entries across 34 versions & 1 rubygems