Files
wpscan/app/finders/interesting_findings
Dwi Siswanto 20eb2d825d 🔨 Update regex
2020-09-10 17:30:36 +07:00
..
2020-03-02 15:34:51 +01:00
2020-03-02 15:34:51 +01:00
2020-09-10 17:30:36 +07:00
2020-03-02 15:34:51 +01:00
2020-03-02 15:34:51 +01:00
2020-06-23 20:30:48 +02:00
2019-03-26 21:10:14 +00:00
2020-03-02 15:34:51 +01:00
2020-03-02 15:34:51 +01:00
2020-03-02 15:34:51 +01:00
2020-03-02 15:34:51 +01:00
2020-03-02 15:34:51 +01:00

# frozen_string_literal: true

module WPScan
  module Finders
    module InterestingFindings
      # Readme.html finder
      class Readme < CMSScanner::Finders::Finder
        # @return [ InterestingFinding ]
        def aggressive(_opts = {})
          potential_files.each do |path|
            res = target.head_and_get(path)

            next unless res.code == 200 && res.body =~ /wordpress/i

            return Model::Readme.new(target.url(path), confidence: 100, found_by: DIRECT_ACCESS)
          end

          nil
        end

        # @retun [ Array<String> ] The list of potential readme files
        def potential_files
          %w[readme.html olvasdel.html lisenssi.html liesmich.html]
        end
      end
    end
  end
end