Sha256: 11ca4a55921862623df97a453bd00a43d54f4a971ee09408f65d5a6b7dffd5dc
Contents?: true
Size: 1.56 KB
Versions: 34
Compression:
Stored size: 1.56 KB
Contents
# frozen_string_literal: true module WPScan module Finders module Plugins # Known Locations Plugins Finder class KnownLocations < CMSScanner::Finders::Finder include CMSScanner::Finders::Finder::Enumerator # @return [ Array<Integer> ] def valid_response_codes @valid_response_codes ||= [200, 401, 403, 500].freeze end # @param [ Hash ] opts # @option opts [ String ] :list # # @return [ Array<Plugin> ] def aggressive(opts = {}) found = [] enumerate(target_urls(opts), opts.merge(check_full_response: true)) do |res, slug| finding_opts = opts.merge(found_by: found_by, confidence: 80, interesting_entries: ["#{res.effective_url}, status: #{res.code}"]) found << Model::Plugin.new(slug, target, finding_opts) raise Error::PluginsThresholdReached if opts[:threshold].positive? && found.size >= opts[:threshold] end found end # @param [ Hash ] opts # @option opts [ String ] :list # # @return [ Hash ] def target_urls(opts = {}) slugs = opts[:list] || DB::Plugins.vulnerable_slugs urls = {} slugs.each do |slug| urls[target.plugin_url(slug)] = slug end urls end def create_progress_bar(opts = {}) super(opts.merge(title: ' Checking Known Locations -')) end end end end end
Version data entries
34 entries across 34 versions & 1 rubygems