Sha256: ab150f185253cf5918b65660eb2f6fd30eb1339c949886ac0894a6877c61c97c

Contents?: true

Size: 912 Bytes

Versions: 7

Compression:

Stored size: 912 Bytes

Contents

module WPScan
  module Finders
    class Finder
      module PluginVersion
        # Plugin Version from the Comments in the homepage, used in dynamic PluginVersion finders
        class Comments < CMSScanner::Finders::Finder
          def passive(_opts = {})
            target.target.comments_from_page(self.class::PATTERN) do |match|
              # Avoid nil version, i.e a pattern allowing both versionable and non
              # versionable string to be detected

              next unless match[1]

              return WPScan::Version.new(
                match[1],
                found_by: found_by,
                confidence: 80,
                interesting_entries: ["#{target.target.url}, Match: '#{match}'"]
              )
            end
            nil # In case nothing is found, otherwise the latest match is returned and cause problems
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
wpscan-3.0.8 lib/wpscan/finders/finder/plugin_version/comments.rb
wpscan-3.0.7 lib/wpscan/finders/finder/plugin_version/comments.rb
wpscan-3.0.6 lib/wpscan/finders/finder/plugin_version/comments.rb
wpscan-3.0.5 lib/wpscan/finders/finder/plugin_version/comments.rb
wpscan-3.0.4 lib/wpscan/finders/finder/plugin_version/comments.rb
wpscan-3.0.3 lib/wpscan/finders/finder/plugin_version/comments.rb
wpscan-3.0.2 lib/wpscan/finders/finder/plugin_version/comments.rb