Sha256: 3d914967c248a429e09ada7e09cefa11924fbaf2dcb465b445149db0ff0e29b1

Contents?: true

Size: 557 Bytes

Versions: 5

Compression:

Stored size: 557 Bytes

Contents

module WPScan
  # WordPress Plugin
  class Plugin < WpItem
    # See WpItem
    def initialize(name, target, opts = {})
      super(name, target, opts)

      @uri = Addressable::URI.parse(target.url("wp-content/plugins/#{name}/"))
    end

    # @return [ JSON ]
    def db_data
      DB::Plugin.db_data(name)
    end

    # @param [ Hash ] opts
    #
    # @return [ WPScan::Version, false ]
    def version(opts = {})
      @version = Finders::PluginVersion::Base.find(self, detection_opts.merge(opts)) if @version.nil?

      @version
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
wpscan-3.0.4 app/models/plugin.rb
wpscan-3.0.3 app/models/plugin.rb
wpscan-3.0.2 app/models/plugin.rb
wpscan-3.0.1 app/models/plugin.rb
wpscan-3.0 app/models/plugin.rb